From 06aa3ca305d488fe64ba135cd2dfcd03e116fd90 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 23 Jun 2022 01:54:59 +0000 Subject: [PATCH] CodeGen from PR 19430 in Azure/azure-rest-api-specs Merge 134592c568cda2934f8d876dd2006e9711e1ea6f into 3d829159d05d8740cd09988ed1e11420fe54af5b --- .../appservice/armappservice/CHANGELOG.md | 460 + .../appservice/armappservice/autorest.md | 6 +- ..._client.go => certificateorders_client.go} | 125 +- ...=> certificateordersdiagnostics_client.go} | 17 +- ...certificateregistrationprovider_client.go} | 8 +- ...cates_client.go => certificates_client.go} | 37 +- ...zz_generated_constants.go => constants.go} | 595 +- ...apps_client.go => containerapps_client.go} | 37 +- ...nt.go => containerappsrevisions_client.go} | 21 +- ...pps_client.go => deletedwebapps_client.go} | 19 +- ...ostics_client.go => diagnostics_client.go} | 133 +- ...o => domainregistrationprovider_client.go} | 8 +- ...ed_domains_client.go => domains_client.go} | 103 +- ...ments_client.go => environments_client.go} | 587 +- ...ated_global_client.go => global_client.go} | 19 +- .../appservice/armappservice/go.mod | 16 +- .../appservice/armappservice/go.sum | 24 +- ...s_client.go => kubeenvironments_client.go} | 45 +- .../{zz_generated_models.go => models.go} | 1660 +- .../appservice/armappservice/models_serde.go | 26168 ++++++++++++++++ ...erated_plans_client.go => plans_client.go} | 167 +- ..._provider_client.go => provider_client.go} | 46 +- ...ns_client.go => recommendations_client.go} | 93 +- ...nt.go => resourcehealthmetadata_client.go} | 38 +- ...ed_response_types.go => response_types.go} | 222 + ...csites_client.go => staticsites_client.go} | 1043 +- ...erated_time_rfc3339.go => time_rfc3339.go} | 1 + ...ns_client.go => topleveldomains_client.go} | 19 +- ...ed_webapps_client.go => webapps_client.go} | 2942 +- ..._client.go => websitemanagement_client.go} | 106 +- .../workflowrunactionrepetitions_client.go | 308 + ...ctionrepetitionsrequesthistories_client.go | 228 + .../workflowrunactions_client.go | 298 + ...orkflowrunactionscoperepetitions_client.go | 218 + .../armappservice/workflowruns_client.go | 260 + .../armappservice/workflows_client.go | 163 + .../workflowtriggerhistories_client.go | 293 + .../armappservice/workflowtriggers_client.go | 410 + .../armappservice/workflowversions_client.go | 200 + ...mple_appserviceenvironments_client_test.go | 69 - ...ted_example_appserviceplans_client_test.go | 173 - ...ertificateordersdiagnostics_client_test.go | 69 - ...ificateregistrationprovider_client_test.go | 41 - ...erated_example_certificates_client_test.go | 166 - ...rated_example_containerapps_client_test.go | 198 - ...mple_containerappsrevisions_client_test.go | 129 - ...ated_example_deletedwebapps_client_test.go | 64 - ...nerated_example_diagnostics_client_test.go | 593 - ..._domainregistrationprovider_client_test.go | 41 - ...e_generated_example_domains_client_test.go | 59 - ...ze_generated_example_global_client_test.go | 79 - ...ed_example_kubeenvironments_client_test.go | 172 - ..._generated_example_provider_client_test.go | 139 - ...mple_resourcehealthmetadata_client_test.go | 164 - ...nerated_example_staticsites_client_test.go | 1264 - ...ted_example_topleveldomains_client_test.go | 92 - ...e_generated_example_webapps_client_test.go | 1079 - ...ple_websitemanagementclient_client_test.go | 69 - .../zz_generated_models_serde.go | 5042 --- 59 files changed, 34805 insertions(+), 12040 deletions(-) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_certificateorders_client.go => certificateorders_client.go} (94%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_certificateordersdiagnostics_client.go => certificateordersdiagnostics_client.go} (95%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_certificateregistrationprovider_client.go => certificateregistrationprovider_client.go} (94%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_certificates_client.go => certificates_client.go} (95%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_constants.go => constants.go} (78%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_containerapps_client.go => containerapps_client.go} (95%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_containerappsrevisions_client.go => containerappsrevisions_client.go} (97%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_deletedwebapps_client.go => deletedwebapps_client.go} (95%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_diagnostics_client.go => diagnostics_client.go} (96%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_domainregistrationprovider_client.go => domainregistrationprovider_client.go} (94%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_domains_client.go => domains_client.go} (94%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_environments_client.go => environments_client.go} (85%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_global_client.go => global_client.go} (94%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_kubeenvironments_client.go => kubeenvironments_client.go} (94%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_models.go => models.go} (90%) create mode 100644 sdk/resourcemanager/appservice/armappservice/models_serde.go rename sdk/resourcemanager/appservice/armappservice/{zz_generated_plans_client.go => plans_client.go} (94%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_provider_client.go => provider_client.go} (93%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_recommendations_client.go => recommendations_client.go} (94%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_resourcehealthmetadata_client.go => resourcehealthmetadata_client.go} (94%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_response_types.go => response_types.go} (93%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_staticsites_client.go => staticsites_client.go} (77%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_time_rfc3339.go => time_rfc3339.go} (99%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_topleveldomains_client.go => topleveldomains_client.go} (94%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_webapps_client.go => webapps_client.go} (92%) rename sdk/resourcemanager/appservice/armappservice/{zz_generated_websitemanagement_client.go => websitemanagement_client.go} (94%) create mode 100644 sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitions_client.go create mode 100644 sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitionsrequesthistories_client.go create mode 100644 sdk/resourcemanager/appservice/armappservice/workflowrunactions_client.go create mode 100644 sdk/resourcemanager/appservice/armappservice/workflowrunactionscoperepetitions_client.go create mode 100644 sdk/resourcemanager/appservice/armappservice/workflowruns_client.go create mode 100644 sdk/resourcemanager/appservice/armappservice/workflows_client.go create mode 100644 sdk/resourcemanager/appservice/armappservice/workflowtriggerhistories_client.go create mode 100644 sdk/resourcemanager/appservice/armappservice/workflowtriggers_client.go create mode 100644 sdk/resourcemanager/appservice/armappservice/workflowversions_client.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/ze_generated_example_appserviceenvironments_client_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/ze_generated_example_appserviceplans_client_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/ze_generated_example_certificateordersdiagnostics_client_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/ze_generated_example_certificateregistrationprovider_client_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/ze_generated_example_certificates_client_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/ze_generated_example_containerapps_client_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/ze_generated_example_containerappsrevisions_client_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/ze_generated_example_deletedwebapps_client_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/ze_generated_example_diagnostics_client_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/ze_generated_example_domainregistrationprovider_client_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/ze_generated_example_domains_client_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/ze_generated_example_global_client_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/ze_generated_example_kubeenvironments_client_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/ze_generated_example_provider_client_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/ze_generated_example_resourcehealthmetadata_client_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/ze_generated_example_staticsites_client_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/ze_generated_example_topleveldomains_client_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/ze_generated_example_webapps_client_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/ze_generated_example_websitemanagementclient_client_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/zz_generated_models_serde.go diff --git a/sdk/resourcemanager/appservice/armappservice/CHANGELOG.md b/sdk/resourcemanager/appservice/armappservice/CHANGELOG.md index 971b10e02a28..b609c199196a 100644 --- a/sdk/resourcemanager/appservice/armappservice/CHANGELOG.md +++ b/sdk/resourcemanager/appservice/armappservice/CHANGELOG.md @@ -1,5 +1,465 @@ # Release History +## 2.0.0 (2022-06-23) +### Breaking Changes + +- Type of `CertificateOrderPatchResourceProperties.AppServiceCertificateNotRenewableReasons` has been changed from `[]*AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem` to `[]*ResourceNotRenewableReason` +- Type of `ProviderClientGetFunctionAppStacksForLocationOptions.StackOsType` has been changed from `*Enum17` to `*Enum16` +- Type of `ProviderClientGetAvailableStacksOptions.OSTypeSelected` has been changed from `*Enum15` to `*Enum14` +- Type of `ProviderClientGetAvailableStacksOnPremOptions.OSTypeSelected` has been changed from `*Enum20` to `*Enum19` +- Type of `DomainPatchResourceProperties.DomainNotRenewableReasons` has been changed from `[]*DomainPatchResourcePropertiesDomainNotRenewableReasonsItem` to `[]*ResourceNotRenewableReason` +- Type of `CertificateOrderProperties.AppServiceCertificateNotRenewableReasons` has been changed from `[]*AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem` to `[]*ResourceNotRenewableReason` +- Type of `ProviderClientGetWebAppStacksForLocationOptions.StackOsType` has been changed from `*Enum18` to `*Enum17` +- Type of `ProviderClientGetFunctionAppStacksOptions.StackOsType` has been changed from `*Enum16` to `*Enum15` +- Type of `ProviderClientGetWebAppStacksOptions.StackOsType` has been changed from `*Enum19` to `*Enum18` +- Type of `DomainProperties.DomainNotRenewableReasons` has been changed from `[]*DomainPropertiesDomainNotRenewableReasonsItem` to `[]*ResourceNotRenewableReason` +- Const `AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemSubscriptionNotActive` has been removed +- Const `DomainPatchResourcePropertiesDomainNotRenewableReasonsItemExpirationNotInRenewalTimeRange` has been removed +- Const `DomainPropertiesDomainNotRenewableReasonsItemExpirationNotInRenewalTimeRange` has been removed +- Const `AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal` has been removed +- Const `AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemExpirationNotInRenewalTimeRange` has been removed +- Const `Enum20Windows` has been removed +- Const `Enum20Linux` has been removed +- Const `AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal` has been removed +- Const `DomainPatchResourcePropertiesDomainNotRenewableReasonsItemSubscriptionNotActive` has been removed +- Const `DomainPropertiesDomainNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal` has been removed +- Const `Enum15LinuxFunctions` has been removed +- Const `Enum15WindowsFunctions` has been removed +- Const `DomainPatchResourcePropertiesDomainNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal` has been removed +- Const `DomainPropertiesDomainNotRenewableReasonsItemSubscriptionNotActive` has been removed +- Const `Enum20LinuxFunctions` has been removed +- Const `Enum20All` has been removed +- Const `AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemSubscriptionNotActive` has been removed +- Const `AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemExpirationNotInRenewalTimeRange` has been removed +- Const `Enum20WindowsFunctions` has been removed +- Function `PossibleAppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemValues` has been removed +- Function `PossibleEnum20Values` has been removed +- Function `PossibleDomainPropertiesDomainNotRenewableReasonsItemValues` has been removed +- Function `PossibleDomainPatchResourcePropertiesDomainNotRenewableReasonsItemValues` has been removed +- Function `PossibleAppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemValues` has been removed +- Struct `CertificateEmailProperties` has been removed +- Struct `CertificateOrderActionProperties` has been removed +- Field `Name` of struct `CertificateEmail` has been removed +- Field `Type` of struct `CertificateEmail` has been removed +- Field `Kind` of struct `CertificateEmail` has been removed +- Field `Properties` of struct `CertificateEmail` has been removed +- Field `ID` of struct `CertificateEmail` has been removed +- Field `Type` of struct `CertificateOrderAction` has been removed +- Field `Kind` of struct `CertificateOrderAction` has been removed +- Field `Properties` of struct `CertificateOrderAction` has been removed +- Field `ID` of struct `CertificateOrderAction` has been removed +- Field `Name` of struct `CertificateOrderAction` has been removed + +### Features Added + +- New const `DeploymentBuildStatusRuntimeStarting` +- New const `DayOfWeekWednesday` +- New const `DaysOfWeekSunday` +- New const `WorkflowStatusPaused` +- New const `CustomDNSSuffixProvisioningStateFailed` +- New const `WorkflowProvisioningStateWaiting` +- New const `CustomDNSSuffixProvisioningStateSucceeded` +- New const `DeploymentBuildStatusBuildInProgress` +- New const `WorkflowProvisioningStateUnregistering` +- New const `OpenAuthenticationProviderTypeAAD` +- New const `WorkflowProvisioningStateMoving` +- New const `WorkflowTriggerProvisioningStateDeleting` +- New const `WorkflowProvisioningStateCanceled` +- New const `WorkflowTriggerProvisioningStateAccepted` +- New const `KeyTypePrimary` +- New const `WorkflowStatusWaiting` +- New const `WorkflowStateDeleted` +- New const `CustomDomainStatusUnhealthy` +- New const `DeploymentBuildStatusBuildSuccessful` +- New const `WorkflowProvisioningStateDeleted` +- New const `WorkflowStatusNotSpecified` +- New const `CustomDNSSuffixProvisioningStateDegraded` +- New const `WorkflowTriggerProvisioningStateCreated` +- New const `ParameterTypeInt` +- New const `UpgradeAvailabilityNone` +- New const `ResourceNotRenewableReasonSubscriptionNotActive` +- New const `DayOfWeekFriday` +- New const `DaysOfWeekMonday` +- New const `WorkflowProvisioningStatePending` +- New const `WorkflowProvisioningStateFailed` +- New const `ResourceNotRenewableReasonRegistrationStatusNotSupportedForRenewal` +- New const `WorkflowStatusCancelled` +- New const `UpgradePreferenceLate` +- New const `KeyTypeNotSpecified` +- New const `WorkflowProvisioningStateRenewing` +- New const `Enum19WindowsFunctions` +- New const `ParameterTypeNotSpecified` +- New const `DeploymentBuildStatusBuildRequestReceived` +- New const `UpgradePreferenceManual` +- New const `WorkflowProvisioningStateUnregistered` +- New const `WorkflowProvisioningStateNotSpecified` +- New const `WorkflowStatusIgnored` +- New const `WorkflowProvisioningStateRegistering` +- New const `DeploymentBuildStatusRuntimeFailed` +- New const `ParameterTypeFloat` +- New const `WorkflowProvisioningStateSucceeded` +- New const `WorkflowProvisioningStateCompleted` +- New const `WorkflowTriggerProvisioningStateFailed` +- New const `WorkflowStatusFaulted` +- New const `DayOfWeekSaturday` +- New const `WorkflowProvisioningStateDeleting` +- New const `DeploymentBuildStatusBuildAborted` +- New const `WorkflowProvisioningStateRegistered` +- New const `WorkflowSKUNameFree` +- New const `WorkflowTriggerProvisioningStateCanceled` +- New const `WorkflowTriggerProvisioningStateNotSpecified` +- New const `CustomDNSSuffixProvisioningStateInProgress` +- New const `UpgradePreferenceNone` +- New const `KeyTypeSecondary` +- New const `WorkflowSKUNameNotSpecified` +- New const `KindStateless` +- New const `WorkflowProvisioningStateReady` +- New const `RecurrenceFrequencyMinute` +- New const `WorkflowTriggerProvisioningStateUpdating` +- New const `WorkflowProvisioningStateAccepted` +- New const `WorkflowTriggerProvisioningStateCompleted` +- New const `WorkflowSKUNameShared` +- New const `ParameterTypeString` +- New const `WorkflowStatusSkipped` +- New const `WorkflowStatusSuspended` +- New const `WorkflowStateCompleted` +- New const `RecurrenceFrequencyWeek` +- New const `DaysOfWeekFriday` +- New const `Enum19LinuxFunctions` +- New const `DaysOfWeekSaturday` +- New const `WorkflowTriggerProvisioningStateMoving` +- New const `Enum14Linux` +- New const `DaysOfWeekThursday` +- New const `WorkflowStatusAborted` +- New const `Enum14LinuxFunctions` +- New const `WorkflowTriggerProvisioningStateCreating` +- New const `WorkflowTriggerProvisioningStateRunning` +- New const `Enum14Windows` +- New const `WorkflowTriggerProvisioningStateRegistering` +- New const `DeploymentBuildStatusBuildPending` +- New const `WorkflowTriggerProvisioningStateUnregistering` +- New const `WorkflowStatusTimedOut` +- New const `WorkflowProvisioningStateUpdating` +- New const `WorkflowProvisioningStateInProgress` +- New const `WorkflowSKUNameStandard` +- New const `WorkflowStatusSucceeded` +- New const `WorkflowTriggerProvisioningStateUnregistered` +- New const `DeploymentBuildStatusRuntimeSuccessful` +- New const `ParameterTypeBool` +- New const `WorkflowStateEnabled` +- New const `DeploymentBuildStatusStartPollingWithRestart` +- New const `DeploymentBuildStatusBuildFailed` +- New const `DaysOfWeekWednesday` +- New const `KindStateful` +- New const `Enum14WindowsFunctions` +- New const `WorkflowProvisioningStateCreated` +- New const `RecurrenceFrequencyNotSpecified` +- New const `WorkflowStateSuspended` +- New const `WorkflowStateNotSpecified` +- New const `WorkflowTriggerProvisioningStateDeleted` +- New const `ParameterTypeArray` +- New const `WorkflowStatusFailed` +- New const `RecurrenceFrequencyDay` +- New const `DeploymentBuildStatusStartPolling` +- New const `WorkflowProvisioningStateRunning` +- New const `DeploymentBuildStatusPostBuildRestartRequired` +- New const `DayOfWeekSunday` +- New const `WorkflowSKUNameBasic` +- New const `DeploymentBuildStatusTimedOut` +- New const `DayOfWeekMonday` +- New const `UpgradePreferenceEarly` +- New const `DayOfWeekThursday` +- New const `RecurrenceFrequencyYear` +- New const `WorkflowProvisioningStateCreating` +- New const `ResourceNotRenewableReasonExpirationNotInRenewalTimeRange` +- New const `ParameterTypeSecureString` +- New const `ParameterTypeObject` +- New const `DayOfWeekTuesday` +- New const `DaysOfWeekTuesday` +- New const `ParameterTypeSecureObject` +- New const `Enum14All` +- New const `RecurrenceFrequencyMonth` +- New const `WorkflowStatusRunning` +- New const `WorkflowTriggerProvisioningStateReady` +- New const `RecurrenceFrequencySecond` +- New const `WorkflowTriggerProvisioningStateRegistered` +- New const `RecurrenceFrequencyHour` +- New const `WorkflowSKUNamePremium` +- New const `WorkflowStateDisabled` +- New const `WorkflowTriggerProvisioningStateSucceeded` +- New const `UpgradeAvailabilityReady` +- New function `*EnvironmentsClient.GetAseCustomDNSSuffixConfiguration(context.Context, string, string, *EnvironmentsClientGetAseCustomDNSSuffixConfigurationOptions) (EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse, error)` +- New function `*WorkflowsClient.RegenerateAccessKey(context.Context, string, string, string, RegenerateActionParameter, *WorkflowsClientRegenerateAccessKeyOptions) (WorkflowsClientRegenerateAccessKeyResponse, error)` +- New function `PossibleWorkflowStateValues() []WorkflowState` +- New function `PossibleDaysOfWeekValues() []DaysOfWeek` +- New function `*WebAppsClient.BeginGetProductionSiteDeploymentStatus(context.Context, string, string, string, *WebAppsClientBeginGetProductionSiteDeploymentStatusOptions) (*runtime.Poller[WebAppsClientGetProductionSiteDeploymentStatusResponse], error)` +- New function `PossibleCustomDNSSuffixProvisioningStateValues() []CustomDNSSuffixProvisioningState` +- New function `*WorkflowTriggersClient.GetSchemaJSON(context.Context, string, string, string, string, *WorkflowTriggersClientGetSchemaJSONOptions) (WorkflowTriggersClientGetSchemaJSONResponse, error)` +- New function `*StaticSitesClient.BeginLinkBackendToBuild(context.Context, string, string, string, string, StaticSiteLinkedBackendARMResource, *StaticSitesClientBeginLinkBackendToBuildOptions) (*runtime.Poller[StaticSitesClientLinkBackendToBuildResponse], error)` +- New function `*WorkflowRunActionRepetitionsRequestHistoriesClient.Get(context.Context, string, string, string, string, string, string, string, *WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions) (WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse, error)` +- New function `*WorkflowRunActionScopeRepetitionsClient.NewListPager(string, string, string, string, string, *WorkflowRunActionScopeRepetitionsClientListOptions) *runtime.Pager[WorkflowRunActionScopeRepetitionsClientListResponse]` +- New function `*WorkflowTriggersClient.Get(context.Context, string, string, string, string, *WorkflowTriggersClientGetOptions) (WorkflowTriggersClientGetResponse, error)` +- New function `*WorkflowRunsClient.Get(context.Context, string, string, string, string, *WorkflowRunsClientGetOptions) (WorkflowRunsClientGetResponse, error)` +- New function `*WorkflowRunActionRepetitionsClient.NewListPager(string, string, string, string, string, *WorkflowRunActionRepetitionsClientListOptions) *runtime.Pager[WorkflowRunActionRepetitionsClientListResponse]` +- New function `*WorkflowVersionsClient.NewListPager(string, string, string, *WorkflowVersionsClientListOptions) *runtime.Pager[WorkflowVersionsClientListResponse]` +- New function `PossibleEnum14Values() []Enum14` +- New function `*WebAppsClient.NewListSlotSiteDeploymentStatusesSlotPager(string, string, string, *WebAppsClientListSlotSiteDeploymentStatusesSlotOptions) *runtime.Pager[WebAppsClientListSlotSiteDeploymentStatusesSlotResponse]` +- New function `*StaticSitesClient.NewGetLinkedBackendsForBuildPager(string, string, string, *StaticSitesClientGetLinkedBackendsForBuildOptions) *runtime.Pager[StaticSitesClientGetLinkedBackendsForBuildResponse]` +- New function `PossibleUpgradePreferenceValues() []UpgradePreference` +- New function `*StaticSitesClient.BeginValidateBackend(context.Context, string, string, string, StaticSiteLinkedBackendARMResource, *StaticSitesClientBeginValidateBackendOptions) (*runtime.Poller[StaticSitesClientValidateBackendResponse], error)` +- New function `*WorkflowRunActionRepetitionsClient.NewListExpressionTracesPager(string, string, string, string, string, string, *WorkflowRunActionRepetitionsClientListExpressionTracesOptions) *runtime.Pager[WorkflowRunActionRepetitionsClientListExpressionTracesResponse]` +- New function `*StaticSitesClient.UnlinkBackendFromBuild(context.Context, string, string, string, string, *StaticSitesClientUnlinkBackendFromBuildOptions) (StaticSitesClientUnlinkBackendFromBuildResponse, error)` +- New function `*WorkflowRunActionsClient.NewListExpressionTracesPager(string, string, string, string, string, *WorkflowRunActionsClientListExpressionTracesOptions) *runtime.Pager[WorkflowRunActionsClientListExpressionTracesResponse]` +- New function `*StaticSitesClient.GetLinkedBackendForBuild(context.Context, string, string, string, string, *StaticSitesClientGetLinkedBackendForBuildOptions) (StaticSitesClientGetLinkedBackendForBuildResponse, error)` +- New function `*StaticSitesClient.NewGetLinkedBackendsPager(string, string, *StaticSitesClientGetLinkedBackendsOptions) *runtime.Pager[StaticSitesClientGetLinkedBackendsResponse]` +- New function `NewWorkflowRunsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkflowRunsClient, error)` +- New function `PossibleKeyTypeValues() []KeyType` +- New function `*WorkflowRunActionsClient.NewListPager(string, string, string, string, *WorkflowRunActionsClientListOptions) *runtime.Pager[WorkflowRunActionsClientListResponse]` +- New function `PossibleUpgradeAvailabilityValues() []UpgradeAvailability` +- New function `*WorkflowRunActionRepetitionsRequestHistoriesClient.NewListPager(string, string, string, string, string, string, *WorkflowRunActionRepetitionsRequestHistoriesClientListOptions) *runtime.Pager[WorkflowRunActionRepetitionsRequestHistoriesClientListResponse]` +- New function `*WorkflowVersionsClient.Get(context.Context, string, string, string, string, *WorkflowVersionsClientGetOptions) (WorkflowVersionsClientGetResponse, error)` +- New function `*WorkflowTriggersClient.NewListPager(string, string, string, *WorkflowTriggersClientListOptions) *runtime.Pager[WorkflowTriggersClientListResponse]` +- New function `PossibleOpenAuthenticationProviderTypeValues() []OpenAuthenticationProviderType` +- New function `PossibleWorkflowTriggerProvisioningStateValues() []WorkflowTriggerProvisioningState` +- New function `*WorkflowTriggerHistoriesClient.Get(context.Context, string, string, string, string, string, *WorkflowTriggerHistoriesClientGetOptions) (WorkflowTriggerHistoriesClientGetResponse, error)` +- New function `PossibleResourceNotRenewableReasonValues() []ResourceNotRenewableReason` +- New function `*WorkflowRunsClient.Cancel(context.Context, string, string, string, string, *WorkflowRunsClientCancelOptions) (WorkflowRunsClientCancelResponse, error)` +- New function `*WorkflowTriggersClient.BeginRun(context.Context, string, string, string, string, *WorkflowTriggersClientBeginRunOptions) (*runtime.Poller[WorkflowTriggersClientRunResponse], error)` +- New function `NewWorkflowRunActionScopeRepetitionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkflowRunActionScopeRepetitionsClient, error)` +- New function `*EnvironmentsClient.UpdateAseCustomDNSSuffixConfiguration(context.Context, string, string, CustomDNSSuffixConfiguration, *EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationOptions) (EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse, error)` +- New function `NewWorkflowRunActionRepetitionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkflowRunActionRepetitionsClient, error)` +- New function `NewWorkflowRunActionRepetitionsRequestHistoriesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkflowRunActionRepetitionsRequestHistoriesClient, error)` +- New function `NewWorkflowVersionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkflowVersionsClient, error)` +- New function `*EnvironmentsClient.BeginUpgrade(context.Context, string, string, *EnvironmentsClientBeginUpgradeOptions) (*runtime.Poller[EnvironmentsClientUpgradeResponse], error)` +- New function `NewWorkflowTriggersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkflowTriggersClient, error)` +- New function `*WorkflowTriggersClient.ListCallbackURL(context.Context, string, string, string, string, *WorkflowTriggersClientListCallbackURLOptions) (WorkflowTriggersClientListCallbackURLResponse, error)` +- New function `*WorkflowRunActionsClient.Get(context.Context, string, string, string, string, string, *WorkflowRunActionsClientGetOptions) (WorkflowRunActionsClientGetResponse, error)` +- New function `*WorkflowRunsClient.NewListPager(string, string, string, *WorkflowRunsClientListOptions) *runtime.Pager[WorkflowRunsClientListResponse]` +- New function `NewWorkflowsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkflowsClient, error)` +- New function `PossibleKindValues() []Kind` +- New function `PossibleWorkflowStatusValues() []WorkflowStatus` +- New function `PossibleWorkflowSKUNameValues() []WorkflowSKUName` +- New function `*EnvironmentsClient.TestUpgradeAvailableNotification(context.Context, string, string, *EnvironmentsClientTestUpgradeAvailableNotificationOptions) (EnvironmentsClientTestUpgradeAvailableNotificationResponse, error)` +- New function `*EnvironmentsClient.DeleteAseCustomDNSSuffixConfiguration(context.Context, string, string, *EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationOptions) (EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse, error)` +- New function `*WebAppsClient.BeginGetSlotSiteDeploymentStatusSlot(context.Context, string, string, string, string, *WebAppsClientBeginGetSlotSiteDeploymentStatusSlotOptions) (*runtime.Poller[WebAppsClientGetSlotSiteDeploymentStatusSlotResponse], error)` +- New function `*WebAppsClient.NewListProductionSiteDeploymentStatusesPager(string, string, *WebAppsClientListProductionSiteDeploymentStatusesOptions) *runtime.Pager[WebAppsClientListProductionSiteDeploymentStatusesResponse]` +- New function `*WorkflowsClient.Validate(context.Context, string, string, string, Workflow, *WorkflowsClientValidateOptions) (WorkflowsClientValidateResponse, error)` +- New function `PossibleParameterTypeValues() []ParameterType` +- New function `*StaticSitesClient.BeginLinkBackend(context.Context, string, string, string, StaticSiteLinkedBackendARMResource, *StaticSitesClientBeginLinkBackendOptions) (*runtime.Poller[StaticSitesClientLinkBackendResponse], error)` +- New function `NewWorkflowTriggerHistoriesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkflowTriggerHistoriesClient, error)` +- New function `*StaticSitesClient.UnlinkBackend(context.Context, string, string, string, *StaticSitesClientUnlinkBackendOptions) (StaticSitesClientUnlinkBackendResponse, error)` +- New function `PossibleWorkflowProvisioningStateValues() []WorkflowProvisioningState` +- New function `*StaticSitesClient.GetLinkedBackend(context.Context, string, string, string, *StaticSitesClientGetLinkedBackendOptions) (StaticSitesClientGetLinkedBackendResponse, error)` +- New function `*WorkflowTriggerHistoriesClient.NewListPager(string, string, string, string, *WorkflowTriggerHistoriesClientListOptions) *runtime.Pager[WorkflowTriggerHistoriesClientListResponse]` +- New function `PossibleDeploymentBuildStatusValues() []DeploymentBuildStatus` +- New function `*WorkflowTriggerHistoriesClient.BeginResubmit(context.Context, string, string, string, string, string, *WorkflowTriggerHistoriesClientBeginResubmitOptions) (*runtime.Poller[WorkflowTriggerHistoriesClientResubmitResponse], error)` +- New function `*WorkflowRunActionScopeRepetitionsClient.Get(context.Context, string, string, string, string, string, string, *WorkflowRunActionScopeRepetitionsClientGetOptions) (WorkflowRunActionScopeRepetitionsClientGetResponse, error)` +- New function `NewWorkflowRunActionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkflowRunActionsClient, error)` +- New function `*StaticSitesClient.BeginValidateBackendForBuild(context.Context, string, string, string, string, StaticSiteLinkedBackendARMResource, *StaticSitesClientBeginValidateBackendForBuildOptions) (*runtime.Poller[StaticSitesClientValidateBackendForBuildResponse], error)` +- New function `PossibleRecurrenceFrequencyValues() []RecurrenceFrequency` +- New function `*WorkflowRunActionRepetitionsClient.Get(context.Context, string, string, string, string, string, string, *WorkflowRunActionRepetitionsClientGetOptions) (WorkflowRunActionRepetitionsClientGetResponse, error)` +- New function `PossibleDayOfWeekValues() []DayOfWeek` +- New struct `AzureResourceErrorInfo` +- New struct `ContentHash` +- New struct `ContentLink` +- New struct `Correlation` +- New struct `CsmDeploymentStatus` +- New struct `CsmDeploymentStatusCollection` +- New struct `CsmDeploymentStatusProperties` +- New struct `CustomDNSSuffixConfiguration` +- New struct `CustomDNSSuffixConfigurationProperties` +- New struct `EnvironmentsClientBeginUpgradeOptions` +- New struct `EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationOptions` +- New struct `EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse` +- New struct `EnvironmentsClientGetAseCustomDNSSuffixConfigurationOptions` +- New struct `EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse` +- New struct `EnvironmentsClientTestUpgradeAvailableNotificationOptions` +- New struct `EnvironmentsClientTestUpgradeAvailableNotificationResponse` +- New struct `EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationOptions` +- New struct `EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse` +- New struct `EnvironmentsClientUpgradeResponse` +- New struct `ErrorInfo` +- New struct `ErrorProperties` +- New struct `ErrorResponse` +- New struct `Expression` +- New struct `ExpressionRoot` +- New struct `ExpressionTraces` +- New struct `FlowAccessControlConfiguration` +- New struct `FlowAccessControlConfigurationPolicy` +- New struct `FlowEndpoints` +- New struct `FlowEndpointsConfiguration` +- New struct `IPAddress` +- New struct `IPAddressRange` +- New struct `JSONSchema` +- New struct `OpenAuthenticationAccessPolicies` +- New struct `OpenAuthenticationAccessPolicy` +- New struct `OpenAuthenticationPolicyClaim` +- New struct `OperationResult` +- New struct `OperationResultProperties` +- New struct `RecurrenceSchedule` +- New struct `RecurrenceScheduleOccurrence` +- New struct `RegenerateActionParameter` +- New struct `RepetitionIndex` +- New struct `Request` +- New struct `RequestHistory` +- New struct `RequestHistoryListResult` +- New struct `RequestHistoryProperties` +- New struct `ResourceReference` +- New struct `Response` +- New struct `RetryHistory` +- New struct `RunActionCorrelation` +- New struct `RunCorrelation` +- New struct `StaticSiteLinkedBackend` +- New struct `StaticSiteLinkedBackendARMResource` +- New struct `StaticSiteLinkedBackendARMResourceProperties` +- New struct `StaticSiteLinkedBackendsCollection` +- New struct `StaticSitesClientBeginLinkBackendOptions` +- New struct `StaticSitesClientBeginLinkBackendToBuildOptions` +- New struct `StaticSitesClientBeginValidateBackendForBuildOptions` +- New struct `StaticSitesClientBeginValidateBackendOptions` +- New struct `StaticSitesClientGetLinkedBackendForBuildOptions` +- New struct `StaticSitesClientGetLinkedBackendForBuildResponse` +- New struct `StaticSitesClientGetLinkedBackendOptions` +- New struct `StaticSitesClientGetLinkedBackendResponse` +- New struct `StaticSitesClientGetLinkedBackendsForBuildOptions` +- New struct `StaticSitesClientGetLinkedBackendsForBuildResponse` +- New struct `StaticSitesClientGetLinkedBackendsOptions` +- New struct `StaticSitesClientGetLinkedBackendsResponse` +- New struct `StaticSitesClientLinkBackendResponse` +- New struct `StaticSitesClientLinkBackendToBuildResponse` +- New struct `StaticSitesClientUnlinkBackendFromBuildOptions` +- New struct `StaticSitesClientUnlinkBackendFromBuildResponse` +- New struct `StaticSitesClientUnlinkBackendOptions` +- New struct `StaticSitesClientUnlinkBackendResponse` +- New struct `StaticSitesClientValidateBackendForBuildResponse` +- New struct `StaticSitesClientValidateBackendResponse` +- New struct `SubResource` +- New struct `WebAppsClientBeginGetProductionSiteDeploymentStatusOptions` +- New struct `WebAppsClientBeginGetSlotSiteDeploymentStatusSlotOptions` +- New struct `WebAppsClientGetProductionSiteDeploymentStatusResponse` +- New struct `WebAppsClientGetSlotSiteDeploymentStatusSlotResponse` +- New struct `WebAppsClientListProductionSiteDeploymentStatusesOptions` +- New struct `WebAppsClientListProductionSiteDeploymentStatusesResponse` +- New struct `WebAppsClientListSlotSiteDeploymentStatusesSlotOptions` +- New struct `WebAppsClientListSlotSiteDeploymentStatusesSlotResponse` +- New struct `Workflow` +- New struct `WorkflowFilter` +- New struct `WorkflowListResult` +- New struct `WorkflowOutputParameter` +- New struct `WorkflowParameter` +- New struct `WorkflowProperties` +- New struct `WorkflowResource` +- New struct `WorkflowRun` +- New struct `WorkflowRunAction` +- New struct `WorkflowRunActionFilter` +- New struct `WorkflowRunActionListResult` +- New struct `WorkflowRunActionProperties` +- New struct `WorkflowRunActionRepetitionDefinition` +- New struct `WorkflowRunActionRepetitionDefinitionCollection` +- New struct `WorkflowRunActionRepetitionProperties` +- New struct `WorkflowRunActionRepetitionsClient` +- New struct `WorkflowRunActionRepetitionsClientGetOptions` +- New struct `WorkflowRunActionRepetitionsClientGetResponse` +- New struct `WorkflowRunActionRepetitionsClientListExpressionTracesOptions` +- New struct `WorkflowRunActionRepetitionsClientListExpressionTracesResponse` +- New struct `WorkflowRunActionRepetitionsClientListOptions` +- New struct `WorkflowRunActionRepetitionsClientListResponse` +- New struct `WorkflowRunActionRepetitionsRequestHistoriesClient` +- New struct `WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions` +- New struct `WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse` +- New struct `WorkflowRunActionRepetitionsRequestHistoriesClientListOptions` +- New struct `WorkflowRunActionRepetitionsRequestHistoriesClientListResponse` +- New struct `WorkflowRunActionScopeRepetitionsClient` +- New struct `WorkflowRunActionScopeRepetitionsClientGetOptions` +- New struct `WorkflowRunActionScopeRepetitionsClientGetResponse` +- New struct `WorkflowRunActionScopeRepetitionsClientListOptions` +- New struct `WorkflowRunActionScopeRepetitionsClientListResponse` +- New struct `WorkflowRunActionsClient` +- New struct `WorkflowRunActionsClientGetOptions` +- New struct `WorkflowRunActionsClientGetResponse` +- New struct `WorkflowRunActionsClientListExpressionTracesOptions` +- New struct `WorkflowRunActionsClientListExpressionTracesResponse` +- New struct `WorkflowRunActionsClientListOptions` +- New struct `WorkflowRunActionsClientListResponse` +- New struct `WorkflowRunFilter` +- New struct `WorkflowRunListResult` +- New struct `WorkflowRunProperties` +- New struct `WorkflowRunTrigger` +- New struct `WorkflowRunsClient` +- New struct `WorkflowRunsClientCancelOptions` +- New struct `WorkflowRunsClientCancelResponse` +- New struct `WorkflowRunsClientGetOptions` +- New struct `WorkflowRunsClientGetResponse` +- New struct `WorkflowRunsClientListOptions` +- New struct `WorkflowRunsClientListResponse` +- New struct `WorkflowSKU` +- New struct `WorkflowTrigger` +- New struct `WorkflowTriggerCallbackURL` +- New struct `WorkflowTriggerFilter` +- New struct `WorkflowTriggerHistoriesClient` +- New struct `WorkflowTriggerHistoriesClientBeginResubmitOptions` +- New struct `WorkflowTriggerHistoriesClientGetOptions` +- New struct `WorkflowTriggerHistoriesClientGetResponse` +- New struct `WorkflowTriggerHistoriesClientListOptions` +- New struct `WorkflowTriggerHistoriesClientListResponse` +- New struct `WorkflowTriggerHistoriesClientResubmitResponse` +- New struct `WorkflowTriggerHistory` +- New struct `WorkflowTriggerHistoryFilter` +- New struct `WorkflowTriggerHistoryListResult` +- New struct `WorkflowTriggerHistoryProperties` +- New struct `WorkflowTriggerListCallbackURLQueries` +- New struct `WorkflowTriggerListResult` +- New struct `WorkflowTriggerProperties` +- New struct `WorkflowTriggerRecurrence` +- New struct `WorkflowTriggersClient` +- New struct `WorkflowTriggersClientBeginRunOptions` +- New struct `WorkflowTriggersClientGetOptions` +- New struct `WorkflowTriggersClientGetResponse` +- New struct `WorkflowTriggersClientGetSchemaJSONOptions` +- New struct `WorkflowTriggersClientGetSchemaJSONResponse` +- New struct `WorkflowTriggersClientListCallbackURLOptions` +- New struct `WorkflowTriggersClientListCallbackURLResponse` +- New struct `WorkflowTriggersClientListOptions` +- New struct `WorkflowTriggersClientListResponse` +- New struct `WorkflowTriggersClientRunResponse` +- New struct `WorkflowVersion` +- New struct `WorkflowVersionListResult` +- New struct `WorkflowVersionProperties` +- New struct `WorkflowVersionsClient` +- New struct `WorkflowVersionsClientGetOptions` +- New struct `WorkflowVersionsClientGetResponse` +- New struct `WorkflowVersionsClientListOptions` +- New struct `WorkflowVersionsClientListResponse` +- New struct `WorkflowsClient` +- New struct `WorkflowsClientRegenerateAccessKeyOptions` +- New struct `WorkflowsClientRegenerateAccessKeyResponse` +- New struct `WorkflowsClientValidateOptions` +- New struct `WorkflowsClientValidateResponse` +- New field `VnetImagePullEnabled` in struct `SiteProperties` +- New field `PublicNetworkAccess` in struct `SiteProperties` +- New field `VnetContentShareEnabled` in struct `SiteProperties` +- New field `VnetRouteAllEnabled` in struct `SiteProperties` +- New field `PublicNetworkAccess` in struct `TriggeredWebJobProperties` +- New field `StorageAccountRequired` in struct `TriggeredWebJobProperties` +- New field `NumberOfWorkers` in struct `PlanPatchResourceProperties` +- New field `ActionType` in struct `CertificateOrderAction` +- New field `CreatedAt` in struct `CertificateOrderAction` +- New field `Hostname` in struct `WebSiteManagementClientListCustomHostNameSitesOptions` +- New field `LinkedBackends` in struct `StaticSite` +- New field `PublicNetworkAccess` in struct `StaticSite` +- New field `NumberOfWorkers` in struct `PlanProperties` +- New field `LinkedBackends` in struct `StaticSiteBuildARMResourceProperties` +- New field `TimeStamp` in struct `CertificateEmail` +- New field `EmailID` in struct `CertificateEmail` +- New field `CustomDNSSuffixConfiguration` in struct `Environment` +- New field `UpgradePreference` in struct `Environment` +- New field `UpgradeAvailability` in struct `Environment` +- New field `NetworkingConfiguration` in struct `Environment` +- New field `FtpEnabled` in struct `AseV3NetworkingConfigurationProperties` +- New field `InboundIPAddressOverride` in struct `AseV3NetworkingConfigurationProperties` +- New field `RemoteDebugEnabled` in struct `AseV3NetworkingConfigurationProperties` + + ## 1.0.0 (2022-05-16) The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. diff --git a/sdk/resourcemanager/appservice/armappservice/autorest.md b/sdk/resourcemanager/appservice/armappservice/autorest.md index 31cf4369ae07..486d16ecd8f7 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/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/web/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/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: 1.0.0 +module-version: 2.0.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_certificateorders_client.go b/sdk/resourcemanager/appservice/armappservice/certificateorders_client.go similarity index 94% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_certificateorders_client.go rename to sdk/resourcemanager/appservice/armappservice/certificateorders_client.go index df37a62af7ef..98713508d43a 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_certificateorders_client.go +++ b/sdk/resourcemanager/appservice/armappservice/certificateorders_client.go @@ -5,6 +5,7 @@ // 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 @@ -54,9 +55,9 @@ func NewCertificateOrdersClient(subscriptionID string, credential azcore.TokenCr return client, nil } -// BeginCreateOrUpdate - Create or update a certificate purchase order. +// BeginCreateOrUpdate - Description for Create or update a certificate purchase order. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -74,9 +75,9 @@ func (client *CertificateOrdersClient) BeginCreateOrUpdate(ctx context.Context, } } -// CreateOrUpdate - Create or update a certificate purchase order. +// CreateOrUpdate - Description for Create or update a certificate purchase order. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *CertificateOrdersClient) createOrUpdate(ctx context.Context, resourceGroupName string, certificateOrderName string, certificateDistinguishedName CertificateOrder, options *CertificateOrdersClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, certificateOrderName, certificateDistinguishedName, options) if err != nil { @@ -112,15 +113,15 @@ func (client *CertificateOrdersClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, certificateDistinguishedName) } -// BeginCreateOrUpdateCertificate - Creates or updates a certificate and associates with key vault secret. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order. // name - Name of the certificate. @@ -139,9 +140,9 @@ func (client *CertificateOrdersClient) BeginCreateOrUpdateCertificate(ctx contex } } -// CreateOrUpdateCertificate - Creates or updates a certificate and associates with key vault secret. +// 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 2021-03-01 +// Generated from API version 2022-03-01 func (client *CertificateOrdersClient) createOrUpdateCertificate(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, keyVaultCertificate CertificateResource, options *CertificateOrdersClientBeginCreateOrUpdateCertificateOptions) (*http.Response, error) { req, err := client.createOrUpdateCertificateCreateRequest(ctx, resourceGroupName, certificateOrderName, name, keyVaultCertificate, options) if err != nil { @@ -181,15 +182,15 @@ func (client *CertificateOrdersClient) createOrUpdateCertificateCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, keyVaultCertificate) } -// Delete - Delete an existing certificate order. +// Delete - Description for Delete an existing certificate order. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -229,15 +230,15 @@ func (client *CertificateOrdersClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteCertificate - Delete the certificate associated with a certificate order. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order. // name - Name of the certificate. @@ -282,15 +283,15 @@ func (client *CertificateOrdersClient) deleteCertificateCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// Get - Get a certificate order. +// Get - Description for Get a certificate order. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -329,7 +330,7 @@ func (client *CertificateOrdersClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -344,9 +345,9 @@ func (client *CertificateOrdersClient) getHandleResponse(resp *http.Response) (C return result, nil } -// GetCertificate - Get the certificate associated with a certificate order. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order. // name - Name of the certificate. @@ -391,7 +392,7 @@ func (client *CertificateOrdersClient) getCertificateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -406,9 +407,9 @@ func (client *CertificateOrdersClient) getCertificateHandleResponse(resp *http.R return result, nil } -// NewListPager - List all certificate orders in a subscription. +// NewListPager - Description for List all certificate orders in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - CertificateOrdersClientListOptions contains the optional parameters for the CertificateOrdersClient.List method. func (client *CertificateOrdersClient) NewListPager(options *CertificateOrdersClientListOptions) *runtime.Pager[CertificateOrdersClientListResponse] { return runtime.NewPager(runtime.PagingHandler[CertificateOrdersClientListResponse]{ @@ -450,7 +451,7 @@ func (client *CertificateOrdersClient) listCreateRequest(ctx context.Context, op return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -465,9 +466,9 @@ func (client *CertificateOrdersClient) listHandleResponse(resp *http.Response) ( return result, nil } -// NewListByResourceGroupPager - Get certificate orders in a resource group. +// NewListByResourceGroupPager - Description for Get certificate orders in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // options - CertificateOrdersClientListByResourceGroupOptions contains the optional parameters for the CertificateOrdersClient.ListByResourceGroup // method. @@ -515,7 +516,7 @@ func (client *CertificateOrdersClient) listByResourceGroupCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -530,9 +531,9 @@ func (client *CertificateOrdersClient) listByResourceGroupHandleResponse(resp *h return result, nil } -// NewListCertificatesPager - List all certificates associated with a certificate order. +// NewListCertificatesPager - Description for List all certificates associated with a certificate order. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListCertificates @@ -585,7 +586,7 @@ func (client *CertificateOrdersClient) listCertificatesCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -600,9 +601,9 @@ func (client *CertificateOrdersClient) listCertificatesHandleResponse(resp *http return result, nil } -// Reissue - Reissue an existing certificate order. +// Reissue - Description for Reissue an existing certificate order. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order. // reissueCertificateOrderRequest - Parameters for the reissue. @@ -643,15 +644,15 @@ func (client *CertificateOrdersClient) reissueCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, reissueCertificateOrderRequest) } -// Renew - Renew an existing certificate order. +// Renew - Description for Renew an existing certificate order. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order. // renewCertificateOrderRequest - Renew parameters @@ -691,15 +692,15 @@ func (client *CertificateOrdersClient) renewCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, renewCertificateOrderRequest) } -// ResendEmail - Resend certificate email. +// ResendEmail - Description for Resend certificate email. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -739,7 +740,7 @@ func (client *CertificateOrdersClient) resendEmailCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -748,7 +749,7 @@ func (client *CertificateOrdersClient) resendEmailCreateRequest(ctx context.Cont // ResendRequestEmails - Resend domain verification ownership email containing steps on how to verify a domain for a given // certificate order // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order. // nameIdentifier - Email address @@ -789,15 +790,15 @@ func (client *CertificateOrdersClient) resendRequestEmailsCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, nameIdentifier) } -// RetrieveCertificateActions - Retrieve the list of certificate actions. +// RetrieveCertificateActions - Description for Retrieve the list of certificate actions. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -837,7 +838,7 @@ func (client *CertificateOrdersClient) retrieveCertificateActionsCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -852,9 +853,9 @@ func (client *CertificateOrdersClient) retrieveCertificateActionsHandleResponse( return result, nil } -// RetrieveCertificateEmailHistory - Retrieve email history. +// RetrieveCertificateEmailHistory - Description for Retrieve email history. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -894,7 +895,7 @@ func (client *CertificateOrdersClient) retrieveCertificateEmailHistoryCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -917,7 +918,7 @@ func (client *CertificateOrdersClient) retrieveCertificateEmailHistoryHandleResp // clicks on the site seal. The site seal images are expected to be static images // 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order. // siteSealRequest - Site seal request. @@ -958,7 +959,7 @@ func (client *CertificateOrdersClient) retrieveSiteSealCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteSealRequest) @@ -973,9 +974,9 @@ func (client *CertificateOrdersClient) retrieveSiteSealHandleResponse(resp *http return result, nil } -// Update - Create or update a certificate purchase order. +// Update - Description for Create or update a certificate purchase order. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -1016,7 +1017,7 @@ func (client *CertificateOrdersClient) updateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, certificateDistinguishedName) @@ -1031,9 +1032,9 @@ func (client *CertificateOrdersClient) updateHandleResponse(resp *http.Response) return result, nil } -// UpdateCertificate - Creates or updates a certificate and associates with key vault secret. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // certificateOrderName - Name of the certificate order. // name - Name of the certificate. @@ -1079,7 +1080,7 @@ func (client *CertificateOrdersClient) updateCertificateCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, keyVaultCertificate) @@ -1094,9 +1095,9 @@ func (client *CertificateOrdersClient) updateCertificateHandleResponse(resp *htt return result, nil } -// ValidatePurchaseInformation - Validate information for a certificate order. +// ValidatePurchaseInformation - Description for Validate information for a certificate order. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // appServiceCertificateOrder - Information for a certificate order. // options - CertificateOrdersClientValidatePurchaseInformationOptions contains the optional parameters for the CertificateOrdersClient.ValidatePurchaseInformation // method. @@ -1127,15 +1128,15 @@ func (client *CertificateOrdersClient) validatePurchaseInformationCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appServiceCertificateOrder) } -// VerifyDomainOwnership - Verify domain ownership for this certificate order. +// VerifyDomainOwnership - Description for Verify domain ownership for this certificate order. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -1175,7 +1176,7 @@ func (client *CertificateOrdersClient) verifyDomainOwnershipCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_certificateordersdiagnostics_client.go b/sdk/resourcemanager/appservice/armappservice/certificateordersdiagnostics_client.go similarity index 95% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_certificateordersdiagnostics_client.go rename to sdk/resourcemanager/appservice/armappservice/certificateordersdiagnostics_client.go index 073bc1654c9b..b27294a71692 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_certificateordersdiagnostics_client.go +++ b/sdk/resourcemanager/appservice/armappservice/certificateordersdiagnostics_client.go @@ -5,6 +5,7 @@ // 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 @@ -55,10 +56,10 @@ func NewCertificateOrdersDiagnosticsClient(subscriptionID string, credential azc return client, nil } -// GetAppServiceCertificateOrderDetectorResponse - Microsoft.CertificateRegistration call to get a detector response from -// App Lens. +// GetAppServiceCertificateOrderDetectorResponse - Description for Microsoft.CertificateRegistration call to get a detector +// response from App Lens. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -112,7 +113,7 @@ func (client *CertificateOrdersDiagnosticsClient) getAppServiceCertificateOrderD if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -127,10 +128,10 @@ func (client *CertificateOrdersDiagnosticsClient) getAppServiceCertificateOrderD return result, nil } -// NewListAppServiceCertificateOrderDetectorResponsePager - Microsoft.CertificateRegistration to get the list of detectors -// for this RP. +// NewListAppServiceCertificateOrderDetectorResponsePager - Description for Microsoft.CertificateRegistration to get the list +// of detectors for this RP. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -183,7 +184,7 @@ func (client *CertificateOrdersDiagnosticsClient) listAppServiceCertificateOrder return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_certificateregistrationprovider_client.go b/sdk/resourcemanager/appservice/armappservice/certificateregistrationprovider_client.go similarity index 94% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_certificateregistrationprovider_client.go rename to sdk/resourcemanager/appservice/armappservice/certificateregistrationprovider_client.go index 5386498370f3..84bf66ce3c6d 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_certificateregistrationprovider_client.go +++ b/sdk/resourcemanager/appservice/armappservice/certificateregistrationprovider_client.go @@ -5,6 +5,7 @@ // 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 @@ -48,9 +49,10 @@ func NewCertificateRegistrationProviderClient(credential azcore.TokenCredential, return client, nil } -// NewListOperationsPager - Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider +// NewListOperationsPager - Description for Implements Csm operations Api to exposes the list of available Csm Apis under +// the resource provider // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - CertificateRegistrationProviderClientListOperationsOptions contains the optional parameters for the CertificateRegistrationProviderClient.ListOperations // method. func (client *CertificateRegistrationProviderClient) NewListOperationsPager(options *CertificateRegistrationProviderClientListOperationsOptions) *runtime.Pager[CertificateRegistrationProviderClientListOperationsResponse] { @@ -89,7 +91,7 @@ func (client *CertificateRegistrationProviderClient) listOperationsCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_certificates_client.go b/sdk/resourcemanager/appservice/armappservice/certificates_client.go similarity index 95% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_certificates_client.go rename to sdk/resourcemanager/appservice/armappservice/certificates_client.go index 51148580f807..e9623de7aa49 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_certificates_client.go +++ b/sdk/resourcemanager/appservice/armappservice/certificates_client.go @@ -5,6 +5,7 @@ // 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 @@ -54,9 +55,9 @@ func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredent return client, nil } -// CreateOrUpdate - Create or update a certificate. +// CreateOrUpdate - Description for Create or update a certificate. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -97,7 +98,7 @@ func (client *CertificatesClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, certificateEnvelope) @@ -112,9 +113,9 @@ func (client *CertificatesClient) createOrUpdateHandleResponse(resp *http.Respon return result, nil } -// Delete - Delete a certificate. +// Delete - Description for Delete a certificate. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -153,15 +154,15 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// Get - Get a certificate. +// Get - Description for Get a certificate. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -200,7 +201,7 @@ func (client *CertificatesClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -215,9 +216,9 @@ func (client *CertificatesClient) getHandleResponse(resp *http.Response) (Certif return result, nil } -// NewListPager - Get all certificates for a subscription. +// NewListPager - Description for Get all certificates for a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - CertificatesClientListOptions contains the optional parameters for the CertificatesClient.List method. func (client *CertificatesClient) NewListPager(options *CertificatesClientListOptions) *runtime.Pager[CertificatesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[CertificatesClientListResponse]{ @@ -259,7 +260,7 @@ func (client *CertificatesClient) listCreateRequest(ctx context.Context, options return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -279,9 +280,9 @@ func (client *CertificatesClient) listHandleResponse(resp *http.Response) (Certi return result, nil } -// NewListByResourceGroupPager - Get all certificates in a resource group. +// NewListByResourceGroupPager - Description for Get all certificates in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // options - CertificatesClientListByResourceGroupOptions contains the optional parameters for the CertificatesClient.ListByResourceGroup // method. @@ -329,7 +330,7 @@ func (client *CertificatesClient) listByResourceGroupCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -344,9 +345,9 @@ func (client *CertificatesClient) listByResourceGroupHandleResponse(resp *http.R return result, nil } -// Update - Create or update a certificate. +// Update - Description for Create or update a certificate. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -386,7 +387,7 @@ func (client *CertificatesClient) updateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, certificateEnvelope) diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_constants.go b/sdk/resourcemanager/appservice/armappservice/constants.go similarity index 78% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_constants.go rename to sdk/resourcemanager/appservice/armappservice/constants.go index fa583ac7a957..783fc53bb20d 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_constants.go +++ b/sdk/resourcemanager/appservice/armappservice/constants.go @@ -5,12 +5,13 @@ // 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 const ( moduleName = "armappservice" - moduleVersion = "v1.0.0" + moduleVersion = "v2.0.0" ) // ActiveRevisionsMode - ActiveRevisionsMode controls how active revisions are handled for the Container app:Multiple: multiple @@ -31,40 +32,6 @@ func PossibleActiveRevisionsModeValues() []ActiveRevisionsMode { } } -type AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem string - -const ( - AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemExpirationNotInRenewalTimeRange AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem = "ExpirationNotInRenewalTimeRange" - AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem = "RegistrationStatusNotSupportedForRenewal" - AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemSubscriptionNotActive AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem = "SubscriptionNotActive" -) - -// PossibleAppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemValues returns the possible values for the AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem const type. -func PossibleAppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemValues() []AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem { - return []AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem{ - AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemExpirationNotInRenewalTimeRange, - AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal, - AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemSubscriptionNotActive, - } -} - -type AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem string - -const ( - AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemExpirationNotInRenewalTimeRange AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem = "ExpirationNotInRenewalTimeRange" - AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem = "RegistrationStatusNotSupportedForRenewal" - AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemSubscriptionNotActive AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem = "SubscriptionNotActive" -) - -// PossibleAppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemValues returns the possible values for the AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem const type. -func PossibleAppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemValues() []AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem { - return []AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem{ - AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemExpirationNotInRenewalTimeRange, - AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal, - AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemSubscriptionNotActive, - } -} - // AppServicePlanRestrictions - App Service plans this offer is restricted to. type AppServicePlanRestrictions string @@ -552,6 +519,25 @@ func PossibleCookieExpirationConventionValues() []CookieExpirationConvention { } } +type CustomDNSSuffixProvisioningState string + +const ( + CustomDNSSuffixProvisioningStateSucceeded CustomDNSSuffixProvisioningState = "Succeeded" + CustomDNSSuffixProvisioningStateFailed CustomDNSSuffixProvisioningState = "Failed" + CustomDNSSuffixProvisioningStateDegraded CustomDNSSuffixProvisioningState = "Degraded" + CustomDNSSuffixProvisioningStateInProgress CustomDNSSuffixProvisioningState = "InProgress" +) + +// PossibleCustomDNSSuffixProvisioningStateValues returns the possible values for the CustomDNSSuffixProvisioningState const type. +func PossibleCustomDNSSuffixProvisioningStateValues() []CustomDNSSuffixProvisioningState { + return []CustomDNSSuffixProvisioningState{ + CustomDNSSuffixProvisioningStateSucceeded, + CustomDNSSuffixProvisioningStateFailed, + CustomDNSSuffixProvisioningStateDegraded, + CustomDNSSuffixProvisioningStateInProgress, + } +} + // CustomDomainStatus - The status of the custom domain type CustomDomainStatus string @@ -561,6 +547,7 @@ const ( CustomDomainStatusFailed CustomDomainStatus = "Failed" CustomDomainStatusReady CustomDomainStatus = "Ready" CustomDomainStatusRetrievingValidationToken CustomDomainStatus = "RetrievingValidationToken" + CustomDomainStatusUnhealthy CustomDomainStatus = "Unhealthy" CustomDomainStatusValidating CustomDomainStatus = "Validating" ) @@ -572,6 +559,7 @@ func PossibleCustomDomainStatusValues() []CustomDomainStatus { CustomDomainStatusFailed, CustomDomainStatusReady, CustomDomainStatusRetrievingValidationToken, + CustomDomainStatusUnhealthy, CustomDomainStatusValidating, } } @@ -646,55 +634,110 @@ func PossibleDatabaseTypeValues() []DatabaseType { } } -// DetectorType - Whether this detector is an Analysis Detector or not. -type DetectorType string +// DayOfWeek - The day of the week. +type DayOfWeek string const ( - DetectorTypeDetector DetectorType = "Detector" - DetectorTypeAnalysis DetectorType = "Analysis" - DetectorTypeCategoryOverview DetectorType = "CategoryOverview" + DayOfWeekSunday DayOfWeek = "Sunday" + DayOfWeekMonday DayOfWeek = "Monday" + DayOfWeekTuesday DayOfWeek = "Tuesday" + DayOfWeekWednesday DayOfWeek = "Wednesday" + DayOfWeekThursday DayOfWeek = "Thursday" + DayOfWeekFriday DayOfWeek = "Friday" + DayOfWeekSaturday DayOfWeek = "Saturday" ) -// PossibleDetectorTypeValues returns the possible values for the DetectorType const type. -func PossibleDetectorTypeValues() []DetectorType { - return []DetectorType{ - DetectorTypeDetector, - DetectorTypeAnalysis, - DetectorTypeCategoryOverview, +// PossibleDayOfWeekValues returns the possible values for the DayOfWeek const type. +func PossibleDayOfWeekValues() []DayOfWeek { + return []DayOfWeek{ + DayOfWeekSunday, + DayOfWeekMonday, + DayOfWeekTuesday, + DayOfWeekWednesday, + DayOfWeekThursday, + DayOfWeekFriday, + DayOfWeekSaturday, } } -type DomainPatchResourcePropertiesDomainNotRenewableReasonsItem string +type DaysOfWeek string const ( - DomainPatchResourcePropertiesDomainNotRenewableReasonsItemExpirationNotInRenewalTimeRange DomainPatchResourcePropertiesDomainNotRenewableReasonsItem = "ExpirationNotInRenewalTimeRange" - DomainPatchResourcePropertiesDomainNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal DomainPatchResourcePropertiesDomainNotRenewableReasonsItem = "RegistrationStatusNotSupportedForRenewal" - DomainPatchResourcePropertiesDomainNotRenewableReasonsItemSubscriptionNotActive DomainPatchResourcePropertiesDomainNotRenewableReasonsItem = "SubscriptionNotActive" + DaysOfWeekSunday DaysOfWeek = "Sunday" + DaysOfWeekMonday DaysOfWeek = "Monday" + DaysOfWeekTuesday DaysOfWeek = "Tuesday" + DaysOfWeekWednesday DaysOfWeek = "Wednesday" + DaysOfWeekThursday DaysOfWeek = "Thursday" + DaysOfWeekFriday DaysOfWeek = "Friday" + DaysOfWeekSaturday DaysOfWeek = "Saturday" ) -// PossibleDomainPatchResourcePropertiesDomainNotRenewableReasonsItemValues returns the possible values for the DomainPatchResourcePropertiesDomainNotRenewableReasonsItem const type. -func PossibleDomainPatchResourcePropertiesDomainNotRenewableReasonsItemValues() []DomainPatchResourcePropertiesDomainNotRenewableReasonsItem { - return []DomainPatchResourcePropertiesDomainNotRenewableReasonsItem{ - DomainPatchResourcePropertiesDomainNotRenewableReasonsItemExpirationNotInRenewalTimeRange, - DomainPatchResourcePropertiesDomainNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal, - DomainPatchResourcePropertiesDomainNotRenewableReasonsItemSubscriptionNotActive, +// PossibleDaysOfWeekValues returns the possible values for the DaysOfWeek const type. +func PossibleDaysOfWeekValues() []DaysOfWeek { + return []DaysOfWeek{ + DaysOfWeekSunday, + DaysOfWeekMonday, + DaysOfWeekTuesday, + DaysOfWeekWednesday, + DaysOfWeekThursday, + DaysOfWeekFriday, + DaysOfWeekSaturday, } } -type DomainPropertiesDomainNotRenewableReasonsItem string +// DeploymentBuildStatus - Deployment build status. +type DeploymentBuildStatus string const ( - DomainPropertiesDomainNotRenewableReasonsItemExpirationNotInRenewalTimeRange DomainPropertiesDomainNotRenewableReasonsItem = "ExpirationNotInRenewalTimeRange" - DomainPropertiesDomainNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal DomainPropertiesDomainNotRenewableReasonsItem = "RegistrationStatusNotSupportedForRenewal" - DomainPropertiesDomainNotRenewableReasonsItemSubscriptionNotActive DomainPropertiesDomainNotRenewableReasonsItem = "SubscriptionNotActive" + DeploymentBuildStatusBuildAborted DeploymentBuildStatus = "BuildAborted" + DeploymentBuildStatusBuildFailed DeploymentBuildStatus = "BuildFailed" + DeploymentBuildStatusBuildInProgress DeploymentBuildStatus = "BuildInProgress" + DeploymentBuildStatusBuildPending DeploymentBuildStatus = "BuildPending" + DeploymentBuildStatusBuildRequestReceived DeploymentBuildStatus = "BuildRequestReceived" + DeploymentBuildStatusBuildSuccessful DeploymentBuildStatus = "BuildSuccessful" + DeploymentBuildStatusPostBuildRestartRequired DeploymentBuildStatus = "PostBuildRestartRequired" + DeploymentBuildStatusRuntimeFailed DeploymentBuildStatus = "RuntimeFailed" + DeploymentBuildStatusRuntimeStarting DeploymentBuildStatus = "RuntimeStarting" + DeploymentBuildStatusRuntimeSuccessful DeploymentBuildStatus = "RuntimeSuccessful" + DeploymentBuildStatusStartPolling DeploymentBuildStatus = "StartPolling" + DeploymentBuildStatusStartPollingWithRestart DeploymentBuildStatus = "StartPollingWithRestart" + DeploymentBuildStatusTimedOut DeploymentBuildStatus = "TimedOut" ) -// PossibleDomainPropertiesDomainNotRenewableReasonsItemValues returns the possible values for the DomainPropertiesDomainNotRenewableReasonsItem const type. -func PossibleDomainPropertiesDomainNotRenewableReasonsItemValues() []DomainPropertiesDomainNotRenewableReasonsItem { - return []DomainPropertiesDomainNotRenewableReasonsItem{ - DomainPropertiesDomainNotRenewableReasonsItemExpirationNotInRenewalTimeRange, - DomainPropertiesDomainNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal, - DomainPropertiesDomainNotRenewableReasonsItemSubscriptionNotActive, +// PossibleDeploymentBuildStatusValues returns the possible values for the DeploymentBuildStatus const type. +func PossibleDeploymentBuildStatusValues() []DeploymentBuildStatus { + return []DeploymentBuildStatus{ + DeploymentBuildStatusBuildAborted, + DeploymentBuildStatusBuildFailed, + DeploymentBuildStatusBuildInProgress, + DeploymentBuildStatusBuildPending, + DeploymentBuildStatusBuildRequestReceived, + DeploymentBuildStatusBuildSuccessful, + DeploymentBuildStatusPostBuildRestartRequired, + DeploymentBuildStatusRuntimeFailed, + DeploymentBuildStatusRuntimeStarting, + DeploymentBuildStatusRuntimeSuccessful, + DeploymentBuildStatusStartPolling, + DeploymentBuildStatusStartPollingWithRestart, + DeploymentBuildStatusTimedOut, + } +} + +// DetectorType - Whether this detector is an Analysis Detector or not. +type DetectorType string + +const ( + DetectorTypeDetector DetectorType = "Detector" + DetectorTypeAnalysis DetectorType = "Analysis" + DetectorTypeCategoryOverview DetectorType = "CategoryOverview" +) + +// PossibleDetectorTypeValues returns the possible values for the DetectorType const type. +func PossibleDetectorTypeValues() []DetectorType { + return []DetectorType{ + DetectorTypeDetector, + DetectorTypeAnalysis, + DetectorTypeCategoryOverview, } } @@ -789,14 +832,33 @@ func PossibleEnterpriseGradeCdnStatusValues() []EnterpriseGradeCdnStatus { } } +type Enum14 string + +const ( + Enum14All Enum14 = "All" + Enum14Linux Enum14 = "Linux" + Enum14LinuxFunctions Enum14 = "LinuxFunctions" + Enum14Windows Enum14 = "Windows" + Enum14WindowsFunctions Enum14 = "WindowsFunctions" +) + +// PossibleEnum14Values returns the possible values for the Enum14 const type. +func PossibleEnum14Values() []Enum14 { + return []Enum14{ + Enum14All, + Enum14Linux, + Enum14LinuxFunctions, + Enum14Windows, + Enum14WindowsFunctions, + } +} + type Enum15 string const ( - Enum15All Enum15 = "All" - Enum15Linux Enum15 = "Linux" - Enum15LinuxFunctions Enum15 = "LinuxFunctions" - Enum15Windows Enum15 = "Windows" - Enum15WindowsFunctions Enum15 = "WindowsFunctions" + Enum15All Enum15 = "All" + Enum15Linux Enum15 = "Linux" + Enum15Windows Enum15 = "Windows" ) // PossibleEnum15Values returns the possible values for the Enum15 const type. @@ -804,9 +866,7 @@ func PossibleEnum15Values() []Enum15 { return []Enum15{ Enum15All, Enum15Linux, - Enum15LinuxFunctions, Enum15Windows, - Enum15WindowsFunctions, } } @@ -864,9 +924,11 @@ func PossibleEnum18Values() []Enum18 { type Enum19 string const ( - Enum19All Enum19 = "All" - Enum19Linux Enum19 = "Linux" - Enum19Windows Enum19 = "Windows" + Enum19All Enum19 = "All" + Enum19Linux Enum19 = "Linux" + Enum19LinuxFunctions Enum19 = "LinuxFunctions" + Enum19Windows Enum19 = "Windows" + Enum19WindowsFunctions Enum19 = "WindowsFunctions" ) // PossibleEnum19Values returns the possible values for the Enum19 const type. @@ -874,28 +936,9 @@ func PossibleEnum19Values() []Enum19 { return []Enum19{ Enum19All, Enum19Linux, + Enum19LinuxFunctions, Enum19Windows, - } -} - -type Enum20 string - -const ( - Enum20All Enum20 = "All" - Enum20Linux Enum20 = "Linux" - Enum20LinuxFunctions Enum20 = "LinuxFunctions" - Enum20Windows Enum20 = "Windows" - Enum20WindowsFunctions Enum20 = "WindowsFunctions" -) - -// PossibleEnum20Values returns the possible values for the Enum20 const type. -func PossibleEnum20Values() []Enum20 { - return []Enum20{ - Enum20All, - Enum20Linux, - Enum20LinuxFunctions, - Enum20Windows, - Enum20WindowsFunctions, + Enum19WindowsFunctions, } } @@ -1122,6 +1165,24 @@ func PossibleIssueTypeValues() []IssueType { } } +// KeyType - The key type. +type KeyType string + +const ( + KeyTypeNotSpecified KeyType = "NotSpecified" + KeyTypePrimary KeyType = "Primary" + KeyTypeSecondary KeyType = "Secondary" +) + +// PossibleKeyTypeValues returns the possible values for the KeyType const type. +func PossibleKeyTypeValues() []KeyType { + return []KeyType{ + KeyTypeNotSpecified, + KeyTypePrimary, + KeyTypeSecondary, + } +} + // KeyVaultSecretStatus - Status of the Key Vault secret. type KeyVaultSecretStatus string @@ -1156,6 +1217,22 @@ func PossibleKeyVaultSecretStatusValues() []KeyVaultSecretStatus { } } +// Kind - The workflow kind. +type Kind string + +const ( + KindStateful Kind = "Stateful" + KindStateless Kind = "Stateless" +) + +// PossibleKindValues returns the possible values for the Kind const type. +func PossibleKindValues() []Kind { + return []Kind{ + KindStateful, + KindStateless, + } +} + // KubeEnvironmentProvisioningState - Provisioning state of the Kubernetes Environment. type KubeEnvironmentProvisioningState string @@ -1342,6 +1419,20 @@ func PossibleNotificationLevelValues() []NotificationLevel { } } +// OpenAuthenticationProviderType - Open authentication policy provider type. +type OpenAuthenticationProviderType string + +const ( + OpenAuthenticationProviderTypeAAD OpenAuthenticationProviderType = "AAD" +) + +// PossibleOpenAuthenticationProviderTypeValues returns the possible values for the OpenAuthenticationProviderType const type. +func PossibleOpenAuthenticationProviderTypeValues() []OpenAuthenticationProviderType { + return []OpenAuthenticationProviderType{ + OpenAuthenticationProviderTypeAAD, + } +} + // OperationStatus - The current status of the operation. type OperationStatus string @@ -1364,6 +1455,36 @@ func PossibleOperationStatusValues() []OperationStatus { } } +// ParameterType - The parameter type. +type ParameterType string + +const ( + ParameterTypeArray ParameterType = "Array" + ParameterTypeBool ParameterType = "Bool" + ParameterTypeFloat ParameterType = "Float" + ParameterTypeInt ParameterType = "Int" + ParameterTypeNotSpecified ParameterType = "NotSpecified" + ParameterTypeObject ParameterType = "Object" + ParameterTypeSecureObject ParameterType = "SecureObject" + ParameterTypeSecureString ParameterType = "SecureString" + ParameterTypeString ParameterType = "String" +) + +// PossibleParameterTypeValues returns the possible values for the ParameterType const type. +func PossibleParameterTypeValues() []ParameterType { + return []ParameterType{ + ParameterTypeArray, + ParameterTypeBool, + ParameterTypeFloat, + ParameterTypeInt, + ParameterTypeNotSpecified, + ParameterTypeObject, + ParameterTypeSecureObject, + ParameterTypeSecureString, + ParameterTypeString, + } +} + // ProvisioningState - Status of certificate order. type ProvisioningState string @@ -1422,6 +1543,34 @@ func PossiblePublishingProfileFormatValues() []PublishingProfileFormat { } } +// RecurrenceFrequency - The recurrence frequency. +type RecurrenceFrequency string + +const ( + RecurrenceFrequencyDay RecurrenceFrequency = "Day" + RecurrenceFrequencyHour RecurrenceFrequency = "Hour" + RecurrenceFrequencyMinute RecurrenceFrequency = "Minute" + RecurrenceFrequencyMonth RecurrenceFrequency = "Month" + RecurrenceFrequencyNotSpecified RecurrenceFrequency = "NotSpecified" + RecurrenceFrequencySecond RecurrenceFrequency = "Second" + RecurrenceFrequencyWeek RecurrenceFrequency = "Week" + RecurrenceFrequencyYear RecurrenceFrequency = "Year" +) + +// PossibleRecurrenceFrequencyValues returns the possible values for the RecurrenceFrequency const type. +func PossibleRecurrenceFrequencyValues() []RecurrenceFrequency { + return []RecurrenceFrequency{ + RecurrenceFrequencyDay, + RecurrenceFrequencyHour, + RecurrenceFrequencyMinute, + RecurrenceFrequencyMonth, + RecurrenceFrequencyNotSpecified, + RecurrenceFrequencySecond, + RecurrenceFrequencyWeek, + RecurrenceFrequencyYear, + } +} + // RedundancyMode - Site redundancy mode type RedundancyMode string @@ -1539,6 +1688,23 @@ func PossibleResolveStatusValues() []ResolveStatus { } } +type ResourceNotRenewableReason string + +const ( + ResourceNotRenewableReasonExpirationNotInRenewalTimeRange ResourceNotRenewableReason = "ExpirationNotInRenewalTimeRange" + ResourceNotRenewableReasonRegistrationStatusNotSupportedForRenewal ResourceNotRenewableReason = "RegistrationStatusNotSupportedForRenewal" + ResourceNotRenewableReasonSubscriptionNotActive ResourceNotRenewableReason = "SubscriptionNotActive" +) + +// PossibleResourceNotRenewableReasonValues returns the possible values for the ResourceNotRenewableReason const type. +func PossibleResourceNotRenewableReasonValues() []ResourceNotRenewableReason { + return []ResourceNotRenewableReason{ + ResourceNotRenewableReasonExpirationNotInRenewalTimeRange, + ResourceNotRenewableReasonRegistrationStatusNotSupportedForRenewal, + ResourceNotRenewableReasonSubscriptionNotActive, + } +} + // ResourceScopeType - Name of a resource type this recommendation applies, e.g. Subscription, ServerFarm, Site. type ResourceScopeType string @@ -1959,6 +2125,51 @@ func PossibleUnauthenticatedClientActionV2Values() []UnauthenticatedClientAction } } +// UpgradeAvailability - Whether an upgrade is available for this App Service Environment. +type UpgradeAvailability string + +const ( + // UpgradeAvailabilityNone - No upgrade is currently available for this App Service Environment + UpgradeAvailabilityNone UpgradeAvailability = "None" + // UpgradeAvailabilityReady - An upgrade is ready to be manually initiated on this App Service Environment + UpgradeAvailabilityReady UpgradeAvailability = "Ready" +) + +// PossibleUpgradeAvailabilityValues returns the possible values for the UpgradeAvailability const type. +func PossibleUpgradeAvailabilityValues() []UpgradeAvailability { + return []UpgradeAvailability{ + UpgradeAvailabilityNone, + UpgradeAvailabilityReady, + } +} + +// UpgradePreference - Upgrade Preference +type UpgradePreference string + +const ( + // UpgradePreferenceEarly - This App Service Environment will be upgraded before others in the same region that have Upgrade + // Preference 'Late' + UpgradePreferenceEarly UpgradePreference = "Early" + // UpgradePreferenceLate - This App Service Environment will be upgraded after others in the same region that have Upgrade + // Preference 'Early' + UpgradePreferenceLate UpgradePreference = "Late" + // UpgradePreferenceManual - ASEv3 only. Once an upgrade is available, this App Service Environment will wait 10 days for + // the upgrade to be manually initiated. After 10 days the upgrade will begin automatically + UpgradePreferenceManual UpgradePreference = "Manual" + // UpgradePreferenceNone - No preference on when this App Service Environment will be upgraded + UpgradePreferenceNone UpgradePreference = "None" +) + +// PossibleUpgradePreferenceValues returns the possible values for the UpgradePreference const type. +func PossibleUpgradePreferenceValues() []UpgradePreference { + return []UpgradePreference{ + UpgradePreferenceEarly, + UpgradePreferenceLate, + UpgradePreferenceManual, + UpgradePreferenceNone, + } +} + // UsageState - State indicating whether the app has exceeded its quota usage. Read-only. type UsageState string @@ -2044,3 +2255,193 @@ func PossibleWorkerSizeOptionsValues() []WorkerSizeOptions { WorkerSizeOptionsDefault, } } + +// WorkflowProvisioningState - The workflow provisioning state. +type WorkflowProvisioningState string + +const ( + WorkflowProvisioningStateAccepted WorkflowProvisioningState = "Accepted" + WorkflowProvisioningStateCanceled WorkflowProvisioningState = "Canceled" + WorkflowProvisioningStateCompleted WorkflowProvisioningState = "Completed" + WorkflowProvisioningStateCreated WorkflowProvisioningState = "Created" + WorkflowProvisioningStateCreating WorkflowProvisioningState = "Creating" + WorkflowProvisioningStateDeleted WorkflowProvisioningState = "Deleted" + WorkflowProvisioningStateDeleting WorkflowProvisioningState = "Deleting" + WorkflowProvisioningStateFailed WorkflowProvisioningState = "Failed" + WorkflowProvisioningStateInProgress WorkflowProvisioningState = "InProgress" + WorkflowProvisioningStateMoving WorkflowProvisioningState = "Moving" + WorkflowProvisioningStateNotSpecified WorkflowProvisioningState = "NotSpecified" + WorkflowProvisioningStatePending WorkflowProvisioningState = "Pending" + WorkflowProvisioningStateReady WorkflowProvisioningState = "Ready" + WorkflowProvisioningStateRegistered WorkflowProvisioningState = "Registered" + WorkflowProvisioningStateRegistering WorkflowProvisioningState = "Registering" + WorkflowProvisioningStateRenewing WorkflowProvisioningState = "Renewing" + WorkflowProvisioningStateRunning WorkflowProvisioningState = "Running" + WorkflowProvisioningStateSucceeded WorkflowProvisioningState = "Succeeded" + WorkflowProvisioningStateUnregistered WorkflowProvisioningState = "Unregistered" + WorkflowProvisioningStateUnregistering WorkflowProvisioningState = "Unregistering" + WorkflowProvisioningStateUpdating WorkflowProvisioningState = "Updating" + WorkflowProvisioningStateWaiting WorkflowProvisioningState = "Waiting" +) + +// PossibleWorkflowProvisioningStateValues returns the possible values for the WorkflowProvisioningState const type. +func PossibleWorkflowProvisioningStateValues() []WorkflowProvisioningState { + return []WorkflowProvisioningState{ + WorkflowProvisioningStateAccepted, + WorkflowProvisioningStateCanceled, + WorkflowProvisioningStateCompleted, + WorkflowProvisioningStateCreated, + WorkflowProvisioningStateCreating, + WorkflowProvisioningStateDeleted, + WorkflowProvisioningStateDeleting, + WorkflowProvisioningStateFailed, + WorkflowProvisioningStateInProgress, + WorkflowProvisioningStateMoving, + WorkflowProvisioningStateNotSpecified, + WorkflowProvisioningStatePending, + WorkflowProvisioningStateReady, + WorkflowProvisioningStateRegistered, + WorkflowProvisioningStateRegistering, + WorkflowProvisioningStateRenewing, + WorkflowProvisioningStateRunning, + WorkflowProvisioningStateSucceeded, + WorkflowProvisioningStateUnregistered, + WorkflowProvisioningStateUnregistering, + WorkflowProvisioningStateUpdating, + WorkflowProvisioningStateWaiting, + } +} + +// WorkflowSKUName - The sku name. +type WorkflowSKUName string + +const ( + WorkflowSKUNameBasic WorkflowSKUName = "Basic" + WorkflowSKUNameFree WorkflowSKUName = "Free" + WorkflowSKUNameNotSpecified WorkflowSKUName = "NotSpecified" + WorkflowSKUNamePremium WorkflowSKUName = "Premium" + WorkflowSKUNameShared WorkflowSKUName = "Shared" + WorkflowSKUNameStandard WorkflowSKUName = "Standard" +) + +// PossibleWorkflowSKUNameValues returns the possible values for the WorkflowSKUName const type. +func PossibleWorkflowSKUNameValues() []WorkflowSKUName { + return []WorkflowSKUName{ + WorkflowSKUNameBasic, + WorkflowSKUNameFree, + WorkflowSKUNameNotSpecified, + WorkflowSKUNamePremium, + WorkflowSKUNameShared, + WorkflowSKUNameStandard, + } +} + +// WorkflowState - The workflow state. +type WorkflowState string + +const ( + WorkflowStateCompleted WorkflowState = "Completed" + 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{ + WorkflowStateCompleted, + WorkflowStateDeleted, + WorkflowStateDisabled, + WorkflowStateEnabled, + WorkflowStateNotSpecified, + WorkflowStateSuspended, + } +} + +// WorkflowStatus - The workflow status. +type WorkflowStatus string + +const ( + WorkflowStatusAborted WorkflowStatus = "Aborted" + WorkflowStatusCancelled WorkflowStatus = "Cancelled" + WorkflowStatusFailed WorkflowStatus = "Failed" + WorkflowStatusFaulted WorkflowStatus = "Faulted" + WorkflowStatusIgnored WorkflowStatus = "Ignored" + WorkflowStatusNotSpecified WorkflowStatus = "NotSpecified" + WorkflowStatusPaused WorkflowStatus = "Paused" + WorkflowStatusRunning WorkflowStatus = "Running" + WorkflowStatusSkipped WorkflowStatus = "Skipped" + WorkflowStatusSucceeded WorkflowStatus = "Succeeded" + WorkflowStatusSuspended WorkflowStatus = "Suspended" + WorkflowStatusTimedOut WorkflowStatus = "TimedOut" + WorkflowStatusWaiting WorkflowStatus = "Waiting" +) + +// PossibleWorkflowStatusValues returns the possible values for the WorkflowStatus const type. +func PossibleWorkflowStatusValues() []WorkflowStatus { + return []WorkflowStatus{ + WorkflowStatusAborted, + WorkflowStatusCancelled, + WorkflowStatusFailed, + WorkflowStatusFaulted, + WorkflowStatusIgnored, + WorkflowStatusNotSpecified, + WorkflowStatusPaused, + WorkflowStatusRunning, + WorkflowStatusSkipped, + WorkflowStatusSucceeded, + WorkflowStatusSuspended, + WorkflowStatusTimedOut, + WorkflowStatusWaiting, + } +} + +// WorkflowTriggerProvisioningState - The workflow trigger provisioning state. +type WorkflowTriggerProvisioningState string + +const ( + WorkflowTriggerProvisioningStateAccepted WorkflowTriggerProvisioningState = "Accepted" + WorkflowTriggerProvisioningStateCanceled WorkflowTriggerProvisioningState = "Canceled" + WorkflowTriggerProvisioningStateCompleted WorkflowTriggerProvisioningState = "Completed" + WorkflowTriggerProvisioningStateCreated WorkflowTriggerProvisioningState = "Created" + WorkflowTriggerProvisioningStateCreating WorkflowTriggerProvisioningState = "Creating" + WorkflowTriggerProvisioningStateDeleted WorkflowTriggerProvisioningState = "Deleted" + WorkflowTriggerProvisioningStateDeleting WorkflowTriggerProvisioningState = "Deleting" + WorkflowTriggerProvisioningStateFailed WorkflowTriggerProvisioningState = "Failed" + WorkflowTriggerProvisioningStateMoving WorkflowTriggerProvisioningState = "Moving" + WorkflowTriggerProvisioningStateNotSpecified WorkflowTriggerProvisioningState = "NotSpecified" + WorkflowTriggerProvisioningStateReady WorkflowTriggerProvisioningState = "Ready" + WorkflowTriggerProvisioningStateRegistered WorkflowTriggerProvisioningState = "Registered" + WorkflowTriggerProvisioningStateRegistering WorkflowTriggerProvisioningState = "Registering" + WorkflowTriggerProvisioningStateRunning WorkflowTriggerProvisioningState = "Running" + WorkflowTriggerProvisioningStateSucceeded WorkflowTriggerProvisioningState = "Succeeded" + WorkflowTriggerProvisioningStateUnregistered WorkflowTriggerProvisioningState = "Unregistered" + WorkflowTriggerProvisioningStateUnregistering WorkflowTriggerProvisioningState = "Unregistering" + WorkflowTriggerProvisioningStateUpdating WorkflowTriggerProvisioningState = "Updating" +) + +// PossibleWorkflowTriggerProvisioningStateValues returns the possible values for the WorkflowTriggerProvisioningState const type. +func PossibleWorkflowTriggerProvisioningStateValues() []WorkflowTriggerProvisioningState { + return []WorkflowTriggerProvisioningState{ + WorkflowTriggerProvisioningStateAccepted, + WorkflowTriggerProvisioningStateCanceled, + WorkflowTriggerProvisioningStateCompleted, + WorkflowTriggerProvisioningStateCreated, + WorkflowTriggerProvisioningStateCreating, + WorkflowTriggerProvisioningStateDeleted, + WorkflowTriggerProvisioningStateDeleting, + WorkflowTriggerProvisioningStateFailed, + WorkflowTriggerProvisioningStateMoving, + WorkflowTriggerProvisioningStateNotSpecified, + WorkflowTriggerProvisioningStateReady, + WorkflowTriggerProvisioningStateRegistered, + WorkflowTriggerProvisioningStateRegistering, + WorkflowTriggerProvisioningStateRunning, + WorkflowTriggerProvisioningStateSucceeded, + WorkflowTriggerProvisioningStateUnregistered, + WorkflowTriggerProvisioningStateUnregistering, + WorkflowTriggerProvisioningStateUpdating, + } +} diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_containerapps_client.go b/sdk/resourcemanager/appservice/armappservice/containerapps_client.go similarity index 95% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_containerapps_client.go rename to sdk/resourcemanager/appservice/armappservice/containerapps_client.go index b9a4204879ce..6474a87afa89 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_containerapps_client.go +++ b/sdk/resourcemanager/appservice/armappservice/containerapps_client.go @@ -5,6 +5,7 @@ // 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 @@ -54,9 +55,9 @@ func NewContainerAppsClient(subscriptionID string, credential azcore.TokenCreden return client, nil } -// BeginCreateOrUpdate - Create or update a Container App. +// BeginCreateOrUpdate - Description for Create or update a Container App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -73,9 +74,9 @@ func (client *ContainerAppsClient) BeginCreateOrUpdate(ctx context.Context, reso } } -// CreateOrUpdate - Create or update a Container App. +// CreateOrUpdate - Description for Create or update a Container App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *ContainerAppsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, containerAppEnvelope ContainerApp, options *ContainerAppsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, containerAppEnvelope, options) if err != nil { @@ -111,15 +112,15 @@ func (client *ContainerAppsClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, containerAppEnvelope) } -// BeginDelete - Delete a Container App. +// BeginDelete - Description for Delete a Container App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -136,9 +137,9 @@ func (client *ContainerAppsClient) BeginDelete(ctx context.Context, resourceGrou } } -// Delete - Delete a Container App. +// Delete - Description for Delete a Container App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *ContainerAppsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, options *ContainerAppsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { @@ -174,7 +175,7 @@ func (client *ContainerAppsClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -182,7 +183,7 @@ 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -221,7 +222,7 @@ func (client *ContainerAppsClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -238,7 +239,7 @@ func (client *ContainerAppsClient) getHandleResponse(resp *http.Response) (Conta // NewListByResourceGroupPager - Get the Container Apps in a given resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // options - ContainerAppsClientListByResourceGroupOptions contains the optional parameters for the ContainerAppsClient.ListByResourceGroup // method. @@ -286,7 +287,7 @@ func (client *ContainerAppsClient) listByResourceGroupCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -303,7 +304,7 @@ func (client *ContainerAppsClient) listByResourceGroupHandleResponse(resp *http. // NewListBySubscriptionPager - Get the Container Apps in a given subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - ContainerAppsClientListBySubscriptionOptions contains the optional parameters for the ContainerAppsClient.ListBySubscription // method. func (client *ContainerAppsClient) NewListBySubscriptionPager(options *ContainerAppsClientListBySubscriptionOptions) *runtime.Pager[ContainerAppsClientListBySubscriptionResponse] { @@ -346,7 +347,7 @@ func (client *ContainerAppsClient) listBySubscriptionCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -363,7 +364,7 @@ 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 2021-03-01 +// Generated from API version 2022-03-01 // name - Name of the Container App. // options - ContainerAppsClientListSecretsOptions contains the optional parameters for the ContainerAppsClient.ListSecrets // method. @@ -398,7 +399,7 @@ func (client *ContainerAppsClient) listSecretsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_containerappsrevisions_client.go b/sdk/resourcemanager/appservice/armappservice/containerappsrevisions_client.go similarity index 97% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_containerappsrevisions_client.go rename to sdk/resourcemanager/appservice/armappservice/containerappsrevisions_client.go index 66dc6d34c90a..f1ee042148b8 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_containerappsrevisions_client.go +++ b/sdk/resourcemanager/appservice/armappservice/containerappsrevisions_client.go @@ -5,6 +5,7 @@ // 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 @@ -56,7 +57,7 @@ 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -101,7 +102,7 @@ func (client *ContainerAppsRevisionsClient) activateRevisionCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -109,7 +110,7 @@ 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -154,7 +155,7 @@ func (client *ContainerAppsRevisionsClient) deactivateRevisionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -162,7 +163,7 @@ 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -207,7 +208,7 @@ func (client *ContainerAppsRevisionsClient) getRevisionCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -224,7 +225,7 @@ func (client *ContainerAppsRevisionsClient) getRevisionHandleResponse(resp *http // NewListRevisionsPager - Get the Revisions for a given Container App. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListRevisions @@ -277,7 +278,7 @@ func (client *ContainerAppsRevisionsClient) listRevisionsCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -294,7 +295,7 @@ 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -339,7 +340,7 @@ func (client *ContainerAppsRevisionsClient) restartRevisionCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_deletedwebapps_client.go b/sdk/resourcemanager/appservice/armappservice/deletedwebapps_client.go similarity index 95% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_deletedwebapps_client.go rename to sdk/resourcemanager/appservice/armappservice/deletedwebapps_client.go index 69db1acad472..ae12a542b18a 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_deletedwebapps_client.go +++ b/sdk/resourcemanager/appservice/armappservice/deletedwebapps_client.go @@ -5,6 +5,7 @@ // 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 @@ -54,9 +55,9 @@ func NewDeletedWebAppsClient(subscriptionID string, credential azcore.TokenCrede return client, nil } -// GetDeletedWebAppByLocation - Get deleted app for a subscription at location. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // deletedSiteID - The numeric ID of the deleted app, e.g. 12345 // options - DeletedWebAppsClientGetDeletedWebAppByLocationOptions contains the optional parameters for the DeletedWebAppsClient.GetDeletedWebAppByLocation // method. @@ -95,7 +96,7 @@ func (client *DeletedWebAppsClient) getDeletedWebAppByLocationCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -110,9 +111,9 @@ func (client *DeletedWebAppsClient) getDeletedWebAppByLocationHandleResponse(res return result, nil } -// NewListPager - Get all deleted apps for a subscription. +// NewListPager - Description for Get all deleted apps for a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - DeletedWebAppsClientListOptions contains the optional parameters for the DeletedWebAppsClient.List method. func (client *DeletedWebAppsClient) NewListPager(options *DeletedWebAppsClientListOptions) *runtime.Pager[DeletedWebAppsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[DeletedWebAppsClientListResponse]{ @@ -154,7 +155,7 @@ func (client *DeletedWebAppsClient) listCreateRequest(ctx context.Context, optio return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -169,9 +170,9 @@ func (client *DeletedWebAppsClient) listHandleResponse(resp *http.Response) (Del return result, nil } -// NewListByLocationPager - Get all deleted apps for a subscription at location +// NewListByLocationPager - Description for Get all deleted apps for a subscription at location // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - DeletedWebAppsClientListByLocationOptions contains the optional parameters for the DeletedWebAppsClient.ListByLocation // method. func (client *DeletedWebAppsClient) NewListByLocationPager(location string, options *DeletedWebAppsClientListByLocationOptions) *runtime.Pager[DeletedWebAppsClientListByLocationResponse] { @@ -218,7 +219,7 @@ func (client *DeletedWebAppsClient) listByLocationCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_diagnostics_client.go b/sdk/resourcemanager/appservice/armappservice/diagnostics_client.go similarity index 96% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_diagnostics_client.go rename to sdk/resourcemanager/appservice/armappservice/diagnostics_client.go index e932095b1739..2dec58fc86a4 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_diagnostics_client.go +++ b/sdk/resourcemanager/appservice/armappservice/diagnostics_client.go @@ -5,6 +5,7 @@ // 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 @@ -55,9 +56,9 @@ func NewDiagnosticsClient(subscriptionID string, credential azcore.TokenCredenti return client, nil } -// ExecuteSiteAnalysis - Execute Analysis +// ExecuteSiteAnalysis - Description for Execute Analysis // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Category Name @@ -116,7 +117,7 @@ func (client *DiagnosticsClient) executeSiteAnalysisCreateRequest(ctx context.Co if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -131,9 +132,9 @@ func (client *DiagnosticsClient) executeSiteAnalysisHandleResponse(resp *http.Re return result, nil } -// ExecuteSiteAnalysisSlot - Execute Analysis +// ExecuteSiteAnalysisSlot - Description for Execute Analysis // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Category Name @@ -197,7 +198,7 @@ func (client *DiagnosticsClient) executeSiteAnalysisSlotCreateRequest(ctx contex if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -212,9 +213,9 @@ func (client *DiagnosticsClient) executeSiteAnalysisSlotHandleResponse(resp *htt return result, nil } -// ExecuteSiteDetector - Execute Detector +// ExecuteSiteDetector - Description for Execute Detector // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // detectorName - Detector Resource Name @@ -273,7 +274,7 @@ func (client *DiagnosticsClient) executeSiteDetectorCreateRequest(ctx context.Co if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -288,9 +289,9 @@ func (client *DiagnosticsClient) executeSiteDetectorHandleResponse(resp *http.Re return result, nil } -// ExecuteSiteDetectorSlot - Execute Detector +// ExecuteSiteDetectorSlot - Description for Execute Detector // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // detectorName - Detector Resource Name @@ -354,7 +355,7 @@ func (client *DiagnosticsClient) executeSiteDetectorSlotCreateRequest(ctx contex if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -369,9 +370,9 @@ func (client *DiagnosticsClient) executeSiteDetectorSlotHandleResponse(resp *htt return result, nil } -// GetHostingEnvironmentDetectorResponse - Get Hosting Environment Detector Response +// GetHostingEnvironmentDetectorResponse - Description for Get Hosting Environment Detector Response // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - App Service Environment Name // detectorName - Detector Resource Name @@ -425,7 +426,7 @@ func (client *DiagnosticsClient) getHostingEnvironmentDetectorResponseCreateRequ if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -440,9 +441,9 @@ func (client *DiagnosticsClient) getHostingEnvironmentDetectorResponseHandleResp return result, nil } -// GetSiteAnalysis - Get Site Analysis +// GetSiteAnalysis - Description for Get Site Analysis // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Diagnostic Category @@ -492,7 +493,7 @@ func (client *DiagnosticsClient) getSiteAnalysisCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -507,9 +508,9 @@ func (client *DiagnosticsClient) getSiteAnalysisHandleResponse(resp *http.Respon return result, nil } -// GetSiteAnalysisSlot - Get Site Analysis +// GetSiteAnalysisSlot - Description for Get Site Analysis // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Diagnostic Category @@ -564,7 +565,7 @@ func (client *DiagnosticsClient) getSiteAnalysisSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -579,9 +580,9 @@ func (client *DiagnosticsClient) getSiteAnalysisSlotHandleResponse(resp *http.Re return result, nil } -// GetSiteDetector - Get Detector +// GetSiteDetector - Description for Get Detector // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Diagnostic Category @@ -631,7 +632,7 @@ func (client *DiagnosticsClient) getSiteDetectorCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -646,9 +647,9 @@ func (client *DiagnosticsClient) getSiteDetectorHandleResponse(resp *http.Respon return result, nil } -// GetSiteDetectorResponse - Get site detector response +// GetSiteDetectorResponse - Description for Get site detector response // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // detectorName - Detector Resource Name @@ -702,7 +703,7 @@ func (client *DiagnosticsClient) getSiteDetectorResponseCreateRequest(ctx contex if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -717,9 +718,9 @@ func (client *DiagnosticsClient) getSiteDetectorResponseHandleResponse(resp *htt return result, nil } -// GetSiteDetectorResponseSlot - Get site detector response +// GetSiteDetectorResponseSlot - Description for Get site detector response // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // detectorName - Detector Resource Name @@ -778,7 +779,7 @@ func (client *DiagnosticsClient) getSiteDetectorResponseSlotCreateRequest(ctx co if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -793,9 +794,9 @@ func (client *DiagnosticsClient) getSiteDetectorResponseSlotHandleResponse(resp return result, nil } -// GetSiteDetectorSlot - Get Detector +// GetSiteDetectorSlot - Description for Get Detector // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Diagnostic Category @@ -850,7 +851,7 @@ func (client *DiagnosticsClient) getSiteDetectorSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -865,9 +866,9 @@ func (client *DiagnosticsClient) getSiteDetectorSlotHandleResponse(resp *http.Re return result, nil } -// GetSiteDiagnosticCategory - Get Diagnostics Category +// GetSiteDiagnosticCategory - Description for Get Diagnostics Category // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Diagnostic Category @@ -912,7 +913,7 @@ func (client *DiagnosticsClient) getSiteDiagnosticCategoryCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -927,9 +928,9 @@ func (client *DiagnosticsClient) getSiteDiagnosticCategoryHandleResponse(resp *h return result, nil } -// GetSiteDiagnosticCategorySlot - Get Diagnostics Category +// GetSiteDiagnosticCategorySlot - Description for Get Diagnostics Category // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Diagnostic Category @@ -979,7 +980,7 @@ func (client *DiagnosticsClient) getSiteDiagnosticCategorySlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -994,9 +995,9 @@ func (client *DiagnosticsClient) getSiteDiagnosticCategorySlotHandleResponse(res return result, nil } -// NewListHostingEnvironmentDetectorResponsesPager - List Hosting Environment Detector Responses +// NewListHostingEnvironmentDetectorResponsesPager - Description for List Hosting Environment Detector Responses // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site Name // options - DiagnosticsClientListHostingEnvironmentDetectorResponsesOptions contains the optional parameters for the DiagnosticsClient.ListHostingEnvironmentDetectorResponses @@ -1049,7 +1050,7 @@ func (client *DiagnosticsClient) listHostingEnvironmentDetectorResponsesCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1064,9 +1065,9 @@ func (client *DiagnosticsClient) listHostingEnvironmentDetectorResponsesHandleRe return result, nil } -// NewListSiteAnalysesPager - Get Site Analyses +// NewListSiteAnalysesPager - Description for Get Site Analyses // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Diagnostic Category @@ -1124,7 +1125,7 @@ func (client *DiagnosticsClient) listSiteAnalysesCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1139,9 +1140,9 @@ func (client *DiagnosticsClient) listSiteAnalysesHandleResponse(resp *http.Respo return result, nil } -// NewListSiteAnalysesSlotPager - Get Site Analyses +// NewListSiteAnalysesSlotPager - Description for Get Site Analyses // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Diagnostic Category @@ -1204,7 +1205,7 @@ func (client *DiagnosticsClient) listSiteAnalysesSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1219,9 +1220,9 @@ func (client *DiagnosticsClient) listSiteAnalysesSlotHandleResponse(resp *http.R return result, nil } -// NewListSiteDetectorResponsesPager - List Site Detector Responses +// NewListSiteDetectorResponsesPager - Description for List Site Detector Responses // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // options - DiagnosticsClientListSiteDetectorResponsesOptions contains the optional parameters for the DiagnosticsClient.ListSiteDetectorResponses @@ -1274,7 +1275,7 @@ func (client *DiagnosticsClient) listSiteDetectorResponsesCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1289,9 +1290,9 @@ func (client *DiagnosticsClient) listSiteDetectorResponsesHandleResponse(resp *h return result, nil } -// NewListSiteDetectorResponsesSlotPager - List Site Detector Responses +// NewListSiteDetectorResponsesSlotPager - Description for List Site Detector Responses // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // slot - Slot Name @@ -1349,7 +1350,7 @@ func (client *DiagnosticsClient) listSiteDetectorResponsesSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1364,9 +1365,9 @@ func (client *DiagnosticsClient) listSiteDetectorResponsesSlotHandleResponse(res return result, nil } -// NewListSiteDetectorsPager - Get Detectors +// NewListSiteDetectorsPager - Description for Get Detectors // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Diagnostic Category @@ -1424,7 +1425,7 @@ func (client *DiagnosticsClient) listSiteDetectorsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1439,9 +1440,9 @@ func (client *DiagnosticsClient) listSiteDetectorsHandleResponse(resp *http.Resp return result, nil } -// NewListSiteDetectorsSlotPager - Get Detectors +// NewListSiteDetectorsSlotPager - Description for Get Detectors // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // diagnosticCategory - Diagnostic Category @@ -1504,7 +1505,7 @@ func (client *DiagnosticsClient) listSiteDetectorsSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1519,9 +1520,9 @@ func (client *DiagnosticsClient) listSiteDetectorsSlotHandleResponse(resp *http. return result, nil } -// NewListSiteDiagnosticCategoriesPager - Get Diagnostics Categories +// NewListSiteDiagnosticCategoriesPager - Description for Get Diagnostics Categories // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // options - DiagnosticsClientListSiteDiagnosticCategoriesOptions contains the optional parameters for the DiagnosticsClient.ListSiteDiagnosticCategories @@ -1574,7 +1575,7 @@ func (client *DiagnosticsClient) listSiteDiagnosticCategoriesCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1589,9 +1590,9 @@ func (client *DiagnosticsClient) listSiteDiagnosticCategoriesHandleResponse(resp return result, nil } -// NewListSiteDiagnosticCategoriesSlotPager - Get Diagnostics Categories +// NewListSiteDiagnosticCategoriesSlotPager - Description for Get Diagnostics Categories // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site Name // slot - Slot Name @@ -1649,7 +1650,7 @@ func (client *DiagnosticsClient) listSiteDiagnosticCategoriesSlotCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_domainregistrationprovider_client.go b/sdk/resourcemanager/appservice/armappservice/domainregistrationprovider_client.go similarity index 94% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_domainregistrationprovider_client.go rename to sdk/resourcemanager/appservice/armappservice/domainregistrationprovider_client.go index f6ea4522b262..432aa11b8f07 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_domainregistrationprovider_client.go +++ b/sdk/resourcemanager/appservice/armappservice/domainregistrationprovider_client.go @@ -5,6 +5,7 @@ // 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 @@ -48,9 +49,10 @@ func NewDomainRegistrationProviderClient(credential azcore.TokenCredential, opti return client, nil } -// NewListOperationsPager - Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider +// NewListOperationsPager - Description for Implements Csm operations Api to exposes the list of available Csm Apis under +// the resource provider // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - DomainRegistrationProviderClientListOperationsOptions contains the optional parameters for the DomainRegistrationProviderClient.ListOperations // method. func (client *DomainRegistrationProviderClient) NewListOperationsPager(options *DomainRegistrationProviderClientListOperationsOptions) *runtime.Pager[DomainRegistrationProviderClientListOperationsResponse] { @@ -89,7 +91,7 @@ func (client *DomainRegistrationProviderClient) listOperationsCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_domains_client.go b/sdk/resourcemanager/appservice/armappservice/domains_client.go similarity index 94% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_domains_client.go rename to sdk/resourcemanager/appservice/armappservice/domains_client.go index ab5f6ac20cd7..47058fee9013 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_domains_client.go +++ b/sdk/resourcemanager/appservice/armappservice/domains_client.go @@ -5,6 +5,7 @@ // 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 @@ -55,9 +56,9 @@ func NewDomainsClient(subscriptionID string, credential azcore.TokenCredential, return client, nil } -// CheckAvailability - Check if a domain is available for registration. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // identifier - Name of the domain. // options - DomainsClientCheckAvailabilityOptions contains the optional parameters for the DomainsClient.CheckAvailability // method. @@ -88,7 +89,7 @@ func (client *DomainsClient) checkAvailabilityCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, identifier) @@ -103,9 +104,9 @@ func (client *DomainsClient) checkAvailabilityHandleResponse(resp *http.Response return result, nil } -// BeginCreateOrUpdate - Creates or updates a domain. +// BeginCreateOrUpdate - Description for Creates or updates a domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // domainName - Name of the domain. // domain - Domain registration information. @@ -123,9 +124,9 @@ func (client *DomainsClient) BeginCreateOrUpdate(ctx context.Context, resourceGr } } -// CreateOrUpdate - Creates or updates a domain. +// CreateOrUpdate - Description for Creates or updates a domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *DomainsClient) createOrUpdate(ctx context.Context, resourceGroupName string, domainName string, domain Domain, options *DomainsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, domainName, domain, options) if err != nil { @@ -161,16 +162,16 @@ func (client *DomainsClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, domain) } -// CreateOrUpdateOwnershipIdentifier - Creates an ownership identifier for a domain or updates identifier details for an existing -// identifier +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // domainName - Name of domain. // name - Name of identifier. @@ -216,7 +217,7 @@ func (client *DomainsClient) createOrUpdateOwnershipIdentifierCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) @@ -231,9 +232,9 @@ func (client *DomainsClient) createOrUpdateOwnershipIdentifierHandleResponse(res return result, nil } -// Delete - Delete a domain. +// Delete - Description for Delete a domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -275,15 +276,15 @@ 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", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteOwnershipIdentifier - Delete ownership identifier for domain +// DeleteOwnershipIdentifier - Description for Delete ownership identifier for domain // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // domainName - Name of domain. // name - Name of identifier. @@ -328,15 +329,15 @@ func (client *DomainsClient) deleteOwnershipIdentifierCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// Get - Get a domain. +// Get - Description for Get a domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -375,7 +376,7 @@ func (client *DomainsClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -390,9 +391,9 @@ func (client *DomainsClient) getHandleResponse(resp *http.Response) (DomainsClie return result, nil } -// GetControlCenterSsoRequest - Generate a single sign-on request for the domain management portal. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // options - DomainsClientGetControlCenterSsoRequestOptions contains the optional parameters for the DomainsClient.GetControlCenterSsoRequest // method. func (client *DomainsClient) GetControlCenterSsoRequest(ctx context.Context, options *DomainsClientGetControlCenterSsoRequestOptions) (DomainsClientGetControlCenterSsoRequestResponse, error) { @@ -422,7 +423,7 @@ func (client *DomainsClient) getControlCenterSsoRequestCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -437,9 +438,9 @@ func (client *DomainsClient) getControlCenterSsoRequestHandleResponse(resp *http return result, nil } -// GetOwnershipIdentifier - Get ownership identifier for domain +// GetOwnershipIdentifier - Description for Get ownership identifier for domain // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // domainName - Name of domain. // name - Name of identifier. @@ -484,7 +485,7 @@ func (client *DomainsClient) getOwnershipIdentifierCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -499,9 +500,9 @@ func (client *DomainsClient) getOwnershipIdentifierHandleResponse(resp *http.Res return result, nil } -// NewListPager - Get all domains in a subscription. +// NewListPager - Description for Get all domains in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - DomainsClientListOptions contains the optional parameters for the DomainsClient.List method. func (client *DomainsClient) NewListPager(options *DomainsClientListOptions) *runtime.Pager[DomainsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[DomainsClientListResponse]{ @@ -543,7 +544,7 @@ func (client *DomainsClient) listCreateRequest(ctx context.Context, options *Dom return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -558,9 +559,9 @@ func (client *DomainsClient) listHandleResponse(resp *http.Response) (DomainsCli return result, nil } -// NewListByResourceGroupPager - Get all domains in a resource group. +// NewListByResourceGroupPager - Description for Get all domains in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // options - DomainsClientListByResourceGroupOptions contains the optional parameters for the DomainsClient.ListByResourceGroup // method. @@ -608,7 +609,7 @@ func (client *DomainsClient) listByResourceGroupCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -623,9 +624,9 @@ func (client *DomainsClient) listByResourceGroupHandleResponse(resp *http.Respon return result, nil } -// NewListOwnershipIdentifiersPager - Lists domain ownership identifiers. +// NewListOwnershipIdentifiersPager - Description for Lists domain ownership identifiers. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListOwnershipIdentifiers @@ -678,7 +679,7 @@ func (client *DomainsClient) listOwnershipIdentifiersCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -693,9 +694,9 @@ func (client *DomainsClient) listOwnershipIdentifiersHandleResponse(resp *http.R return result, nil } -// NewListRecommendationsPager - Get domain name recommendations based on keywords. +// NewListRecommendationsPager - Description for Get domain name recommendations based on keywords. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // parameters - Search parameters for domain name recommendations. // options - DomainsClientListRecommendationsOptions contains the optional parameters for the DomainsClient.ListRecommendations // method. @@ -739,7 +740,7 @@ func (client *DomainsClient) listRecommendationsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -754,9 +755,9 @@ func (client *DomainsClient) listRecommendationsHandleResponse(resp *http.Respon return result, nil } -// Renew - Renew a domain. +// Renew - Description for Renew a domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -795,7 +796,7 @@ func (client *DomainsClient) renewCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -803,7 +804,7 @@ 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -842,7 +843,7 @@ func (client *DomainsClient) transferOutCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -857,9 +858,9 @@ func (client *DomainsClient) transferOutHandleResponse(resp *http.Response) (Dom return result, nil } -// Update - Creates or updates a domain. +// Update - Description for Creates or updates a domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // domainName - Name of the domain. // domain - Domain registration information. @@ -899,7 +900,7 @@ func (client *DomainsClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, domain) @@ -914,10 +915,10 @@ func (client *DomainsClient) updateHandleResponse(resp *http.Response) (DomainsC return result, nil } -// UpdateOwnershipIdentifier - Creates an ownership identifier for a domain or updates identifier details for an existing -// identifier +// UpdateOwnershipIdentifier - 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // domainName - Name of domain. // name - Name of identifier. @@ -963,7 +964,7 @@ func (client *DomainsClient) updateOwnershipIdentifierCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_environments_client.go b/sdk/resourcemanager/appservice/armappservice/environments_client.go similarity index 85% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_environments_client.go rename to sdk/resourcemanager/appservice/armappservice/environments_client.go index 47ae9d514ccd..bb86d287cf3d 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_environments_client.go +++ b/sdk/resourcemanager/appservice/armappservice/environments_client.go @@ -5,6 +5,7 @@ // 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 @@ -55,9 +56,9 @@ func NewEnvironmentsClient(subscriptionID string, credential azcore.TokenCredent return client, nil } -// BeginApproveOrRejectPrivateEndpointConnection - Approves or rejects a private endpoint connection +// BeginApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -74,9 +75,9 @@ func (client *EnvironmentsClient) BeginApproveOrRejectPrivateEndpointConnection( } } -// ApproveOrRejectPrivateEndpointConnection - Approves or rejects a private endpoint connection +// ApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *EnvironmentsClient) approveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*http.Response, error) { req, err := client.approveOrRejectPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) if err != nil { @@ -116,15 +117,15 @@ func (client *EnvironmentsClient) approveOrRejectPrivateEndpointConnectionCreate return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, privateEndpointWrapper) } -// BeginChangeVnet - Move an App Service Environment to a different VNET. +// BeginChangeVnet - Description for Move an App Service Environment to a different VNET. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -165,9 +166,9 @@ func (client *EnvironmentsClient) BeginChangeVnet(ctx context.Context, resourceG } } -// ChangeVnet - Move an App Service Environment to a different VNET. +// ChangeVnet - Description for Move an App Service Environment to a different VNET. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *EnvironmentsClient) changeVnet(ctx context.Context, resourceGroupName string, name string, vnetInfo VirtualNetworkProfile, options *EnvironmentsClientBeginChangeVnetOptions) (*http.Response, error) { req, err := client.changeVnetCreateRequest(ctx, resourceGroupName, name, vnetInfo, options) if err != nil { @@ -203,7 +204,7 @@ func (client *EnvironmentsClient) changeVnetCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, vnetInfo) @@ -218,9 +219,9 @@ func (client *EnvironmentsClient) changeVnetHandleResponse(resp *http.Response) return result, nil } -// BeginCreateOrUpdate - Create or update an App Service Environment. +// BeginCreateOrUpdate - Description for Create or update an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -238,9 +239,9 @@ func (client *EnvironmentsClient) BeginCreateOrUpdate(ctx context.Context, resou } } -// CreateOrUpdate - Create or update an App Service Environment. +// CreateOrUpdate - Description for Create or update an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *EnvironmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, hostingEnvironmentEnvelope EnvironmentResource, options *EnvironmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, hostingEnvironmentEnvelope, options) if err != nil { @@ -276,15 +277,15 @@ func (client *EnvironmentsClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, hostingEnvironmentEnvelope) } -// BeginCreateOrUpdateMultiRolePool - Create or update a multi-role pool. +// BeginCreateOrUpdateMultiRolePool - Description for Create or update a multi-role pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -302,9 +303,9 @@ func (client *EnvironmentsClient) BeginCreateOrUpdateMultiRolePool(ctx context.C } } -// CreateOrUpdateMultiRolePool - Create or update a multi-role pool. +// CreateOrUpdateMultiRolePool - Description for Create or update a multi-role pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *EnvironmentsClient) createOrUpdateMultiRolePool(ctx context.Context, resourceGroupName string, name string, multiRolePoolEnvelope WorkerPoolResource, options *EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions) (*http.Response, error) { req, err := client.createOrUpdateMultiRolePoolCreateRequest(ctx, resourceGroupName, name, multiRolePoolEnvelope, options) if err != nil { @@ -340,15 +341,15 @@ func (client *EnvironmentsClient) createOrUpdateMultiRolePoolCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, multiRolePoolEnvelope) } -// BeginCreateOrUpdateWorkerPool - Create or update a worker pool. +// BeginCreateOrUpdateWorkerPool - Description for Create or update a worker pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -367,9 +368,9 @@ func (client *EnvironmentsClient) BeginCreateOrUpdateWorkerPool(ctx context.Cont } } -// CreateOrUpdateWorkerPool - Create or update a worker pool. +// CreateOrUpdateWorkerPool - Description for Create or update a worker pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *EnvironmentsClient) createOrUpdateWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string, workerPoolEnvelope WorkerPoolResource, options *EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions) (*http.Response, error) { req, err := client.createOrUpdateWorkerPoolCreateRequest(ctx, resourceGroupName, name, workerPoolName, workerPoolEnvelope, options) if err != nil { @@ -409,15 +410,15 @@ func (client *EnvironmentsClient) createOrUpdateWorkerPoolCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, workerPoolEnvelope) } -// BeginDelete - Delete an App Service Environment. +// BeginDelete - Description for Delete an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -434,9 +435,9 @@ func (client *EnvironmentsClient) BeginDelete(ctx context.Context, resourceGroup } } -// Delete - Delete an App Service Environment. +// Delete - Description for Delete an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *EnvironmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { @@ -475,15 +476,72 @@ 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", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginDeletePrivateEndpointConnection - Deletes a private endpoint connection +// 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 2021-03-01 +// Generated from API version 2022-03-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) { + req, err := client.deleteAseCustomDNSSuffixConfigurationCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { + return EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse{}, runtime.NewResponseError(resp) + } + return client.deleteAseCustomDNSSuffixConfigurationHandleResponse(resp) +} + +// deleteAseCustomDNSSuffixConfigurationCreateRequest creates the DeleteAseCustomDNSSuffixConfiguration request. +func (client *EnvironmentsClient) deleteAseCustomDNSSuffixConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + 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.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// deleteAseCustomDNSSuffixConfigurationHandleResponse handles the DeleteAseCustomDNSSuffixConfiguration response. +func (client *EnvironmentsClient) deleteAseCustomDNSSuffixConfigurationHandleResponse(resp *http.Response) (EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse, error) { + result := EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Interface); err != nil { + return EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse{}, err + } + return result, nil +} + +// BeginDeletePrivateEndpointConnection - Description for Deletes a private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-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 @@ -500,9 +558,9 @@ func (client *EnvironmentsClient) BeginDeletePrivateEndpointConnection(ctx conte } } -// DeletePrivateEndpointConnection - Deletes a private endpoint connection +// DeletePrivateEndpointConnection - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *EnvironmentsClient) deletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions) (*http.Response, error) { req, err := client.deletePrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) if err != nil { @@ -542,15 +600,15 @@ func (client *EnvironmentsClient) deletePrivateEndpointConnectionCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// Get - Get the properties of an App Service Environment. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -589,7 +647,7 @@ func (client *EnvironmentsClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -604,9 +662,66 @@ func (client *EnvironmentsClient) getHandleResponse(resp *http.Response) (Enviro return result, nil } -// GetAseV3NetworkingConfiguration - Get networking configuration of an App Service Environment +// 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-03-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) { + req, err := client.getAseCustomDNSSuffixConfigurationCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse{}, runtime.NewResponseError(resp) + } + return client.getAseCustomDNSSuffixConfigurationHandleResponse(resp) +} + +// getAseCustomDNSSuffixConfigurationCreateRequest creates the GetAseCustomDNSSuffixConfiguration request. +func (client *EnvironmentsClient) getAseCustomDNSSuffixConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetAseCustomDNSSuffixConfigurationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + 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.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getAseCustomDNSSuffixConfigurationHandleResponse handles the GetAseCustomDNSSuffixConfiguration response. +func (client *EnvironmentsClient) getAseCustomDNSSuffixConfigurationHandleResponse(resp *http.Response) (EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse, error) { + result := EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomDNSSuffixConfiguration); err != nil { + return EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse{}, err + } + return result, nil +} + +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -646,7 +761,7 @@ func (client *EnvironmentsClient) getAseV3NetworkingConfigurationCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -661,9 +776,9 @@ func (client *EnvironmentsClient) getAseV3NetworkingConfigurationHandleResponse( return result, nil } -// GetDiagnosticsItem - Get a diagnostics item for an App Service Environment. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -708,7 +823,7 @@ func (client *EnvironmentsClient) getDiagnosticsItemCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -723,10 +838,10 @@ func (client *EnvironmentsClient) getDiagnosticsItemHandleResponse(resp *http.Re return result, nil } -// NewGetInboundNetworkDependenciesEndpointsPager - Get the network endpoints of all inbound dependencies of an App Service -// Environment. +// NewGetInboundNetworkDependenciesEndpointsPager - Description for Get the network endpoints of all inbound dependencies +// of an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.GetInboundNetworkDependenciesEndpoints @@ -779,7 +894,7 @@ func (client *EnvironmentsClient) getInboundNetworkDependenciesEndpointsCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -794,9 +909,9 @@ func (client *EnvironmentsClient) getInboundNetworkDependenciesEndpointsHandleRe return result, nil } -// GetMultiRolePool - Get properties of a multi-role pool. +// GetMultiRolePool - Description for Get properties of a multi-role pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -836,7 +951,7 @@ func (client *EnvironmentsClient) getMultiRolePoolCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -851,10 +966,10 @@ func (client *EnvironmentsClient) getMultiRolePoolHandleResponse(resp *http.Resp return result, nil } -// NewGetOutboundNetworkDependenciesEndpointsPager - Get the network endpoints of all outbound dependencies of an App Service -// Environment. +// NewGetOutboundNetworkDependenciesEndpointsPager - Description for Get the network endpoints of all outbound dependencies +// of an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.GetOutboundNetworkDependenciesEndpoints @@ -907,7 +1022,7 @@ func (client *EnvironmentsClient) getOutboundNetworkDependenciesEndpointsCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -922,9 +1037,9 @@ func (client *EnvironmentsClient) getOutboundNetworkDependenciesEndpointsHandleR return result, nil } -// GetPrivateEndpointConnection - Gets a private endpoint connection +// GetPrivateEndpointConnection - Description for Gets a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -969,7 +1084,7 @@ func (client *EnvironmentsClient) getPrivateEndpointConnectionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -984,9 +1099,10 @@ func (client *EnvironmentsClient) getPrivateEndpointConnectionHandleResponse(res return result, nil } -// NewGetPrivateEndpointConnectionListPager - Gets the list of private endpoints associated with a hosting environment +// NewGetPrivateEndpointConnectionListPager - Description for Gets the list of private endpoints associated with a hosting +// environment // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.GetPrivateEndpointConnectionList @@ -1039,7 +1155,7 @@ func (client *EnvironmentsClient) getPrivateEndpointConnectionListCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1054,9 +1170,9 @@ func (client *EnvironmentsClient) getPrivateEndpointConnectionListHandleResponse return result, nil } -// GetPrivateLinkResources - Gets the private link resources +// GetPrivateLinkResources - Description for Gets the private link resources // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -1096,7 +1212,7 @@ func (client *EnvironmentsClient) getPrivateLinkResourcesCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1111,9 +1227,9 @@ func (client *EnvironmentsClient) getPrivateLinkResourcesHandleResponse(resp *ht return result, nil } -// GetVipInfo - Get IP addresses assigned to an App Service Environment. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -1152,7 +1268,7 @@ func (client *EnvironmentsClient) getVipInfoCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1167,9 +1283,9 @@ func (client *EnvironmentsClient) getVipInfoHandleResponse(resp *http.Response) return result, nil } -// GetWorkerPool - Get properties of a worker pool. +// GetWorkerPool - Description for Get properties of a worker pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -1214,7 +1330,7 @@ func (client *EnvironmentsClient) getWorkerPoolCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1229,9 +1345,9 @@ func (client *EnvironmentsClient) getWorkerPoolHandleResponse(resp *http.Respons return result, nil } -// NewListPager - Get all App Service Environments for a subscription. +// NewListPager - Description for Get all App Service Environments for a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - EnvironmentsClientListOptions contains the optional parameters for the EnvironmentsClient.List method. func (client *EnvironmentsClient) NewListPager(options *EnvironmentsClientListOptions) *runtime.Pager[EnvironmentsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListResponse]{ @@ -1273,7 +1389,7 @@ func (client *EnvironmentsClient) listCreateRequest(ctx context.Context, options return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1288,9 +1404,9 @@ func (client *EnvironmentsClient) listHandleResponse(resp *http.Response) (Envir return result, nil } -// NewListAppServicePlansPager - Get all App Service plans in an App Service Environment. +// NewListAppServicePlansPager - Description for Get all App Service plans in an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListAppServicePlans @@ -1343,7 +1459,7 @@ func (client *EnvironmentsClient) listAppServicePlansCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1358,9 +1474,9 @@ func (client *EnvironmentsClient) listAppServicePlansHandleResponse(resp *http.R return result, nil } -// NewListByResourceGroupPager - Get all App Service Environments in a resource group. +// NewListByResourceGroupPager - Description for Get all App Service Environments in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // options - EnvironmentsClientListByResourceGroupOptions contains the optional parameters for the EnvironmentsClient.ListByResourceGroup // method. @@ -1408,7 +1524,7 @@ func (client *EnvironmentsClient) listByResourceGroupCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1423,9 +1539,9 @@ func (client *EnvironmentsClient) listByResourceGroupHandleResponse(resp *http.R return result, nil } -// NewListCapacitiesPager - Get the used, available, and total worker capacity an App Service Environment. +// NewListCapacitiesPager - Description for Get the used, available, and total worker capacity an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListCapacities @@ -1478,7 +1594,7 @@ func (client *EnvironmentsClient) listCapacitiesCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1493,9 +1609,9 @@ func (client *EnvironmentsClient) listCapacitiesHandleResponse(resp *http.Respon return result, nil } -// ListDiagnostics - Get diagnostic information for an App Service Environment. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -1535,7 +1651,7 @@ func (client *EnvironmentsClient) listDiagnosticsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1550,9 +1666,10 @@ func (client *EnvironmentsClient) listDiagnosticsHandleResponse(resp *http.Respo return result, nil } -// NewListMultiRoleMetricDefinitionsPager - Get metric definitions for a multi-role pool of an App Service Environment. +// NewListMultiRoleMetricDefinitionsPager - Description for Get metric definitions for a multi-role pool of an App Service +// Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListMultiRoleMetricDefinitions @@ -1605,7 +1722,7 @@ func (client *EnvironmentsClient) listMultiRoleMetricDefinitionsCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1620,10 +1737,10 @@ func (client *EnvironmentsClient) listMultiRoleMetricDefinitionsHandleResponse(r return result, nil } -// NewListMultiRolePoolInstanceMetricDefinitionsPager - Get metric definitions for a specific instance of a multi-role pool -// of an App Service Environment. +// NewListMultiRolePoolInstanceMetricDefinitionsPager - Description for Get metric definitions for a specific instance of +// a multi-role pool of an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -1681,7 +1798,7 @@ func (client *EnvironmentsClient) listMultiRolePoolInstanceMetricDefinitionsCrea return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1696,9 +1813,9 @@ func (client *EnvironmentsClient) listMultiRolePoolInstanceMetricDefinitionsHand return result, nil } -// NewListMultiRolePoolSKUsPager - Get available SKUs for scaling a multi-role pool. +// NewListMultiRolePoolSKUsPager - Description for Get available SKUs for scaling a multi-role pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListMultiRolePoolSKUs @@ -1751,7 +1868,7 @@ func (client *EnvironmentsClient) listMultiRolePoolSKUsCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1766,9 +1883,9 @@ func (client *EnvironmentsClient) listMultiRolePoolSKUsHandleResponse(resp *http return result, nil } -// NewListMultiRolePoolsPager - Get all multi-role pools. +// NewListMultiRolePoolsPager - Description for Get all multi-role pools. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListMultiRolePools @@ -1821,7 +1938,7 @@ func (client *EnvironmentsClient) listMultiRolePoolsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1836,9 +1953,9 @@ func (client *EnvironmentsClient) listMultiRolePoolsHandleResponse(resp *http.Re return result, nil } -// NewListMultiRoleUsagesPager - Get usage metrics for a multi-role pool of an App Service Environment. +// NewListMultiRoleUsagesPager - Description for Get usage metrics for a multi-role pool of an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListMultiRoleUsages @@ -1891,7 +2008,7 @@ func (client *EnvironmentsClient) listMultiRoleUsagesCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1906,9 +2023,9 @@ func (client *EnvironmentsClient) listMultiRoleUsagesHandleResponse(resp *http.R return result, nil } -// ListOperations - List all currently running operations on the App Service Environment. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -1948,7 +2065,7 @@ func (client *EnvironmentsClient) listOperationsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1963,9 +2080,9 @@ func (client *EnvironmentsClient) listOperationsHandleResponse(resp *http.Respon return result, nil } -// NewListUsagesPager - Get global usage metrics of an App Service Environment. +// NewListUsagesPager - Description for Get global usage metrics of an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListUsages method. @@ -2017,7 +2134,7 @@ func (client *EnvironmentsClient) listUsagesCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -2037,9 +2154,9 @@ func (client *EnvironmentsClient) listUsagesHandleResponse(resp *http.Response) return result, nil } -// NewListWebAppsPager - Get all apps in an App Service Environment. +// NewListWebAppsPager - Description for Get all apps in an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListWebApps @@ -2095,7 +2212,7 @@ func (client *EnvironmentsClient) listWebAppsCreateRequest(ctx context.Context, if options != nil && options.PropertiesToInclude != nil { reqQP.Set("propertiesToInclude", *options.PropertiesToInclude) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2110,9 +2227,9 @@ func (client *EnvironmentsClient) listWebAppsHandleResponse(resp *http.Response) return result, nil } -// NewListWebWorkerMetricDefinitionsPager - Get metric definitions for a worker pool of an App Service Environment. +// NewListWebWorkerMetricDefinitionsPager - Description for Get metric definitions for a worker pool of an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -2170,7 +2287,7 @@ func (client *EnvironmentsClient) listWebWorkerMetricDefinitionsCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2185,9 +2302,9 @@ func (client *EnvironmentsClient) listWebWorkerMetricDefinitionsHandleResponse(r return result, nil } -// NewListWebWorkerUsagesPager - Get usage metrics for a worker pool of an App Service Environment. +// NewListWebWorkerUsagesPager - Description for Get usage metrics for a worker pool of an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -2245,7 +2362,7 @@ func (client *EnvironmentsClient) listWebWorkerUsagesCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2260,10 +2377,10 @@ func (client *EnvironmentsClient) listWebWorkerUsagesHandleResponse(resp *http.R return result, nil } -// NewListWorkerPoolInstanceMetricDefinitionsPager - Get metric definitions for a specific instance of a worker pool of an -// App Service Environment. +// NewListWorkerPoolInstanceMetricDefinitionsPager - Description for Get metric definitions for a specific instance of a worker +// pool of an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -2326,7 +2443,7 @@ func (client *EnvironmentsClient) listWorkerPoolInstanceMetricDefinitionsCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2341,9 +2458,9 @@ func (client *EnvironmentsClient) listWorkerPoolInstanceMetricDefinitionsHandleR return result, nil } -// NewListWorkerPoolSKUsPager - Get available SKUs for scaling a worker pool. +// NewListWorkerPoolSKUsPager - Description for Get available SKUs for scaling a worker pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -2401,7 +2518,7 @@ func (client *EnvironmentsClient) listWorkerPoolSKUsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2416,9 +2533,9 @@ func (client *EnvironmentsClient) listWorkerPoolSKUsHandleResponse(resp *http.Re return result, nil } -// NewListWorkerPoolsPager - Get all worker pools of an App Service Environment. +// NewListWorkerPoolsPager - Description for Get all worker pools of an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListWorkerPools @@ -2471,7 +2588,7 @@ func (client *EnvironmentsClient) listWorkerPoolsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2486,9 +2603,9 @@ func (client *EnvironmentsClient) listWorkerPoolsHandleResponse(resp *http.Respo return result, nil } -// Reboot - Reboot all machines in an App Service Environment. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -2527,15 +2644,15 @@ func (client *EnvironmentsClient) rebootCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginResume - Resume an App Service Environment. +// BeginResume - Description for Resume an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -2575,9 +2692,9 @@ func (client *EnvironmentsClient) BeginResume(ctx context.Context, resourceGroup } } -// Resume - Resume an App Service Environment. +// Resume - Description for Resume an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *EnvironmentsClient) resume(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginResumeOptions) (*http.Response, error) { req, err := client.resumeCreateRequest(ctx, resourceGroupName, name, options) if err != nil { @@ -2613,7 +2730,7 @@ func (client *EnvironmentsClient) resumeCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2628,9 +2745,9 @@ func (client *EnvironmentsClient) resumeHandleResponse(resp *http.Response) (Env return result, nil } -// BeginSuspend - Suspend an App Service Environment. +// BeginSuspend - Description for Suspend an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -2670,9 +2787,9 @@ func (client *EnvironmentsClient) BeginSuspend(ctx context.Context, resourceGrou } } -// Suspend - Suspend an App Service Environment. +// Suspend - Description for Suspend an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *EnvironmentsClient) suspend(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginSuspendOptions) (*http.Response, error) { req, err := client.suspendCreateRequest(ctx, resourceGroupName, name, options) if err != nil { @@ -2708,7 +2825,7 @@ func (client *EnvironmentsClient) suspendCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2723,9 +2840,57 @@ func (client *EnvironmentsClient) suspendHandleResponse(resp *http.Response) (En return result, nil } -// Update - Create or update an App Service Environment. +// 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-03-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) { + req, err := client.testUpgradeAvailableNotificationCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return EnvironmentsClientTestUpgradeAvailableNotificationResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return EnvironmentsClientTestUpgradeAvailableNotificationResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return EnvironmentsClientTestUpgradeAvailableNotificationResponse{}, runtime.NewResponseError(resp) + } + return EnvironmentsClientTestUpgradeAvailableNotificationResponse{}, nil +} + +// testUpgradeAvailableNotificationCreateRequest creates the TestUpgradeAvailableNotification request. +func (client *EnvironmentsClient) testUpgradeAvailableNotificationCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientTestUpgradeAvailableNotificationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/testUpgradeAvailableNotification" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + 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.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Update - Description for Create or update an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -2765,7 +2930,7 @@ func (client *EnvironmentsClient) updateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, hostingEnvironmentEnvelope) @@ -2780,9 +2945,66 @@ func (client *EnvironmentsClient) updateHandleResponse(resp *http.Response) (Env return result, nil } -// UpdateAseNetworkingConfiguration - Update networking configuration of an App Service Environment +// 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-03-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) { + req, err := client.updateAseCustomDNSSuffixConfigurationCreateRequest(ctx, resourceGroupName, name, customDNSSuffixConfiguration, options) + if err != nil { + return EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse{}, runtime.NewResponseError(resp) + } + return client.updateAseCustomDNSSuffixConfigurationHandleResponse(resp) +} + +// updateAseCustomDNSSuffixConfigurationCreateRequest creates the UpdateAseCustomDNSSuffixConfiguration request. +func (client *EnvironmentsClient) updateAseCustomDNSSuffixConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, customDNSSuffixConfiguration CustomDNSSuffixConfiguration, options *EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + 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.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, customDNSSuffixConfiguration) +} + +// updateAseCustomDNSSuffixConfigurationHandleResponse handles the UpdateAseCustomDNSSuffixConfiguration response. +func (client *EnvironmentsClient) updateAseCustomDNSSuffixConfigurationHandleResponse(resp *http.Response) (EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse, error) { + result := EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomDNSSuffixConfiguration); err != nil { + return EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse{}, err + } + return result, nil +} + +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -2822,7 +3044,7 @@ func (client *EnvironmentsClient) updateAseNetworkingConfigurationCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, aseNetworkingConfiguration) @@ -2837,9 +3059,9 @@ func (client *EnvironmentsClient) updateAseNetworkingConfigurationHandleResponse return result, nil } -// UpdateMultiRolePool - Create or update a multi-role pool. +// UpdateMultiRolePool - Description for Create or update a multi-role pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -2880,7 +3102,7 @@ func (client *EnvironmentsClient) updateMultiRolePoolCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, multiRolePoolEnvelope) @@ -2895,9 +3117,9 @@ func (client *EnvironmentsClient) updateMultiRolePoolHandleResponse(resp *http.R return result, nil } -// UpdateWorkerPool - Create or update a worker pool. +// UpdateWorkerPool - Description for Create or update a worker pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -2943,7 +3165,7 @@ func (client *EnvironmentsClient) updateWorkerPoolCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, workerPoolEnvelope) @@ -2957,3 +3179,66 @@ func (client *EnvironmentsClient) updateWorkerPoolHandleResponse(resp *http.Resp } return result, nil } + +// 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-03-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 +// method. +func (client *EnvironmentsClient) BeginUpgrade(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginUpgradeOptions) (*runtime.Poller[EnvironmentsClientUpgradeResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.upgrade(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + return runtime.NewPoller[EnvironmentsClientUpgradeResponse](resp, client.pl, nil) + } else { + return runtime.NewPollerFromResumeToken[EnvironmentsClientUpgradeResponse](options.ResumeToken, client.pl, nil) + } +} + +// 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-03-01 +func (client *EnvironmentsClient) upgrade(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginUpgradeOptions) (*http.Response, error) { + req, err := client.upgradeCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusAccepted) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// upgradeCreateRequest creates the Upgrade request. +func (client *EnvironmentsClient) upgradeCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginUpgradeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/upgrade" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + 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.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_global_client.go b/sdk/resourcemanager/appservice/armappservice/global_client.go similarity index 94% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_global_client.go rename to sdk/resourcemanager/appservice/armappservice/global_client.go index 48a55328230f..3731d1e5e7b0 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_global_client.go +++ b/sdk/resourcemanager/appservice/armappservice/global_client.go @@ -5,6 +5,7 @@ // 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 @@ -54,9 +55,9 @@ func NewGlobalClient(subscriptionID string, credential azcore.TokenCredential, o return client, nil } -// GetDeletedWebApp - Get deleted app for a subscription. +// GetDeletedWebApp - Description for Get deleted app for a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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) { @@ -90,7 +91,7 @@ func (client *GlobalClient) getDeletedWebAppCreateRequest(ctx context.Context, d return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -105,9 +106,9 @@ func (client *GlobalClient) getDeletedWebAppHandleResponse(resp *http.Response) return result, nil } -// GetDeletedWebAppSnapshots - Get all deleted apps for a subscription. +// GetDeletedWebAppSnapshots - Description for Get all deleted apps for a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // deletedSiteID - The numeric ID of the deleted app, e.g. 12345 // options - GlobalClientGetDeletedWebAppSnapshotsOptions contains the optional parameters for the GlobalClient.GetDeletedWebAppSnapshots // method. @@ -142,7 +143,7 @@ func (client *GlobalClient) getDeletedWebAppSnapshotsCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -157,9 +158,9 @@ func (client *GlobalClient) getDeletedWebAppSnapshotsHandleResponse(resp *http.R return result, nil } -// GetSubscriptionOperationWithAsyncResponse - Gets an operation in a subscription and given region +// 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 2021-03-01 +// Generated from API version 2022-03-01 // location - Location name // operationID - Operation Id // options - GlobalClientGetSubscriptionOperationWithAsyncResponseOptions contains the optional parameters for the GlobalClient.GetSubscriptionOperationWithAsyncResponse @@ -199,7 +200,7 @@ func (client *GlobalClient) getSubscriptionOperationWithAsyncResponseCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/go.mod b/sdk/resourcemanager/appservice/armappservice/go.mod index ce2c7b922491..8c14ea38e776 100644 --- a/sdk/resourcemanager/appservice/armappservice/go.mod +++ b/sdk/resourcemanager/appservice/armappservice/go.mod @@ -1,21 +1,13 @@ -module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice +module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2 go 1.18 -require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 // indirect - github.com/golang-jwt/jwt v3.2.1+incompatible // indirect - github.com/google/uuid v1.1.1 // indirect - github.com/kylelemons/godebug v1.1.0 // indirect - github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 // indirect - golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect - golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect golang.org/x/text v0.3.7 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/sdk/resourcemanager/appservice/armappservice/go.sum b/sdk/resourcemanager/appservice/armappservice/go.sum index ed5b814680ee..3afb578030a5 100644 --- a/sdk/resourcemanager/appservice/armappservice/go.sum +++ b/sdk/resourcemanager/appservice/armappservice/go.sum @@ -1,33 +1,15 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 h1:sVPhtT2qjO86rTUaWMr4WoES4TkjGnzcioXcnHV9s5k= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0 h1:Yoicul8bnVdQrhDMTHxdEckRGX01XvwXDHUT9zYZ3k0= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0/go.mod h1:+6sju8gk8FRmSajX3Oz4G5Gm7P+mbqE9FVaXXFYTkCM= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 h1:jp0dGvZ7ZK0mgqnTSClMxa5xuRL7NZgHameVYF6BurY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 h1:WVsrXCnHlDDX8ls+tootqRE87/hL9S/g4ewig9RsD/c= -github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= 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 v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= -github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= -github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= -github.com/google/uuid v1.1.1/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/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= -github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI= -github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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.0.0-20220511200225-c6db032c6c88 h1:Tgea0cVUD0ivh5ADBX4WwuI12DUd2to3nCYe2eayMIw= -golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 h1:HVyaeDAYux4pnY+D/SiwmLOR36ewZ4iGQIIrtnuCjFA= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_kubeenvironments_client.go b/sdk/resourcemanager/appservice/armappservice/kubeenvironments_client.go similarity index 94% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_kubeenvironments_client.go rename to sdk/resourcemanager/appservice/armappservice/kubeenvironments_client.go index 0b019b288b13..52631fcd09f7 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_kubeenvironments_client.go +++ b/sdk/resourcemanager/appservice/armappservice/kubeenvironments_client.go @@ -5,6 +5,7 @@ // 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 @@ -54,9 +55,9 @@ func NewKubeEnvironmentsClient(subscriptionID string, credential azcore.TokenCre return client, nil } -// BeginCreateOrUpdate - Creates or updates a Kubernetes Environment. +// BeginCreateOrUpdate - Description for Creates or updates a Kubernetes Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -74,9 +75,9 @@ func (client *KubeEnvironmentsClient) BeginCreateOrUpdate(ctx context.Context, r } } -// CreateOrUpdate - Creates or updates a Kubernetes Environment. +// CreateOrUpdate - Description for Creates or updates a Kubernetes Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *KubeEnvironmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, kubeEnvironmentEnvelope KubeEnvironment, options *KubeEnvironmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, kubeEnvironmentEnvelope, options) if err != nil { @@ -112,15 +113,15 @@ func (client *KubeEnvironmentsClient) createOrUpdateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, kubeEnvironmentEnvelope) } -// BeginDelete - Delete a Kubernetes Environment. +// BeginDelete - Description for Delete a Kubernetes Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -137,9 +138,9 @@ func (client *KubeEnvironmentsClient) BeginDelete(ctx context.Context, resourceG } } -// Delete - Delete a Kubernetes Environment. +// Delete - Description for Delete a Kubernetes Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *KubeEnvironmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, options *KubeEnvironmentsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { @@ -175,15 +176,15 @@ func (client *KubeEnvironmentsClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// Get - Get the properties of a Kubernetes Environment. +// Get - Description for Get the properties of a Kubernetes Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -222,7 +223,7 @@ func (client *KubeEnvironmentsClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -237,9 +238,9 @@ func (client *KubeEnvironmentsClient) getHandleResponse(resp *http.Response) (Ku return result, nil } -// NewListByResourceGroupPager - Get all the Kubernetes Environments in a resource group. +// NewListByResourceGroupPager - Description for Get all the Kubernetes Environments in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // options - KubeEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the KubeEnvironmentsClient.ListByResourceGroup // method. @@ -287,7 +288,7 @@ func (client *KubeEnvironmentsClient) listByResourceGroupCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -302,9 +303,9 @@ func (client *KubeEnvironmentsClient) listByResourceGroupHandleResponse(resp *ht return result, nil } -// NewListBySubscriptionPager - Get all Kubernetes Environments for a subscription. +// NewListBySubscriptionPager - Description for Get all Kubernetes Environments for a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - KubeEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the KubeEnvironmentsClient.ListBySubscription // method. func (client *KubeEnvironmentsClient) NewListBySubscriptionPager(options *KubeEnvironmentsClientListBySubscriptionOptions) *runtime.Pager[KubeEnvironmentsClientListBySubscriptionResponse] { @@ -347,7 +348,7 @@ func (client *KubeEnvironmentsClient) listBySubscriptionCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -362,9 +363,9 @@ func (client *KubeEnvironmentsClient) listBySubscriptionHandleResponse(resp *htt return result, nil } -// Update - Creates or updates a Kubernetes Environment. +// Update - Description for Creates or updates a Kubernetes Environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -404,7 +405,7 @@ func (client *KubeEnvironmentsClient) updateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, kubeEnvironmentEnvelope) diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_models.go b/sdk/resourcemanager/appservice/armappservice/models.go similarity index 90% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_models.go rename to sdk/resourcemanager/appservice/armappservice/models.go index db174ec8f25b..2e749bd44b96 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_models.go +++ b/sdk/resourcemanager/appservice/armappservice/models.go @@ -5,6 +5,7 @@ // 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 @@ -533,6 +534,15 @@ type AseV3NetworkingConfigurationProperties struct { // Property to enable and disable new private endpoint connection creation on ASE AllowNewPrivateEndpointConnections *bool `json:"allowNewPrivateEndpointConnections,omitempty"` + // Property to enable and disable FTP on ASEV3 + FtpEnabled *bool `json:"ftpEnabled,omitempty"` + + // Customer provided Inbound IP Address. Only able to be set on Ase create. + InboundIPAddressOverride *string `json:"inboundIpAddressOverride,omitempty"` + + // Property to enable and disable Remote Debug on ASEV3 + RemoteDebugEnabled *bool `json:"remoteDebugEnabled,omitempty"` + // READ-ONLY ExternalInboundIPAddresses []*string `json:"externalInboundIpAddresses,omitempty" azure:"ro"` @@ -710,6 +720,18 @@ type AzureBlobStorageHTTPLogsConfig struct { SasURL *string `json:"sasUrl,omitempty"` } +// AzureResourceErrorInfo - The azure resource error info. +type AzureResourceErrorInfo struct { + // REQUIRED; The error code. + Code *string `json:"code,omitempty"` + + // REQUIRED; The error message. + Message *string `json:"message,omitempty"` + + // The error details. + Details []*AzureResourceErrorInfo `json:"details,omitempty"` +} + // AzureStaticWebApps - The configuration settings of the Azure Static Web Apps provider. type AzureStaticWebApps struct { // false if the Azure Static Web Apps provider should not be enabled despite the set registration; otherwise, true. @@ -1029,24 +1051,6 @@ type CertificateDetails struct { // CertificateEmail - SSL certificate email. type CertificateEmail struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // CertificateEmail resource specific properties - Properties *CertificateEmailProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// CertificateEmailProperties - CertificateEmail resource specific properties -type CertificateEmailProperties struct { // Email id. EmailID *string `json:"emailId,omitempty"` @@ -1080,24 +1084,6 @@ type CertificateOrder struct { // CertificateOrderAction - Certificate order action. type CertificateOrderAction struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // CertificateOrderAction resource specific properties - Properties *CertificateOrderActionProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// CertificateOrderActionProperties - CertificateOrderAction resource specific properties -type CertificateOrderActionProperties struct { // READ-ONLY; Action type. ActionType *CertificateOrderActionType `json:"actionType,omitempty" azure:"ro"` @@ -1163,7 +1149,7 @@ type CertificateOrderPatchResourceProperties struct { ValidityInYears *int32 `json:"validityInYears,omitempty"` // READ-ONLY; Reasons why App Service Certificate is not renewable at the current moment. - AppServiceCertificateNotRenewableReasons []*AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem `json:"appServiceCertificateNotRenewableReasons,omitempty" azure:"ro"` + AppServiceCertificateNotRenewableReasons []*ResourceNotRenewableReason `json:"appServiceCertificateNotRenewableReasons,omitempty" azure:"ro"` // READ-ONLY; Contact info Contact *CertificateOrderContact `json:"contact,omitempty" azure:"ro"` @@ -1226,7 +1212,7 @@ type CertificateOrderProperties struct { ValidityInYears *int32 `json:"validityInYears,omitempty"` // READ-ONLY; Reasons why App Service Certificate is not renewable at the current moment. - AppServiceCertificateNotRenewableReasons []*AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem `json:"appServiceCertificateNotRenewableReasons,omitempty" azure:"ro"` + AppServiceCertificateNotRenewableReasons []*ResourceNotRenewableReason `json:"appServiceCertificateNotRenewableReasons,omitempty" azure:"ro"` // READ-ONLY; Contact info Contact *CertificateOrderContact `json:"contact,omitempty" azure:"ro"` @@ -1847,6 +1833,33 @@ type ContainerThrottlingData struct { ThrottledTime *int32 `json:"throttledTime,omitempty"` } +// ContentHash - The content hash. +type ContentHash struct { + // The algorithm of the content hash. + Algorithm *string `json:"algorithm,omitempty"` + + // The value of the content hash. + Value *string `json:"value,omitempty"` +} + +// ContentLink - The content link. +type ContentLink struct { + // The content link URI. + URI *string `json:"uri,omitempty"` + + // READ-ONLY; The content hash. + ContentHash *ContentHash `json:"contentHash,omitempty" azure:"ro"` + + // READ-ONLY; The content size. + ContentSize *int64 `json:"contentSize,omitempty" azure:"ro"` + + // READ-ONLY; The content version. + ContentVersion *string `json:"contentVersion,omitempty" azure:"ro"` + + // READ-ONLY; The metadata. + Metadata interface{} `json:"metadata,omitempty" azure:"ro"` +} + // ContinuousWebJob - Continuous Web Job Information. type ContinuousWebJob struct { // Kind of resource. @@ -1916,6 +1929,12 @@ type CookieExpiration struct { TimeToExpiration *string `json:"timeToExpiration,omitempty"` } +// Correlation - The correlation property. +type Correlation struct { + // The client tracking id. + ClientTrackingID *string `json:"clientTrackingId,omitempty"` +} + // CorsSettings - Cross-Origin Resource Sharing (CORS) settings for the app. type CorsSettings struct { // Gets or sets the list of origins that should be allowed to make cross-origin calls (for example: http://example.com:12345). @@ -1927,6 +1946,57 @@ type CorsSettings struct { SupportCredentials *bool `json:"supportCredentials,omitempty"` } +// CsmDeploymentStatus - Deployment status response payload. +type CsmDeploymentStatus struct { + // Kind of resource. + Kind *string `json:"kind,omitempty"` + + // CsmDeploymentStatus resource specific properties + Properties *CsmDeploymentStatusProperties `json:"properties,omitempty"` + + // READ-ONLY; Resource Id. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; Resource Name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Resource type. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// CsmDeploymentStatusCollection - Deployment status collection ARM resource. +type CsmDeploymentStatusCollection struct { + // REQUIRED; Collection of resources. + Value []*CsmDeploymentStatus `json:"value,omitempty"` + + // READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty" azure:"ro"` +} + +// CsmDeploymentStatusProperties - CsmDeploymentStatus resource specific properties +type CsmDeploymentStatusProperties struct { + // Deployment operation id. + DeploymentID *string `json:"deploymentId,omitempty"` + + // List of errors. + Errors []*ErrorEntity `json:"errors,omitempty"` + + // List of URLs pointing to logs for instances which failed to provision. + FailedInstancesLogs []*string `json:"failedInstancesLogs,omitempty"` + + // Number of site instances failed to provision. + NumberOfInstancesFailed *int32 `json:"numberOfInstancesFailed,omitempty"` + + // Number of site instances currently being provisioned. + NumberOfInstancesInProgress *int32 `json:"numberOfInstancesInProgress,omitempty"` + + // Number of site instances provisioned successfully. + NumberOfInstancesSuccessful *int32 `json:"numberOfInstancesSuccessful,omitempty"` + + // Deployment build status. + Status *DeploymentBuildStatus `json:"status,omitempty"` +} + // CsmMoveResourceEnvelope - Object with a list of the resources that need to be moved and the resource group they should // be moved to. type CsmMoveResourceEnvelope struct { @@ -2038,6 +2108,44 @@ type CsmUsageQuotaCollection struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } +// CustomDNSSuffixConfiguration - Full view of the custom domain suffix configuration for ASEv3. +type CustomDNSSuffixConfiguration struct { + // Kind of resource. + Kind *string `json:"kind,omitempty"` + + // CustomDnsSuffixConfiguration resource specific properties + Properties *CustomDNSSuffixConfigurationProperties `json:"properties,omitempty"` + + // READ-ONLY; Resource Id. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; Resource Name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Resource type. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// CustomDNSSuffixConfigurationProperties - CustomDnsSuffixConfiguration resource specific properties +type CustomDNSSuffixConfigurationProperties struct { + // The URL referencing the Azure Key Vault certificate secret that should be used as the default SSL/TLS certificate for sites + // with the custom domain suffix. + CertificateURL *string `json:"certificateUrl,omitempty"` + + // The default custom domain suffix to use for all sites deployed on the ASE. + DNSSuffix *string `json:"dnsSuffix,omitempty"` + + // The user-assigned identity to use for resolving the key vault certificate reference. If not specified, the system-assigned + // ASE identity will be used if available. + KeyVaultReferenceIdentity *string `json:"keyVaultReferenceIdentity,omitempty"` + + // READ-ONLY + ProvisioningDetails *string `json:"provisioningDetails,omitempty" azure:"ro"` + + // READ-ONLY + ProvisioningState *CustomDNSSuffixProvisioningState `json:"provisioningState,omitempty" azure:"ro"` +} + // CustomHostnameAnalysisResult - Custom domain analysis. type CustomHostnameAnalysisResult struct { // Kind of resource. @@ -3105,7 +3213,7 @@ type DomainPatchResourceProperties struct { CreatedTime *time.Time `json:"createdTime,omitempty" azure:"ro"` // READ-ONLY; Reasons why domain is not renewable. - DomainNotRenewableReasons []*DomainPatchResourcePropertiesDomainNotRenewableReasonsItem `json:"domainNotRenewableReasons,omitempty" azure:"ro"` + DomainNotRenewableReasons []*ResourceNotRenewableReason `json:"domainNotRenewableReasons,omitempty" azure:"ro"` // READ-ONLY; Domain expiration timestamp. ExpirationTime *time.Time `json:"expirationTime,omitempty" azure:"ro"` @@ -3168,7 +3276,7 @@ type DomainProperties struct { CreatedTime *time.Time `json:"createdTime,omitempty" azure:"ro"` // READ-ONLY; Reasons why domain is not renewable. - DomainNotRenewableReasons []*DomainPropertiesDomainNotRenewableReasonsItem `json:"domainNotRenewableReasons,omitempty" azure:"ro"` + DomainNotRenewableReasons []*ResourceNotRenewableReason `json:"domainNotRenewableReasons,omitempty" azure:"ro"` // READ-ONLY; Domain expiration timestamp. ExpirationTime *time.Time `json:"expirationTime,omitempty" azure:"ro"` @@ -3349,6 +3457,9 @@ type Environment struct { // Custom settings for changing the behavior of the App Service Environment. ClusterSettings []*NameValuePair `json:"clusterSettings,omitempty"` + // Full view of the custom domain suffix configuration for ASEv3. + CustomDNSSuffixConfiguration *CustomDNSSuffixConfiguration `json:"customDnsSuffixConfiguration,omitempty"` + // DNS suffix of the App Service Environment. DNSSuffix *string `json:"dnsSuffix,omitempty"` @@ -3367,6 +3478,12 @@ type Environment struct { // Front-end VM size, e.g. "Medium", "Large". MultiSize *string `json:"multiSize,omitempty"` + // Full view of networking configuration for an ASE. + NetworkingConfiguration *AseV3NetworkingConfiguration `json:"networkingConfiguration,omitempty"` + + // Upgrade Preference + UpgradePreference *UpgradePreference `json:"upgradePreference,omitempty"` + // User added ip ranges to whitelist on ASE db UserWhitelistedIPRanges []*string `json:"userWhitelistedIpRanges,omitempty"` @@ -3392,6 +3509,9 @@ type Environment struct { // the management endpoint is no longer available (most likely because NSG blocked the // incoming traffic). Suspended *bool `json:"suspended,omitempty" azure:"ro"` + + // READ-ONLY; Whether an upgrade is available for this App Service Environment. + UpgradeAvailability *UpgradeAvailability `json:"upgradeAvailability,omitempty" azure:"ro"` } // EnvironmentCollection - Collection of App Service Environments. @@ -3518,6 +3638,24 @@ type EnvironmentsClientBeginSuspendOptions struct { 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 { @@ -3691,6 +3829,18 @@ 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 { @@ -3741,12 +3891,79 @@ type ErrorEntity struct { Target *string `json:"target,omitempty"` } +// ErrorInfo - The error info. +type ErrorInfo struct { + // REQUIRED; The error code. + Code *string `json:"code,omitempty"` +} + +// ErrorProperties - Error properties indicate why the Logic service was not able to process the incoming request. The reason +// is provided in the error message. +type ErrorProperties struct { + // Error code. + Code *string `json:"code,omitempty"` + + // Error message indicating why the operation failed. + Message *string `json:"message,omitempty"` +} + +// ErrorResponse - Error response indicates Logic service is not able to process the incoming request. The error property +// contains the error details. +type ErrorResponse struct { + // The error properties. + Error *ErrorProperties `json:"error,omitempty"` +} + // Experiments - Routing rules in production experiments. type Experiments struct { // List of ramp-up rules. RampUpRules []*RampUpRule `json:"rampUpRules,omitempty"` } +// Expression - The expression. +type Expression struct { + // The azure resource error info. + Error *AzureResourceErrorInfo `json:"error,omitempty"` + + // The sub expressions. + Subexpressions []*Expression `json:"subexpressions,omitempty"` + + // The text. + Text *string `json:"text,omitempty"` + + // Anything + Value interface{} `json:"value,omitempty"` +} + +// ExpressionRoot - The expression root. +type ExpressionRoot struct { + // The azure resource error info. + Error *AzureResourceErrorInfo `json:"error,omitempty"` + + // The path. + Path *string `json:"path,omitempty"` + + // The sub expressions. + Subexpressions []*Expression `json:"subexpressions,omitempty"` + + // The text. + Text *string `json:"text,omitempty"` + + // Anything + Value interface{} `json:"value,omitempty"` +} + +// ExpressionTraces - The expression traces. +type ExpressionTraces struct { + Inputs []*ExpressionRoot `json:"inputs,omitempty"` + + // The link used to get the next page of recommendations. + NextLink *string `json:"nextLink,omitempty"` + + // Anything + Value interface{} `json:"value,omitempty"` +} + // ExtendedLocation - Extended Location. type ExtendedLocation struct { // Name of extended location. @@ -3796,6 +4013,48 @@ type FileSystemTokenStore struct { Directory *string `json:"directory,omitempty"` } +// FlowAccessControlConfiguration - The access control configuration. +type FlowAccessControlConfiguration struct { + // The access control configuration for workflow actions. + Actions *FlowAccessControlConfigurationPolicy `json:"actions,omitempty"` + + // The access control configuration for accessing workflow run contents. + Contents *FlowAccessControlConfigurationPolicy `json:"contents,omitempty"` + + // The access control configuration for invoking workflow triggers. + Triggers *FlowAccessControlConfigurationPolicy `json:"triggers,omitempty"` + + // The access control configuration for workflow management. + WorkflowManagement *FlowAccessControlConfigurationPolicy `json:"workflowManagement,omitempty"` +} + +// FlowAccessControlConfigurationPolicy - The access control configuration policy. +type FlowAccessControlConfigurationPolicy struct { + // The allowed caller IP address ranges. + AllowedCallerIPAddresses []*IPAddressRange `json:"allowedCallerIpAddresses,omitempty"` + + // The authentication policies for workflow. + OpenAuthenticationPolicies *OpenAuthenticationAccessPolicies `json:"openAuthenticationPolicies,omitempty"` +} + +// FlowEndpoints - The flow endpoints configuration. +type FlowEndpoints struct { + // The access endpoint ip address. + AccessEndpointIPAddresses []*IPAddress `json:"accessEndpointIpAddresses,omitempty"` + + // The outgoing ip address. + OutgoingIPAddresses []*IPAddress `json:"outgoingIpAddresses,omitempty"` +} + +// FlowEndpointsConfiguration - The endpoints configuration. +type FlowEndpointsConfiguration struct { + // The connector endpoints. + Connector *FlowEndpoints `json:"connector,omitempty"` + + // The workflow endpoints. + Workflow *FlowEndpoints `json:"workflow,omitempty"` +} + // ForwardProxy - The configuration settings of a forward proxy used to make the requests. type ForwardProxy struct { // The convention used to determine the url of the request made. @@ -4515,6 +4774,18 @@ type HybridConnectionProperties struct { ServiceBusSuffix *string `json:"serviceBusSuffix,omitempty"` } +// IPAddress - The ip address. +type IPAddress struct { + // The address. + Address *string `json:"address,omitempty"` +} + +// IPAddressRange - The ip address range. +type IPAddressRange struct { + // The IP address range. + AddressRange *string `json:"addressRange,omitempty"` +} + // IPSecurityRestriction - IP security restriction on an app. type IPSecurityRestriction struct { // Allow or Deny access for this IP range. @@ -4671,6 +4942,15 @@ type Ingress struct { Fqdn *string `json:"fqdn,omitempty" azure:"ro"` } +// JSONSchema - The JSON schema. +type JSONSchema struct { + // The JSON content. + Content *string `json:"content,omitempty"` + + // The JSON title. + Title *string `json:"title,omitempty"` +} + // JwtClaimChecks - The configuration settings of the checks that should be made while validating the JWT Claims. type JwtClaimChecks struct { // The list of the allowed client applications. @@ -5257,6 +5537,30 @@ type Nonce struct { ValidateNonce *bool `json:"validateNonce,omitempty"` } +// OpenAuthenticationAccessPolicies - AuthenticationPolicy of type Open. +type OpenAuthenticationAccessPolicies struct { + // Open authentication policies. + Policies map[string]*OpenAuthenticationAccessPolicy `json:"policies,omitempty"` +} + +// OpenAuthenticationAccessPolicy - Open authentication access policy defined by user. +type OpenAuthenticationAccessPolicy struct { + // The access policy claims. + Claims []*OpenAuthenticationPolicyClaim `json:"claims,omitempty"` + + // Type of provider for OAuth. + Type *OpenAuthenticationProviderType `json:"type,omitempty"` +} + +// OpenAuthenticationPolicyClaim - Open authentication policy claim. +type OpenAuthenticationPolicyClaim struct { + // The name of the claim. + Name *string `json:"name,omitempty"` + + // The value of the claim. + Value *string `json:"value,omitempty"` +} + // OpenIDConnectClientCredential - The authentication client credentials of the custom Open ID Connect provider. type OpenIDConnectClientCredential struct { // The app setting that contains the client secret for the custom Open ID Connect provider. @@ -5332,6 +5636,70 @@ type Operation struct { Status *OperationStatus `json:"status,omitempty"` } +// OperationResult - The operation result definition. +type OperationResult struct { + // The workflow scope repetition code. + Code *string `json:"code,omitempty"` + + // The correlation properties. + Correlation *RunActionCorrelation `json:"correlation,omitempty"` + + // The end time of the workflow scope repetition. + EndTime *time.Time `json:"endTime,omitempty"` + + // Anything + Error interface{} `json:"error,omitempty"` + IterationCount *int32 `json:"iterationCount,omitempty"` + + // Gets the retry histories. + RetryHistory []*RetryHistory `json:"retryHistory,omitempty"` + + // The start time of the workflow scope repetition. + StartTime *time.Time `json:"startTime,omitempty"` + + // The status of the workflow scope repetition. + Status *WorkflowStatus `json:"status,omitempty"` + + // READ-ONLY; Gets the inputs. + Inputs interface{} `json:"inputs,omitempty" azure:"ro"` + + // READ-ONLY; Gets the link to inputs. + InputsLink *ContentLink `json:"inputsLink,omitempty" azure:"ro"` + + // READ-ONLY; Gets the outputs. + Outputs interface{} `json:"outputs,omitempty" azure:"ro"` + + // READ-ONLY; Gets the link to outputs. + OutputsLink *ContentLink `json:"outputsLink,omitempty" azure:"ro"` + + // READ-ONLY; Gets the tracked properties. + TrackedProperties interface{} `json:"trackedProperties,omitempty" azure:"ro"` + + // READ-ONLY; Gets the tracking id. + TrackingID *string `json:"trackingId,omitempty" azure:"ro"` +} + +// OperationResultProperties - The run operation result properties. +type OperationResultProperties struct { + // The workflow scope repetition code. + Code *string `json:"code,omitempty"` + + // The correlation properties. + Correlation *RunActionCorrelation `json:"correlation,omitempty"` + + // The end time of the workflow scope repetition. + EndTime *time.Time `json:"endTime,omitempty"` + + // Anything + Error interface{} `json:"error,omitempty"` + + // The start time of the workflow scope repetition. + StartTime *time.Time `json:"startTime,omitempty"` + + // The status of the workflow scope repetition. + Status *WorkflowStatus `json:"status,omitempty"` +} + // OutboundEnvironmentEndpoint - Endpoints accessed for a common purpose that the App Service Environment requires outbound // network access to. type OutboundEnvironmentEndpoint struct { @@ -5518,6 +5886,9 @@ type PlanPatchResourceProperties struct { // READ-ONLY; Number of apps assigned to this App Service plan. NumberOfSites *int32 `json:"numberOfSites,omitempty" azure:"ro"` + // READ-ONLY; The number of instances that are assigned to this App Service plan. + NumberOfWorkers *int32 `json:"numberOfWorkers,omitempty" azure:"ro"` + // READ-ONLY; Provisioning state of the App Service Plan. ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` @@ -5589,6 +5960,9 @@ type PlanProperties struct { // READ-ONLY; Number of apps assigned to this App Service plan. NumberOfSites *int32 `json:"numberOfSites,omitempty" azure:"ro"` + // READ-ONLY; The number of instances that are assigned to this App Service plan. + NumberOfWorkers *int32 `json:"numberOfWorkers,omitempty" azure:"ro"` + // READ-ONLY; Provisioning state of the App Service Plan. ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` @@ -6292,39 +6666,39 @@ type ProcessThreadInfoProperties struct { // ProviderClientGetAvailableStacksOnPremOptions contains the optional parameters for the ProviderClient.GetAvailableStacksOnPrem // method. type ProviderClientGetAvailableStacksOnPremOptions struct { - OSTypeSelected *Enum20 + OSTypeSelected *Enum19 } // ProviderClientGetAvailableStacksOptions contains the optional parameters for the ProviderClient.GetAvailableStacks method. type ProviderClientGetAvailableStacksOptions struct { - OSTypeSelected *Enum15 + OSTypeSelected *Enum14 } // ProviderClientGetFunctionAppStacksForLocationOptions contains the optional parameters for the ProviderClient.GetFunctionAppStacksForLocation // method. type ProviderClientGetFunctionAppStacksForLocationOptions struct { // Stack OS Type - StackOsType *Enum17 + StackOsType *Enum16 } // ProviderClientGetFunctionAppStacksOptions contains the optional parameters for the ProviderClient.GetFunctionAppStacks // method. type ProviderClientGetFunctionAppStacksOptions struct { // Stack OS Type - StackOsType *Enum16 + StackOsType *Enum15 } // ProviderClientGetWebAppStacksForLocationOptions contains the optional parameters for the ProviderClient.GetWebAppStacksForLocation // method. type ProviderClientGetWebAppStacksForLocationOptions struct { // Stack OS Type - StackOsType *Enum18 + StackOsType *Enum17 } // ProviderClientGetWebAppStacksOptions contains the optional parameters for the ProviderClient.GetWebAppStacks method. type ProviderClientGetWebAppStacksOptions struct { // Stack OS Type - StackOsType *Enum19 + StackOsType *Enum18 } // ProviderClientListOperationsOptions contains the optional parameters for the ProviderClient.ListOperations method. @@ -6772,6 +7146,39 @@ type RecommendationsClientResetAllFiltersOptions struct { // placeholder for future optional parameters } +// RecurrenceSchedule - The recurrence schedule. +type RecurrenceSchedule struct { + // The hours. + Hours []*int32 `json:"hours,omitempty"` + + // The minutes. + Minutes []*int32 `json:"minutes,omitempty"` + + // The month days. + MonthDays []*int32 `json:"monthDays,omitempty"` + + // The monthly occurrences. + MonthlyOccurrences []*RecurrenceScheduleOccurrence `json:"monthlyOccurrences,omitempty"` + + // The days of the week. + WeekDays []*DaysOfWeek `json:"weekDays,omitempty"` +} + +// RecurrenceScheduleOccurrence - The recurrence schedule occurrence. +type RecurrenceScheduleOccurrence struct { + // The day of the week. + Day *DayOfWeek `json:"day,omitempty"` + + // The occurrence. + Occurrence *int32 `json:"occurrence,omitempty"` +} + +// RegenerateActionParameter - The access key regenerate action content. +type RegenerateActionParameter struct { + // The key type. + KeyType *KeyType `json:"keyType,omitempty"` +} + // RegistryCredentials - Container App Private Registry type RegistryCredentials struct { // The name of the Secret that contains the registry login password @@ -6954,39 +7361,105 @@ type RenewCertificateOrderRequestProperties struct { KeySize *int32 `json:"keySize,omitempty"` } -// RequestsBasedTrigger - Trigger based on total requests. -type RequestsBasedTrigger struct { - // Request Count. - Count *int32 `json:"count,omitempty"` +// RepetitionIndex - The workflow run action repetition index. +type RepetitionIndex struct { + // REQUIRED; The index. + ItemIndex *int32 `json:"itemIndex,omitempty"` - // Time interval. - TimeInterval *string `json:"timeInterval,omitempty"` + // The scope. + ScopeName *string `json:"scopeName,omitempty"` } -// Resource - Azure resource. This resource is tracked in Azure Resource Manager -type Resource struct { - // REQUIRED; Resource Location. +// Request - A request. +type Request struct { + // A list of all the headers attached to the request. + Headers interface{} `json:"headers,omitempty"` + + // The HTTP method used for the request. + Method *string `json:"method,omitempty"` + + // The destination for the request. + URI *string `json:"uri,omitempty"` +} + +// RequestHistory - The request history. +type RequestHistory struct { + // The resource location. Location *string `json:"location,omitempty"` - // Kind of resource. - Kind *string `json:"kind,omitempty"` + // The request history properties. + Properties *RequestHistoryProperties `json:"properties,omitempty"` - // Resource tags. + // The resource tags. Tags map[string]*string `json:"tags,omitempty"` - // READ-ONLY; Resource Id. + // READ-ONLY; The resource id. ID *string `json:"id,omitempty" azure:"ro"` - // READ-ONLY; Resource Name. + // READ-ONLY; Gets the resource name. Name *string `json:"name,omitempty" azure:"ro"` - // READ-ONLY; Resource type. + // READ-ONLY; Gets the resource type. Type *string `json:"type,omitempty" azure:"ro"` } -// ResourceCollection - Collection of resources. -type ResourceCollection struct { - // REQUIRED; Collection of resources. +// RequestHistoryListResult - The list of workflow request histories. +type RequestHistoryListResult struct { + // The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` + + // A list of workflow request histories. + Value []*RequestHistory `json:"value,omitempty"` +} + +// RequestHistoryProperties - The request history. +type RequestHistoryProperties struct { + // The time the request ended. + EndTime *time.Time `json:"endTime,omitempty"` + + // The request. + Request *Request `json:"request,omitempty"` + + // The response. + Response *Response `json:"response,omitempty"` + + // The time the request started. + StartTime *time.Time `json:"startTime,omitempty"` +} + +// RequestsBasedTrigger - Trigger based on total requests. +type RequestsBasedTrigger struct { + // Request Count. + Count *int32 `json:"count,omitempty"` + + // Time interval. + TimeInterval *string `json:"timeInterval,omitempty"` +} + +// Resource - Azure resource. This resource is tracked in Azure Resource Manager +type Resource struct { + // REQUIRED; Resource Location. + Location *string `json:"location,omitempty"` + + // Kind of resource. + Kind *string `json:"kind,omitempty"` + + // Resource tags. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Resource Id. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; Resource Name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Resource type. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// ResourceCollection - Collection of resources. +type ResourceCollection struct { + // REQUIRED; Collection of resources. Value []*string `json:"value,omitempty"` // READ-ONLY; Link to next page of resources. @@ -7145,6 +7618,30 @@ type ResourceNameAvailabilityRequest struct { IsFqdn *bool `json:"isFqdn,omitempty"` } +// ResourceReference - The resource reference. +type ResourceReference struct { + // The resource id. + ID *string `json:"id,omitempty"` + + // READ-ONLY; Gets the resource name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Gets the resource type. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// Response - A response. +type Response struct { + // Details on the location of the body content. + BodyLink *ContentLink `json:"bodyLink,omitempty"` + + // A list of all the headers attached to the response. + Headers interface{} `json:"headers,omitempty"` + + // The status code of the response. + StatusCode *int32 `json:"statusCode,omitempty"` +} + // ResponseMessageEnvelopeRemotePrivateEndpointConnection - Message envelope that contains the common Azure resource manager // properties and the resource provider specific content. type ResponseMessageEnvelopeRemotePrivateEndpointConnection struct { @@ -7249,6 +7746,27 @@ type RestoreRequestProperties struct { SiteName *string `json:"siteName,omitempty"` } +// RetryHistory - The retry history. +type RetryHistory struct { + // Gets the client request Id. + ClientRequestID *string `json:"clientRequestId,omitempty"` + + // Gets the status code. + Code *string `json:"code,omitempty"` + + // Gets the end time. + EndTime *time.Time `json:"endTime,omitempty"` + + // Gets the error response. + Error *ErrorResponse `json:"error,omitempty"` + + // Gets the service request Id. + ServiceRequestID *string `json:"serviceRequestId,omitempty"` + + // Gets the start time. + StartTime *time.Time `json:"startTime,omitempty"` +} + // Revision - Container App Revision. type Revision struct { // REQUIRED; Resource Location. @@ -7313,6 +7831,27 @@ type RevisionProperties struct { TrafficWeight *int32 `json:"trafficWeight,omitempty" azure:"ro"` } +// RunActionCorrelation - The workflow run action correlation properties. +type RunActionCorrelation struct { + // The action tracking identifier. + ActionTrackingID *string `json:"actionTrackingId,omitempty"` + + // The client keywords. + ClientKeywords []*string `json:"clientKeywords,omitempty"` + + // The client tracking identifier. + ClientTrackingID *string `json:"clientTrackingId,omitempty"` +} + +// RunCorrelation - The correlation properties. +type RunCorrelation struct { + // The client keywords. + ClientKeywords []*string `json:"clientKeywords,omitempty"` + + // The client tracking identifier. + ClientTrackingID *string `json:"clientTrackingId,omitempty"` +} + // SKUCapacity - Description of the App Service plan scale options. type SKUCapacity struct { // Default number of workers for this App Service plan SKU. @@ -8404,6 +8943,9 @@ type SiteProperties struct { // Identity to use for Key Vault Reference authentication. KeyVaultReferenceIdentity *string `json:"keyVaultReferenceIdentity,omitempty"` + // Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string. + PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` + // Site redundancy mode RedundancyMode *RedundancyMode `json:"redundancyMode,omitempty"` @@ -8427,6 +8969,16 @@ type SiteProperties struct { // /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} VirtualNetworkSubnetID *string `json:"virtualNetworkSubnetId,omitempty"` + // To enable accessing content over virtual network + VnetContentShareEnabled *bool `json:"vnetContentShareEnabled,omitempty"` + + // To enable pulling image over Virtual Network + VnetImagePullEnabled *bool `json:"vnetImagePullEnabled,omitempty"` + + // Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined + // Routes applied. + VnetRouteAllEnabled *bool `json:"vnetRouteAllEnabled,omitempty"` + // READ-ONLY; Management information availability state for the app. AvailabilityState *SiteAvailabilityState `json:"availabilityState,omitempty" azure:"ro"` @@ -8915,6 +9467,10 @@ type StaticSite struct { // The provider that submitted the last deployment to the primary environment of the static site. Provider *string `json:"provider,omitempty"` + // State indicating whether public traffic are allowed or not for a static web app. Allowed Values: 'Enabled', 'Disabled' + // or an empty string. + PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` + // A user's github repository token. This is used to setup the Github Actions workflow file and API secrets. RepositoryToken *string `json:"repositoryToken,omitempty"` @@ -8939,6 +9495,9 @@ type StaticSite struct { // READ-ONLY; Identity to use for Key Vault Reference authentication. KeyVaultReferenceIdentity *string `json:"keyVaultReferenceIdentity,omitempty" azure:"ro"` + // READ-ONLY; Backends linked to the static side + LinkedBackends []*StaticSiteLinkedBackend `json:"linkedBackends,omitempty" azure:"ro"` + // READ-ONLY; Private endpoint connections PrivateEndpointConnections []*ResponseMessageEnvelopeRemotePrivateEndpointConnection `json:"privateEndpointConnections,omitempty" azure:"ro"` @@ -9008,6 +9567,9 @@ type StaticSiteBuildARMResourceProperties struct { // READ-ONLY; When this build was updated. LastUpdatedOn *time.Time `json:"lastUpdatedOn,omitempty" azure:"ro"` + // READ-ONLY; Backends linked to the static side build + LinkedBackends []*StaticSiteLinkedBackend `json:"linkedBackends,omitempty" azure:"ro"` + // READ-ONLY; The title of a pull request that a static site build is related to. PullRequestTitle *string `json:"pullRequestTitle,omitempty" azure:"ro"` @@ -9172,6 +9734,63 @@ type StaticSiteFunctionOverviewCollection struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } +// StaticSiteLinkedBackend - Static Site Linked Backend ARM resource. +type StaticSiteLinkedBackend struct { + // The resource id of the backend linked to the static site + BackendResourceID *string `json:"backendResourceId,omitempty"` + + // The region of the backend linked to the static site + Region *string `json:"region,omitempty"` + + // READ-ONLY; The date and time on which the backend was linked to the static site. + CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"` + + // READ-ONLY; The provisioning state of the linking process. + ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` +} + +// StaticSiteLinkedBackendARMResource - Static Site Linked Backend ARM resource. +type StaticSiteLinkedBackendARMResource struct { + // Kind of resource. + Kind *string `json:"kind,omitempty"` + + // StaticSiteLinkedBackendARMResource resource specific properties + Properties *StaticSiteLinkedBackendARMResourceProperties `json:"properties,omitempty"` + + // READ-ONLY; Resource Id. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; Resource Name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Resource type. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// StaticSiteLinkedBackendARMResourceProperties - StaticSiteLinkedBackendARMResource resource specific properties +type StaticSiteLinkedBackendARMResourceProperties struct { + // The resource id of the backend linked to the static site + BackendResourceID *string `json:"backendResourceId,omitempty"` + + // The region of the backend linked to the static site + Region *string `json:"region,omitempty"` + + // READ-ONLY; The date and time on which the backend was linked to the static site. + CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"` + + // READ-ONLY; The provisioning state of the linking process. + ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` +} + +// StaticSiteLinkedBackendsCollection - Collection of static site linked backends. +type StaticSiteLinkedBackendsCollection struct { + // REQUIRED; Collection of resources. + Value []*StaticSiteLinkedBackendARMResource `json:"value,omitempty"` + + // READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty" azure:"ro"` +} + // StaticSitePatchResource - ARM resource for a static site when patching type StaticSitePatchResource struct { // Kind of resource. @@ -9516,6 +10135,19 @@ type StaticSitesClientBeginDetachStaticSiteOptions struct { 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 { @@ -9536,6 +10168,20 @@ type StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions 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 { @@ -9591,6 +10237,29 @@ type StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions 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.GetLinkedBackendsForBuild +// method. +type StaticSitesClientGetLinkedBackendsForBuildOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetLinkedBackendsOptions contains the optional parameters for the StaticSitesClient.GetLinkedBackends +// method. +type StaticSitesClientGetLinkedBackendsOptions struct { + // placeholder for future optional parameters +} + // StaticSitesClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the StaticSitesClient.GetPrivateEndpointConnectionList // method. type StaticSitesClientGetPrivateEndpointConnectionListOptions struct { @@ -9738,6 +10407,19 @@ 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 +} + // StaticSitesClientUpdateStaticSiteOptions contains the optional parameters for the StaticSitesClient.UpdateStaticSite method. type StaticSitesClientUpdateStaticSiteOptions struct { // placeholder for future optional parameters @@ -9943,6 +10625,12 @@ type StringList struct { Type *string `json:"type,omitempty" azure:"ro"` } +// SubResource - The sub resource type. +type SubResource struct { + // READ-ONLY; The resource id. + ID *string `json:"id,omitempty" azure:"ro"` +} + // SupportTopic - Defines a unique Support Topic type SupportTopic struct { // READ-ONLY; Support Topic Id @@ -10218,6 +10906,9 @@ type TriggeredWebJobProperties struct { // Latest job run information. LatestRun *TriggeredJobRun `json:"latest_run,omitempty"` + // Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string. + PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` + // Run command. RunCommand *string `json:"run_command,omitempty"` @@ -10227,6 +10918,9 @@ type TriggeredWebJobProperties struct { // Job settings. Settings map[string]interface{} `json:"settings,omitempty"` + // Checks if Customer provided storage account is required + StorageAccountRequired *bool `json:"storageAccountRequired,omitempty"` + // Job URL. URL *string `json:"url,omitempty"` @@ -10963,6 +11657,20 @@ type WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions struct { 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 { @@ -12516,6 +13224,12 @@ type WebAppsClientListProcessesSlotOptions struct { // placeholder for future optional parameters } +// WebAppsClientListProductionSiteDeploymentStatusesOptions contains the optional parameters for the WebAppsClient.ListProductionSiteDeploymentStatuses +// method. +type WebAppsClientListProductionSiteDeploymentStatusesOptions struct { + // placeholder for future optional parameters +} + // WebAppsClientListPublicCertificatesOptions contains the optional parameters for the WebAppsClient.ListPublicCertificates // method. type WebAppsClientListPublicCertificatesOptions struct { @@ -12602,6 +13316,12 @@ type WebAppsClientListSlotDifferencesSlotOptions struct { // placeholder for future optional parameters } +// WebAppsClientListSlotSiteDeploymentStatusesSlotOptions contains the optional parameters for the WebAppsClient.ListSlotSiteDeploymentStatusesSlot +// method. +type WebAppsClientListSlotSiteDeploymentStatusesSlotOptions struct { + // placeholder for future optional parameters +} + // WebAppsClientListSlotsOptions contains the optional parameters for the WebAppsClient.ListSlots method. type WebAppsClientListSlotsOptions struct { // placeholder for future optional parameters @@ -13260,7 +13980,8 @@ type WebSiteManagementClientListBillingMetersOptions struct { // WebSiteManagementClientListCustomHostNameSitesOptions contains the optional parameters for the WebSiteManagementClient.ListCustomHostNameSites // method. type WebSiteManagementClientListCustomHostNameSitesOptions struct { - // placeholder for future optional parameters + // Specific hostname + Hostname *string } // WebSiteManagementClientListGeoRegionsOptions contains the optional parameters for the WebSiteManagementClient.ListGeoRegions @@ -13407,3 +14128,812 @@ type WorkerPoolResource struct { // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` } + +// Workflow - The workflow type. +type Workflow struct { + // Managed service identity. + Identity *ManagedServiceIdentity `json:"identity,omitempty"` + + // The resource location. + Location *string `json:"location,omitempty"` + + // The workflow properties. + Properties *WorkflowProperties `json:"properties,omitempty"` + + // The resource tags. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; The resource id. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; Gets the resource name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Gets the resource type. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// WorkflowFilter - The workflow filter. +type WorkflowFilter struct { + // The state of workflows. + State *WorkflowState `json:"state,omitempty"` +} + +// WorkflowListResult - The list of workflows. +type WorkflowListResult struct { + // The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` + + // The list of workflows. + Value []*Workflow `json:"value,omitempty"` +} + +// WorkflowOutputParameter - The workflow output parameter. +type WorkflowOutputParameter struct { + // The description. + Description *string `json:"description,omitempty"` + + // The metadata. + Metadata interface{} `json:"metadata,omitempty"` + + // The type. + Type *ParameterType `json:"type,omitempty"` + + // The value. + Value interface{} `json:"value,omitempty"` + + // READ-ONLY; Gets the error. + Error interface{} `json:"error,omitempty" azure:"ro"` +} + +// WorkflowParameter - The workflow parameters. +type WorkflowParameter struct { + // The description. + Description *string `json:"description,omitempty"` + + // The metadata. + Metadata interface{} `json:"metadata,omitempty"` + + // The type. + Type *ParameterType `json:"type,omitempty"` + + // The value. + Value interface{} `json:"value,omitempty"` +} + +// WorkflowProperties - The workflow properties. +type WorkflowProperties struct { + // The access control configuration. + AccessControl *FlowAccessControlConfiguration `json:"accessControl,omitempty"` + + // The definition. + Definition interface{} `json:"definition,omitempty"` + + // The endpoints configuration. + EndpointsConfiguration *FlowEndpointsConfiguration `json:"endpointsConfiguration,omitempty"` + + // The integration account. + IntegrationAccount *ResourceReference `json:"integrationAccount,omitempty"` + + // The integration service environment. + IntegrationServiceEnvironment *ResourceReference `json:"integrationServiceEnvironment,omitempty"` + + // The workflow kind. + Kind *Kind `json:"kind,omitempty"` + + // The parameters. + Parameters map[string]*WorkflowParameter `json:"parameters,omitempty"` + + // The state. + State *WorkflowState `json:"state,omitempty"` + + // READ-ONLY; Gets the access endpoint. + AccessEndpoint *string `json:"accessEndpoint,omitempty" azure:"ro"` + + // READ-ONLY; Gets the changed time. + ChangedTime *time.Time `json:"changedTime,omitempty" azure:"ro"` + + // READ-ONLY; Gets the created time. + CreatedTime *time.Time `json:"createdTime,omitempty" azure:"ro"` + + // READ-ONLY; Gets the provisioning state. + ProvisioningState *WorkflowProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + + // READ-ONLY; The sku. + SKU *WorkflowSKU `json:"sku,omitempty" azure:"ro"` + + // READ-ONLY; Gets the version. + Version *string `json:"version,omitempty" azure:"ro"` +} + +// WorkflowResource - The base resource type. +type WorkflowResource struct { + // The resource location. + Location *string `json:"location,omitempty"` + + // The resource tags. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; The resource id. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; Gets the resource name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Gets the resource type. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// WorkflowRun - The workflow run. +type WorkflowRun struct { + // The workflow run properties. + Properties *WorkflowRunProperties `json:"properties,omitempty"` + + // READ-ONLY; The resource id. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; Gets the workflow run name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Gets the workflow run type. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// WorkflowRunAction - The workflow run action. +type WorkflowRunAction struct { + // The workflow run action properties. + Properties *WorkflowRunActionProperties `json:"properties,omitempty"` + + // READ-ONLY; The resource id. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; Gets the workflow run action name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Gets the workflow run action type. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// WorkflowRunActionFilter - The workflow run action filter. +type WorkflowRunActionFilter struct { + // The status of workflow run action. + Status *WorkflowStatus `json:"status,omitempty"` +} + +// WorkflowRunActionListResult - The list of workflow run actions. +type WorkflowRunActionListResult struct { + // The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` + + // A list of workflow run actions. + Value []*WorkflowRunAction `json:"value,omitempty"` +} + +// WorkflowRunActionProperties - The workflow run action properties. +type WorkflowRunActionProperties struct { + // The correlation properties. + Correlation *RunActionCorrelation `json:"correlation,omitempty"` + + // Gets the retry histories. + RetryHistory []*RetryHistory `json:"retryHistory,omitempty"` + + // READ-ONLY; Gets the code. + Code *string `json:"code,omitempty" azure:"ro"` + + // READ-ONLY; Gets the end time. + EndTime *time.Time `json:"endTime,omitempty" azure:"ro"` + + // READ-ONLY; Gets the error. + Error interface{} `json:"error,omitempty" azure:"ro"` + + // READ-ONLY; Gets the link to inputs. + InputsLink *ContentLink `json:"inputsLink,omitempty" azure:"ro"` + + // READ-ONLY; Gets the link to outputs. + OutputsLink *ContentLink `json:"outputsLink,omitempty" azure:"ro"` + + // READ-ONLY; Gets the start time. + StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` + + // READ-ONLY; Gets the status. + Status *WorkflowStatus `json:"status,omitempty" azure:"ro"` + + // READ-ONLY; Gets the tracked properties. + TrackedProperties interface{} `json:"trackedProperties,omitempty" azure:"ro"` + + // READ-ONLY; Gets the tracking id. + TrackingID *string `json:"trackingId,omitempty" azure:"ro"` +} + +// WorkflowRunActionRepetitionDefinition - The workflow run action repetition definition. +type WorkflowRunActionRepetitionDefinition struct { + // REQUIRED; The workflow run action repetition properties definition. + Properties *WorkflowRunActionRepetitionProperties `json:"properties,omitempty"` + + // The resource location. + Location *string `json:"location,omitempty"` + + // The resource tags. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; The resource id. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; Gets the resource name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Gets the resource type. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// WorkflowRunActionRepetitionDefinitionCollection - A collection of workflow run action repetitions. +type WorkflowRunActionRepetitionDefinitionCollection struct { + // The link used to get the next page of recommendations. + NextLink *string `json:"nextLink,omitempty"` + Value []*WorkflowRunActionRepetitionDefinition `json:"value,omitempty"` +} + +// WorkflowRunActionRepetitionProperties - The workflow run action repetition properties definition. +type WorkflowRunActionRepetitionProperties struct { + // The workflow scope repetition code. + Code *string `json:"code,omitempty"` + + // The correlation properties. + Correlation *RunActionCorrelation `json:"correlation,omitempty"` + + // The end time of the workflow scope repetition. + EndTime *time.Time `json:"endTime,omitempty"` + + // Anything + Error interface{} `json:"error,omitempty"` + IterationCount *int32 `json:"iterationCount,omitempty"` + + // The repetition indexes. + RepetitionIndexes []*RepetitionIndex `json:"repetitionIndexes,omitempty"` + + // Gets the retry histories. + RetryHistory []*RetryHistory `json:"retryHistory,omitempty"` + + // The start time of the workflow scope repetition. + StartTime *time.Time `json:"startTime,omitempty"` + + // The status of the workflow scope repetition. + Status *WorkflowStatus `json:"status,omitempty"` + + // READ-ONLY; Gets the inputs. + Inputs interface{} `json:"inputs,omitempty" azure:"ro"` + + // READ-ONLY; Gets the link to inputs. + InputsLink *ContentLink `json:"inputsLink,omitempty" azure:"ro"` + + // READ-ONLY; Gets the outputs. + Outputs interface{} `json:"outputs,omitempty" azure:"ro"` + + // READ-ONLY; Gets the link to outputs. + OutputsLink *ContentLink `json:"outputsLink,omitempty" azure:"ro"` + + // READ-ONLY; Gets the tracked properties. + TrackedProperties interface{} `json:"trackedProperties,omitempty" azure:"ro"` + + // READ-ONLY; Gets the tracking id. + TrackingID *string `json:"trackingId,omitempty" azure:"ro"` +} + +// 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.ListExpressionTraces +// method. +type WorkflowRunActionRepetitionsClientListExpressionTracesOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionRepetitionsClientListOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.List +// 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.List +// 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.List +// 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.ListExpressionTraces +// method. +type WorkflowRunActionsClientListExpressionTracesOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionsClientListOptions contains the optional parameters for the WorkflowRunActionsClient.List 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. + Status *WorkflowStatus `json:"status,omitempty"` +} + +// WorkflowRunListResult - The list of workflow runs. +type WorkflowRunListResult struct { + // The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` + + // A list of workflow runs. + Value []*WorkflowRun `json:"value,omitempty"` +} + +// WorkflowRunProperties - The workflow run properties. +type WorkflowRunProperties struct { + // The run correlation. + Correlation *Correlation `json:"correlation,omitempty"` + + // READ-ONLY; Gets the code. + Code *string `json:"code,omitempty" azure:"ro"` + + // READ-ONLY; Gets the correlation id. + CorrelationID *string `json:"correlationId,omitempty" azure:"ro"` + + // READ-ONLY; Gets the end time. + EndTime *time.Time `json:"endTime,omitempty" azure:"ro"` + + // READ-ONLY; Gets the error. + Error interface{} `json:"error,omitempty" azure:"ro"` + + // READ-ONLY; Gets the outputs. + Outputs map[string]*WorkflowOutputParameter `json:"outputs,omitempty" azure:"ro"` + + // READ-ONLY; Gets the response of the flow run. + Response *WorkflowRunTrigger `json:"response,omitempty" azure:"ro"` + + // READ-ONLY; Gets the start time. + StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` + + // READ-ONLY; Gets the status. + Status *WorkflowStatus `json:"status,omitempty" azure:"ro"` + + // READ-ONLY; Gets the fired trigger. + Trigger *WorkflowRunTrigger `json:"trigger,omitempty" azure:"ro"` + + // READ-ONLY; Gets the wait end time. + WaitEndTime *time.Time `json:"waitEndTime,omitempty" azure:"ro"` + + // READ-ONLY; Gets the reference to workflow version. + Workflow *ResourceReference `json:"workflow,omitempty" azure:"ro"` +} + +// WorkflowRunTrigger - The workflow run trigger. +type WorkflowRunTrigger struct { + // The run correlation. + Correlation *Correlation `json:"correlation,omitempty"` + + // READ-ONLY; Gets the code. + Code *string `json:"code,omitempty" azure:"ro"` + + // READ-ONLY; Gets the end time. + EndTime *time.Time `json:"endTime,omitempty" azure:"ro"` + + // READ-ONLY; Gets the error. + Error interface{} `json:"error,omitempty" azure:"ro"` + + // READ-ONLY; Gets the inputs. + Inputs interface{} `json:"inputs,omitempty" azure:"ro"` + + // READ-ONLY; Gets the link to inputs. + InputsLink *ContentLink `json:"inputsLink,omitempty" azure:"ro"` + + // READ-ONLY; Gets the name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Gets the outputs. + Outputs interface{} `json:"outputs,omitempty" azure:"ro"` + + // READ-ONLY; Gets the link to outputs. + OutputsLink *ContentLink `json:"outputsLink,omitempty" azure:"ro"` + + // READ-ONLY; Gets the scheduled time. + ScheduledTime *time.Time `json:"scheduledTime,omitempty" azure:"ro"` + + // READ-ONLY; Gets the start time. + StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` + + // READ-ONLY; Gets the status. + Status *WorkflowStatus `json:"status,omitempty" azure:"ro"` + + // READ-ONLY; Gets the tracked properties. + TrackedProperties interface{} `json:"trackedProperties,omitempty" azure:"ro"` + + // READ-ONLY; Gets the tracking id. + TrackingID *string `json:"trackingId,omitempty" azure:"ro"` +} + +// 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.List 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. + Name *WorkflowSKUName `json:"name,omitempty"` + + // The reference to plan. + Plan *ResourceReference `json:"plan,omitempty"` +} + +// WorkflowTrigger - The workflow trigger. +type WorkflowTrigger struct { + // The workflow trigger properties. + Properties *WorkflowTriggerProperties `json:"properties,omitempty"` + + // READ-ONLY; The resource id. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; Gets the workflow trigger name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Gets the workflow trigger type. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// WorkflowTriggerCallbackURL - The workflow trigger callback URL. +type WorkflowTriggerCallbackURL struct { + // Gets the workflow trigger callback URL query parameters. + Queries *WorkflowTriggerListCallbackURLQueries `json:"queries,omitempty"` + + // Gets the workflow trigger callback URL relative path parameters. + RelativePathParameters []*string `json:"relativePathParameters,omitempty"` + + // READ-ONLY; Gets the workflow trigger callback URL base path. + BasePath *string `json:"basePath,omitempty" azure:"ro"` + + // READ-ONLY; Gets the workflow trigger callback URL HTTP method. + Method *string `json:"method,omitempty" azure:"ro"` + + // READ-ONLY; Gets the workflow trigger callback URL relative path. + RelativePath *string `json:"relativePath,omitempty" azure:"ro"` + + // READ-ONLY; Gets the workflow trigger callback URL. + Value *string `json:"value,omitempty" azure:"ro"` +} + +// WorkflowTriggerFilter - The workflow trigger filter. +type WorkflowTriggerFilter struct { + // The state of workflow trigger. + State *WorkflowState `json:"state,omitempty"` +} + +// 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.List +// 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. + Properties *WorkflowTriggerHistoryProperties `json:"properties,omitempty"` + + // READ-ONLY; The resource id. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; Gets the workflow trigger history name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Gets the workflow trigger history type. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// WorkflowTriggerHistoryFilter - The workflow trigger history filter. +type WorkflowTriggerHistoryFilter struct { + // The status of workflow trigger history. + Status *WorkflowStatus `json:"status,omitempty"` +} + +// WorkflowTriggerHistoryListResult - The list of workflow trigger histories. +type WorkflowTriggerHistoryListResult struct { + // The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` + + // A list of workflow trigger histories. + Value []*WorkflowTriggerHistory `json:"value,omitempty"` +} + +// WorkflowTriggerHistoryProperties - The workflow trigger history properties. +type WorkflowTriggerHistoryProperties struct { + // The run correlation. + Correlation *Correlation `json:"correlation,omitempty"` + + // READ-ONLY; Gets the code. + Code *string `json:"code,omitempty" azure:"ro"` + + // READ-ONLY; Gets the end time. + EndTime *time.Time `json:"endTime,omitempty" azure:"ro"` + + // READ-ONLY; Gets the error. + Error interface{} `json:"error,omitempty" azure:"ro"` + + // READ-ONLY; The value indicating whether trigger was fired. + Fired *bool `json:"fired,omitempty" azure:"ro"` + + // READ-ONLY; Gets the link to input parameters. + InputsLink *ContentLink `json:"inputsLink,omitempty" azure:"ro"` + + // READ-ONLY; Gets the link to output parameters. + OutputsLink *ContentLink `json:"outputsLink,omitempty" azure:"ro"` + + // READ-ONLY; Gets the reference to workflow run. + Run *ResourceReference `json:"run,omitempty" azure:"ro"` + + // READ-ONLY; The scheduled time. + ScheduledTime *time.Time `json:"scheduledTime,omitempty" azure:"ro"` + + // READ-ONLY; Gets the start time. + StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` + + // READ-ONLY; Gets the status. + Status *WorkflowStatus `json:"status,omitempty" azure:"ro"` + + // READ-ONLY; Gets the tracking id. + TrackingID *string `json:"trackingId,omitempty" azure:"ro"` +} + +// WorkflowTriggerListCallbackURLQueries - Gets the workflow trigger callback URL query parameters. +type WorkflowTriggerListCallbackURLQueries struct { + // The api version. + APIVersion *string `json:"api-version,omitempty"` + + // The SAS timestamp. + Se *string `json:"se,omitempty"` + + // The SAS signature. + Sig *string `json:"sig,omitempty"` + + // The SAS permissions. + Sp *string `json:"sp,omitempty"` + + // The SAS version. + Sv *string `json:"sv,omitempty"` +} + +// WorkflowTriggerListResult - The list of workflow triggers. +type WorkflowTriggerListResult struct { + // The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` + + // A list of workflow triggers. + Value []*WorkflowTrigger `json:"value,omitempty"` +} + +// WorkflowTriggerProperties - The workflow trigger properties. +type WorkflowTriggerProperties struct { + // READ-ONLY; Gets the changed time. + ChangedTime *time.Time `json:"changedTime,omitempty" azure:"ro"` + + // READ-ONLY; Gets the created time. + CreatedTime *time.Time `json:"createdTime,omitempty" azure:"ro"` + + // READ-ONLY; Gets the last execution time. + LastExecutionTime *time.Time `json:"lastExecutionTime,omitempty" azure:"ro"` + + // READ-ONLY; Gets the next execution time. + NextExecutionTime *time.Time `json:"nextExecutionTime,omitempty" azure:"ro"` + + // READ-ONLY; Gets the provisioning state. + ProvisioningState *WorkflowTriggerProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + + // READ-ONLY; Gets the workflow trigger recurrence. + Recurrence *WorkflowTriggerRecurrence `json:"recurrence,omitempty" azure:"ro"` + + // READ-ONLY; Gets the state. + State *WorkflowState `json:"state,omitempty" azure:"ro"` + + // READ-ONLY; Gets the status. + Status *WorkflowStatus `json:"status,omitempty" azure:"ro"` + + // READ-ONLY; Gets the reference to workflow. + Workflow *ResourceReference `json:"workflow,omitempty" azure:"ro"` +} + +// WorkflowTriggerRecurrence - The workflow trigger recurrence. +type WorkflowTriggerRecurrence struct { + // The end time. + EndTime *string `json:"endTime,omitempty"` + + // The frequency. + Frequency *RecurrenceFrequency `json:"frequency,omitempty"` + + // The interval. + Interval *int32 `json:"interval,omitempty"` + + // The recurrence schedule. + Schedule *RecurrenceSchedule `json:"schedule,omitempty"` + + // The start time. + StartTime *string `json:"startTime,omitempty"` + + // The time zone. + TimeZone *string `json:"timeZone,omitempty"` +} + +// 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.List 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. + Location *string `json:"location,omitempty"` + + // The workflow version properties. + Properties *WorkflowVersionProperties `json:"properties,omitempty"` + + // The resource tags. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; The resource id. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; Gets the resource name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Gets the resource type. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// WorkflowVersionListResult - The list of workflow versions. +type WorkflowVersionListResult struct { + // The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` + + // A list of workflow versions. + Value []*WorkflowVersion `json:"value,omitempty"` +} + +// WorkflowVersionProperties - The workflow version properties. +type WorkflowVersionProperties struct { + // The access control configuration. + AccessControl *FlowAccessControlConfiguration `json:"accessControl,omitempty"` + + // The definition. + Definition interface{} `json:"definition,omitempty"` + + // The endpoints configuration. + EndpointsConfiguration *FlowEndpointsConfiguration `json:"endpointsConfiguration,omitempty"` + + // The integration account. + IntegrationAccount *ResourceReference `json:"integrationAccount,omitempty"` + + // The parameters. + Parameters map[string]*WorkflowParameter `json:"parameters,omitempty"` + + // The state. + State *WorkflowState `json:"state,omitempty"` + + // READ-ONLY; Gets the access endpoint. + AccessEndpoint *string `json:"accessEndpoint,omitempty" azure:"ro"` + + // READ-ONLY; Gets the changed time. + ChangedTime *time.Time `json:"changedTime,omitempty" azure:"ro"` + + // READ-ONLY; Gets the created time. + CreatedTime *time.Time `json:"createdTime,omitempty" azure:"ro"` + + // READ-ONLY; The provisioning state. + ProvisioningState *WorkflowProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + + // READ-ONLY; The sku. + SKU *WorkflowSKU `json:"sku,omitempty" azure:"ro"` + + // READ-ONLY; Gets the version. + Version *string `json:"version,omitempty" azure:"ro"` +} + +// 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.List 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 new file mode 100644 index 000000000000..4c4a8958f8fa --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/models_serde.go @@ -0,0 +1,26168 @@ +//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 + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "reflect" +) + +// MarshalJSON implements the json.Marshaller interface for type APIDefinitionInfo. +func (a APIDefinitionInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "url", a.URL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIDefinitionInfo. +func (a *APIDefinitionInfo) 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 "url": + err = unpopulate(val, "URL", &a.URL) + 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 APIKVReference. +func (a APIKVReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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 APIKVReference. +func (a *APIKVReference) 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 APIKVReferenceCollection. +func (a APIKVReferenceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIKVReferenceCollection. +func (a *APIKVReferenceCollection) 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 APIKVReferenceProperties. +func (a APIKVReferenceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "activeVersion", a.ActiveVersion) + populate(objectMap, "details", a.Details) + populate(objectMap, "identityType", a.IdentityType) + populate(objectMap, "reference", a.Reference) + populate(objectMap, "secretName", a.SecretName) + populate(objectMap, "secretVersion", a.SecretVersion) + objectMap["source"] = "KeyVault" + populate(objectMap, "status", a.Status) + populate(objectMap, "vaultName", a.VaultName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIKVReferenceProperties. +func (a *APIKVReferenceProperties) 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 "activeVersion": + err = unpopulate(val, "ActiveVersion", &a.ActiveVersion) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &a.Details) + delete(rawMsg, key) + case "identityType": + err = unpopulate(val, "IdentityType", &a.IdentityType) + delete(rawMsg, key) + case "reference": + err = unpopulate(val, "Reference", &a.Reference) + delete(rawMsg, key) + case "secretName": + err = unpopulate(val, "SecretName", &a.SecretName) + delete(rawMsg, key) + case "secretVersion": + err = unpopulate(val, "SecretVersion", &a.SecretVersion) + delete(rawMsg, key) + case "source": + err = unpopulate(val, "Source", &a.Source) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + case "vaultName": + err = unpopulate(val, "VaultName", &a.VaultName) + 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 APIManagementConfig. +func (a APIManagementConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", a.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementConfig. +func (a *APIManagementConfig) 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) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AbnormalTimePeriod. +func (a AbnormalTimePeriod) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populateTimeRFC3339(objectMap, "endTime", a.EndTime) + populate(objectMap, "events", a.Events) + populate(objectMap, "solutions", a.Solutions) + populateTimeRFC3339(objectMap, "startTime", a.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AbnormalTimePeriod. +func (a *AbnormalTimePeriod) 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 "endTime": + err = unpopulateTimeRFC3339(val, "EndTime", &a.EndTime) + delete(rawMsg, key) + case "events": + err = unpopulate(val, "Events", &a.Events) + delete(rawMsg, key) + case "solutions": + err = unpopulate(val, "Solutions", &a.Solutions) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, "StartTime", &a.StartTime) + 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 Address. +func (a Address) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "address1", a.Address1) + populate(objectMap, "address2", a.Address2) + populate(objectMap, "city", a.City) + populate(objectMap, "country", a.Country) + populate(objectMap, "postalCode", a.PostalCode) + populate(objectMap, "state", a.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Address. +func (a *Address) 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 "address1": + err = unpopulate(val, "Address1", &a.Address1) + delete(rawMsg, key) + case "address2": + err = unpopulate(val, "Address2", &a.Address2) + delete(rawMsg, key) + case "city": + err = unpopulate(val, "City", &a.City) + delete(rawMsg, key) + case "country": + err = unpopulate(val, "Country", &a.Country) + delete(rawMsg, key) + case "postalCode": + err = unpopulate(val, "PostalCode", &a.PostalCode) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &a.State) + 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 AddressResponse. +func (a AddressResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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 AddressResponse. +func (a *AddressResponse) 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 AddressResponseProperties. +func (a AddressResponseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "internalIpAddress", a.InternalIPAddress) + populate(objectMap, "outboundIpAddresses", a.OutboundIPAddresses) + populate(objectMap, "serviceIpAddress", a.ServiceIPAddress) + populate(objectMap, "vipMappings", a.VipMappings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AddressResponseProperties. +func (a *AddressResponseProperties) 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 "internalIpAddress": + err = unpopulate(val, "InternalIPAddress", &a.InternalIPAddress) + delete(rawMsg, key) + case "outboundIpAddresses": + err = unpopulate(val, "OutboundIPAddresses", &a.OutboundIPAddresses) + delete(rawMsg, key) + case "serviceIpAddress": + err = unpopulate(val, "ServiceIPAddress", &a.ServiceIPAddress) + delete(rawMsg, key) + case "vipMappings": + err = unpopulate(val, "VipMappings", &a.VipMappings) + 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 AllowedAudiencesValidation. +func (a AllowedAudiencesValidation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allowedAudiences", a.AllowedAudiences) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AllowedAudiencesValidation. +func (a *AllowedAudiencesValidation) 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 "allowedAudiences": + err = unpopulate(val, "AllowedAudiences", &a.AllowedAudiences) + 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 AllowedPrincipals. +func (a AllowedPrincipals) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "groups", a.Groups) + populate(objectMap, "identities", a.Identities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AllowedPrincipals. +func (a *AllowedPrincipals) 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 "groups": + err = unpopulate(val, "Groups", &a.Groups) + delete(rawMsg, key) + case "identities": + err = unpopulate(val, "Identities", &a.Identities) + 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 AnalysisData. +func (a AnalysisData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "data", a.Data) + populate(objectMap, "detectorDefinition", a.DetectorDefinition) + populate(objectMap, "detectorMetaData", a.DetectorMetaData) + populate(objectMap, "metrics", a.Metrics) + populate(objectMap, "source", a.Source) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AnalysisData. +func (a *AnalysisData) 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 "data": + err = unpopulate(val, "Data", &a.Data) + delete(rawMsg, key) + case "detectorDefinition": + err = unpopulate(val, "DetectorDefinition", &a.DetectorDefinition) + delete(rawMsg, key) + case "detectorMetaData": + err = unpopulate(val, "DetectorMetaData", &a.DetectorMetaData) + delete(rawMsg, key) + case "metrics": + err = unpopulate(val, "Metrics", &a.Metrics) + delete(rawMsg, key) + case "source": + err = unpopulate(val, "Source", &a.Source) + 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 AnalysisDefinition. +func (a AnalysisDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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 AnalysisDefinition. +func (a *AnalysisDefinition) 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 AnalysisDefinitionProperties. +func (a AnalysisDefinitionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", a.Description) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AnalysisDefinitionProperties. +func (a *AnalysisDefinitionProperties) 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 "description": + err = unpopulate(val, "Description", &a.Description) + 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 AppCertificate. +func (a AppCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", a.ID) + populate(objectMap, "kind", a.Kind) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppCertificate. +func (a *AppCertificate) 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 "location": + err = unpopulate(val, "Location", &a.Location) + 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 "tags": + err = unpopulate(val, "Tags", &a.Tags) + 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 AppCertificateCollection. +func (a AppCertificateCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppCertificateCollection. +func (a *AppCertificateCollection) 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 AppCertificatePatchResource. +func (a AppCertificatePatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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 AppCertificatePatchResource. +func (a *AppCertificatePatchResource) 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 AppCertificatePatchResourceProperties. +func (a AppCertificatePatchResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "canonicalName", a.CanonicalName) + populateByteArray(objectMap, "cerBlob", a.CerBlob, runtime.Base64StdFormat) + populate(objectMap, "domainValidationMethod", a.DomainValidationMethod) + populateTimeRFC3339(objectMap, "expirationDate", a.ExpirationDate) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "hostNames", a.HostNames) + populate(objectMap, "hostingEnvironmentProfile", a.HostingEnvironmentProfile) + populateTimeRFC3339(objectMap, "issueDate", a.IssueDate) + populate(objectMap, "issuer", a.Issuer) + populate(objectMap, "keyVaultId", a.KeyVaultID) + populate(objectMap, "keyVaultSecretName", a.KeyVaultSecretName) + populate(objectMap, "keyVaultSecretStatus", a.KeyVaultSecretStatus) + populate(objectMap, "password", a.Password) + populateByteArray(objectMap, "pfxBlob", a.PfxBlob, runtime.Base64StdFormat) + populate(objectMap, "publicKeyHash", a.PublicKeyHash) + populate(objectMap, "selfLink", a.SelfLink) + populate(objectMap, "serverFarmId", a.ServerFarmID) + populate(objectMap, "siteName", a.SiteName) + populate(objectMap, "subjectName", a.SubjectName) + populate(objectMap, "thumbprint", a.Thumbprint) + populate(objectMap, "valid", a.Valid) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppCertificatePatchResourceProperties. +func (a *AppCertificatePatchResourceProperties) 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 "canonicalName": + err = unpopulate(val, "CanonicalName", &a.CanonicalName) + delete(rawMsg, key) + case "cerBlob": + err = runtime.DecodeByteArray(string(val), &a.CerBlob, runtime.Base64StdFormat) + delete(rawMsg, key) + case "domainValidationMethod": + err = unpopulate(val, "DomainValidationMethod", &a.DomainValidationMethod) + delete(rawMsg, key) + case "expirationDate": + err = unpopulateTimeRFC3339(val, "ExpirationDate", &a.ExpirationDate) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "hostNames": + err = unpopulate(val, "HostNames", &a.HostNames) + delete(rawMsg, key) + case "hostingEnvironmentProfile": + err = unpopulate(val, "HostingEnvironmentProfile", &a.HostingEnvironmentProfile) + delete(rawMsg, key) + case "issueDate": + err = unpopulateTimeRFC3339(val, "IssueDate", &a.IssueDate) + delete(rawMsg, key) + case "issuer": + err = unpopulate(val, "Issuer", &a.Issuer) + delete(rawMsg, key) + case "keyVaultId": + err = unpopulate(val, "KeyVaultID", &a.KeyVaultID) + delete(rawMsg, key) + case "keyVaultSecretName": + err = unpopulate(val, "KeyVaultSecretName", &a.KeyVaultSecretName) + delete(rawMsg, key) + case "keyVaultSecretStatus": + err = unpopulate(val, "KeyVaultSecretStatus", &a.KeyVaultSecretStatus) + delete(rawMsg, key) + case "password": + err = unpopulate(val, "Password", &a.Password) + delete(rawMsg, key) + case "pfxBlob": + err = runtime.DecodeByteArray(string(val), &a.PfxBlob, runtime.Base64StdFormat) + delete(rawMsg, key) + case "publicKeyHash": + err = unpopulate(val, "PublicKeyHash", &a.PublicKeyHash) + delete(rawMsg, key) + case "selfLink": + err = unpopulate(val, "SelfLink", &a.SelfLink) + delete(rawMsg, key) + case "serverFarmId": + err = unpopulate(val, "ServerFarmID", &a.ServerFarmID) + delete(rawMsg, key) + case "siteName": + err = unpopulate(val, "SiteName", &a.SiteName) + delete(rawMsg, key) + case "subjectName": + err = unpopulate(val, "SubjectName", &a.SubjectName) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &a.Thumbprint) + delete(rawMsg, key) + case "valid": + err = unpopulate(val, "Valid", &a.Valid) + 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 AppCertificateProperties. +func (a AppCertificateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "canonicalName", a.CanonicalName) + populateByteArray(objectMap, "cerBlob", a.CerBlob, runtime.Base64StdFormat) + populate(objectMap, "domainValidationMethod", a.DomainValidationMethod) + populateTimeRFC3339(objectMap, "expirationDate", a.ExpirationDate) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "hostNames", a.HostNames) + populate(objectMap, "hostingEnvironmentProfile", a.HostingEnvironmentProfile) + populateTimeRFC3339(objectMap, "issueDate", a.IssueDate) + populate(objectMap, "issuer", a.Issuer) + populate(objectMap, "keyVaultId", a.KeyVaultID) + populate(objectMap, "keyVaultSecretName", a.KeyVaultSecretName) + populate(objectMap, "keyVaultSecretStatus", a.KeyVaultSecretStatus) + populate(objectMap, "password", a.Password) + populateByteArray(objectMap, "pfxBlob", a.PfxBlob, runtime.Base64StdFormat) + populate(objectMap, "publicKeyHash", a.PublicKeyHash) + populate(objectMap, "selfLink", a.SelfLink) + populate(objectMap, "serverFarmId", a.ServerFarmID) + populate(objectMap, "siteName", a.SiteName) + populate(objectMap, "subjectName", a.SubjectName) + populate(objectMap, "thumbprint", a.Thumbprint) + populate(objectMap, "valid", a.Valid) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppCertificateProperties. +func (a *AppCertificateProperties) 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 "canonicalName": + err = unpopulate(val, "CanonicalName", &a.CanonicalName) + delete(rawMsg, key) + case "cerBlob": + err = runtime.DecodeByteArray(string(val), &a.CerBlob, runtime.Base64StdFormat) + delete(rawMsg, key) + case "domainValidationMethod": + err = unpopulate(val, "DomainValidationMethod", &a.DomainValidationMethod) + delete(rawMsg, key) + case "expirationDate": + err = unpopulateTimeRFC3339(val, "ExpirationDate", &a.ExpirationDate) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "hostNames": + err = unpopulate(val, "HostNames", &a.HostNames) + delete(rawMsg, key) + case "hostingEnvironmentProfile": + err = unpopulate(val, "HostingEnvironmentProfile", &a.HostingEnvironmentProfile) + delete(rawMsg, key) + case "issueDate": + err = unpopulateTimeRFC3339(val, "IssueDate", &a.IssueDate) + delete(rawMsg, key) + case "issuer": + err = unpopulate(val, "Issuer", &a.Issuer) + delete(rawMsg, key) + case "keyVaultId": + err = unpopulate(val, "KeyVaultID", &a.KeyVaultID) + delete(rawMsg, key) + case "keyVaultSecretName": + err = unpopulate(val, "KeyVaultSecretName", &a.KeyVaultSecretName) + delete(rawMsg, key) + case "keyVaultSecretStatus": + err = unpopulate(val, "KeyVaultSecretStatus", &a.KeyVaultSecretStatus) + delete(rawMsg, key) + case "password": + err = unpopulate(val, "Password", &a.Password) + delete(rawMsg, key) + case "pfxBlob": + err = runtime.DecodeByteArray(string(val), &a.PfxBlob, runtime.Base64StdFormat) + delete(rawMsg, key) + case "publicKeyHash": + err = unpopulate(val, "PublicKeyHash", &a.PublicKeyHash) + delete(rawMsg, key) + case "selfLink": + err = unpopulate(val, "SelfLink", &a.SelfLink) + delete(rawMsg, key) + case "serverFarmId": + err = unpopulate(val, "ServerFarmID", &a.ServerFarmID) + delete(rawMsg, key) + case "siteName": + err = unpopulate(val, "SiteName", &a.SiteName) + delete(rawMsg, key) + case "subjectName": + err = unpopulate(val, "SubjectName", &a.SubjectName) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &a.Thumbprint) + delete(rawMsg, key) + case "valid": + err = unpopulate(val, "Valid", &a.Valid) + 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 AppInsightsWebAppStackSettings. +func (a AppInsightsWebAppStackSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "isDefaultOff", a.IsDefaultOff) + populate(objectMap, "isSupported", a.IsSupported) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppInsightsWebAppStackSettings. +func (a *AppInsightsWebAppStackSettings) 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 "isDefaultOff": + err = unpopulate(val, "IsDefaultOff", &a.IsDefaultOff) + delete(rawMsg, key) + case "isSupported": + err = unpopulate(val, "IsSupported", &a.IsSupported) + 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 AppLogsConfiguration. +func (a AppLogsConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "destination", a.Destination) + populate(objectMap, "logAnalyticsConfiguration", a.LogAnalyticsConfiguration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppLogsConfiguration. +func (a *AppLogsConfiguration) 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 "destination": + err = unpopulate(val, "Destination", &a.Destination) + delete(rawMsg, key) + case "logAnalyticsConfiguration": + err = unpopulate(val, "LogAnalyticsConfiguration", &a.LogAnalyticsConfiguration) + 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 AppRegistration. +func (a AppRegistration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "appId", a.AppID) + populate(objectMap, "appSecretSettingName", a.AppSecretSettingName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppRegistration. +func (a *AppRegistration) 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 "appId": + err = unpopulate(val, "AppID", &a.AppID) + delete(rawMsg, key) + case "appSecretSettingName": + err = unpopulate(val, "AppSecretSettingName", &a.AppSecretSettingName) + 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 Apple. +func (a Apple) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "enabled", a.Enabled) + populate(objectMap, "login", a.Login) + populate(objectMap, "registration", a.Registration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Apple. +func (a *Apple) 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 "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + case "login": + err = unpopulate(val, "Login", &a.Login) + delete(rawMsg, key) + case "registration": + err = unpopulate(val, "Registration", &a.Registration) + 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 AppleRegistration. +func (a AppleRegistration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "clientId", a.ClientID) + populate(objectMap, "clientSecretSettingName", a.ClientSecretSettingName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppleRegistration. +func (a *AppleRegistration) 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 "clientId": + err = unpopulate(val, "ClientID", &a.ClientID) + delete(rawMsg, key) + case "clientSecretSettingName": + err = unpopulate(val, "ClientSecretSettingName", &a.ClientSecretSettingName) + 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 ApplicationLogsConfig. +func (a ApplicationLogsConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "azureBlobStorage", a.AzureBlobStorage) + populate(objectMap, "azureTableStorage", a.AzureTableStorage) + populate(objectMap, "fileSystem", a.FileSystem) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationLogsConfig. +func (a *ApplicationLogsConfig) 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 "azureBlobStorage": + err = unpopulate(val, "AzureBlobStorage", &a.AzureBlobStorage) + delete(rawMsg, key) + case "azureTableStorage": + err = unpopulate(val, "AzureTableStorage", &a.AzureTableStorage) + delete(rawMsg, key) + case "fileSystem": + err = unpopulate(val, "FileSystem", &a.FileSystem) + 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 ApplicationStack. +func (a ApplicationStack) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "dependency", a.Dependency) + populate(objectMap, "display", a.Display) + populate(objectMap, "frameworks", a.Frameworks) + populate(objectMap, "isDeprecated", a.IsDeprecated) + populate(objectMap, "majorVersions", a.MajorVersions) + populate(objectMap, "name", a.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationStack. +func (a *ApplicationStack) 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 "dependency": + err = unpopulate(val, "Dependency", &a.Dependency) + delete(rawMsg, key) + case "display": + err = unpopulate(val, "Display", &a.Display) + delete(rawMsg, key) + case "frameworks": + err = unpopulate(val, "Frameworks", &a.Frameworks) + delete(rawMsg, key) + case "isDeprecated": + err = unpopulate(val, "IsDeprecated", &a.IsDeprecated) + delete(rawMsg, key) + case "majorVersions": + err = unpopulate(val, "MajorVersions", &a.MajorVersions) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + 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 ApplicationStackCollection. +func (a ApplicationStackCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationStackCollection. +func (a *ApplicationStackCollection) 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 ApplicationStackResource. +func (a ApplicationStackResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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 ApplicationStackResource. +func (a *ApplicationStackResource) 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 ArcConfiguration. +func (a ArcConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "artifactStorageAccessMode", a.ArtifactStorageAccessMode) + populate(objectMap, "artifactStorageClassName", a.ArtifactStorageClassName) + populate(objectMap, "artifactStorageMountPath", a.ArtifactStorageMountPath) + populate(objectMap, "artifactStorageNodeName", a.ArtifactStorageNodeName) + populate(objectMap, "artifactsStorageType", a.ArtifactsStorageType) + populate(objectMap, "frontEndServiceConfiguration", a.FrontEndServiceConfiguration) + populate(objectMap, "kubeConfig", a.KubeConfig) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ArcConfiguration. +func (a *ArcConfiguration) 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 "artifactStorageAccessMode": + err = unpopulate(val, "ArtifactStorageAccessMode", &a.ArtifactStorageAccessMode) + delete(rawMsg, key) + case "artifactStorageClassName": + err = unpopulate(val, "ArtifactStorageClassName", &a.ArtifactStorageClassName) + delete(rawMsg, key) + case "artifactStorageMountPath": + err = unpopulate(val, "ArtifactStorageMountPath", &a.ArtifactStorageMountPath) + delete(rawMsg, key) + case "artifactStorageNodeName": + err = unpopulate(val, "ArtifactStorageNodeName", &a.ArtifactStorageNodeName) + delete(rawMsg, key) + case "artifactsStorageType": + err = unpopulate(val, "ArtifactsStorageType", &a.ArtifactsStorageType) + delete(rawMsg, key) + case "frontEndServiceConfiguration": + err = unpopulate(val, "FrontEndServiceConfiguration", &a.FrontEndServiceConfiguration) + delete(rawMsg, key) + case "kubeConfig": + err = unpopulate(val, "KubeConfig", &a.KubeConfig) + 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 ArmIDWrapper. +func (a ArmIDWrapper) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", a.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ArmIDWrapper. +func (a *ArmIDWrapper) 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) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ArmPlan. +func (a ArmPlan) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "name", a.Name) + populate(objectMap, "product", a.Product) + populate(objectMap, "promotionCode", a.PromotionCode) + populate(objectMap, "publisher", a.Publisher) + populate(objectMap, "version", a.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ArmPlan. +func (a *ArmPlan) 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 "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "product": + err = unpopulate(val, "Product", &a.Product) + delete(rawMsg, key) + case "promotionCode": + err = unpopulate(val, "PromotionCode", &a.PromotionCode) + delete(rawMsg, key) + case "publisher": + err = unpopulate(val, "Publisher", &a.Publisher) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &a.Version) + 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]interface{}) + 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 AseV3NetworkingConfiguration. +func (a *AseV3NetworkingConfiguration) 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 AseV3NetworkingConfigurationProperties. +func (a AseV3NetworkingConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allowNewPrivateEndpointConnections", a.AllowNewPrivateEndpointConnections) + populate(objectMap, "externalInboundIpAddresses", a.ExternalInboundIPAddresses) + populate(objectMap, "ftpEnabled", a.FtpEnabled) + populate(objectMap, "inboundIpAddressOverride", a.InboundIPAddressOverride) + populate(objectMap, "internalInboundIpAddresses", a.InternalInboundIPAddresses) + populate(objectMap, "linuxOutboundIpAddresses", a.LinuxOutboundIPAddresses) + populate(objectMap, "remoteDebugEnabled", a.RemoteDebugEnabled) + populate(objectMap, "windowsOutboundIpAddresses", a.WindowsOutboundIPAddresses) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AseV3NetworkingConfigurationProperties. +func (a *AseV3NetworkingConfigurationProperties) 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 "allowNewPrivateEndpointConnections": + err = unpopulate(val, "AllowNewPrivateEndpointConnections", &a.AllowNewPrivateEndpointConnections) + delete(rawMsg, key) + case "externalInboundIpAddresses": + err = unpopulate(val, "ExternalInboundIPAddresses", &a.ExternalInboundIPAddresses) + delete(rawMsg, key) + case "ftpEnabled": + err = unpopulate(val, "FtpEnabled", &a.FtpEnabled) + delete(rawMsg, key) + case "inboundIpAddressOverride": + err = unpopulate(val, "InboundIPAddressOverride", &a.InboundIPAddressOverride) + delete(rawMsg, key) + case "internalInboundIpAddresses": + err = unpopulate(val, "InternalInboundIPAddresses", &a.InternalInboundIPAddresses) + delete(rawMsg, key) + case "linuxOutboundIpAddresses": + err = unpopulate(val, "LinuxOutboundIPAddresses", &a.LinuxOutboundIPAddresses) + delete(rawMsg, key) + case "remoteDebugEnabled": + err = unpopulate(val, "RemoteDebugEnabled", &a.RemoteDebugEnabled) + delete(rawMsg, key) + case "windowsOutboundIpAddresses": + err = unpopulate(val, "WindowsOutboundIPAddresses", &a.WindowsOutboundIPAddresses) + 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 AuthPlatform. +func (a AuthPlatform) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "configFilePath", a.ConfigFilePath) + populate(objectMap, "enabled", a.Enabled) + populate(objectMap, "runtimeVersion", a.RuntimeVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthPlatform. +func (a *AuthPlatform) 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 "configFilePath": + err = unpopulate(val, "ConfigFilePath", &a.ConfigFilePath) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + case "runtimeVersion": + err = unpopulate(val, "RuntimeVersion", &a.RuntimeVersion) + 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 AutoHealActions. +func (a AutoHealActions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "actionType", a.ActionType) + populate(objectMap, "customAction", a.CustomAction) + populate(objectMap, "minProcessExecutionTime", a.MinProcessExecutionTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutoHealActions. +func (a *AutoHealActions) 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 "actionType": + err = unpopulate(val, "ActionType", &a.ActionType) + delete(rawMsg, key) + case "customAction": + err = unpopulate(val, "CustomAction", &a.CustomAction) + delete(rawMsg, key) + case "minProcessExecutionTime": + err = unpopulate(val, "MinProcessExecutionTime", &a.MinProcessExecutionTime) + 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 AutoHealCustomAction. +func (a AutoHealCustomAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "exe", a.Exe) + populate(objectMap, "parameters", a.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutoHealCustomAction. +func (a *AutoHealCustomAction) 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 "exe": + err = unpopulate(val, "Exe", &a.Exe) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &a.Parameters) + 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 AutoHealRules. +func (a AutoHealRules) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "actions", a.Actions) + populate(objectMap, "triggers", a.Triggers) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutoHealRules. +func (a *AutoHealRules) 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 "actions": + err = unpopulate(val, "Actions", &a.Actions) + delete(rawMsg, key) + case "triggers": + err = unpopulate(val, "Triggers", &a.Triggers) + 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 AutoHealTriggers. +func (a AutoHealTriggers) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "privateBytesInKB", a.PrivateBytesInKB) + populate(objectMap, "requests", a.Requests) + populate(objectMap, "slowRequests", a.SlowRequests) + populate(objectMap, "slowRequestsWithPath", a.SlowRequestsWithPath) + populate(objectMap, "statusCodes", a.StatusCodes) + populate(objectMap, "statusCodesRange", a.StatusCodesRange) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutoHealTriggers. +func (a *AutoHealTriggers) 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 "privateBytesInKB": + err = unpopulate(val, "PrivateBytesInKB", &a.PrivateBytesInKB) + delete(rawMsg, key) + case "requests": + err = unpopulate(val, "Requests", &a.Requests) + delete(rawMsg, key) + case "slowRequests": + err = unpopulate(val, "SlowRequests", &a.SlowRequests) + delete(rawMsg, key) + case "slowRequestsWithPath": + err = unpopulate(val, "SlowRequestsWithPath", &a.SlowRequestsWithPath) + delete(rawMsg, key) + case "statusCodes": + err = unpopulate(val, "StatusCodes", &a.StatusCodes) + delete(rawMsg, key) + case "statusCodesRange": + err = unpopulate(val, "StatusCodesRange", &a.StatusCodesRange) + 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 AzureActiveDirectory. +func (a AzureActiveDirectory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "enabled", a.Enabled) + populate(objectMap, "isAutoProvisioned", a.IsAutoProvisioned) + populate(objectMap, "login", a.Login) + populate(objectMap, "registration", a.Registration) + populate(objectMap, "validation", a.Validation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureActiveDirectory. +func (a *AzureActiveDirectory) 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 "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + case "isAutoProvisioned": + err = unpopulate(val, "IsAutoProvisioned", &a.IsAutoProvisioned) + delete(rawMsg, key) + case "login": + err = unpopulate(val, "Login", &a.Login) + delete(rawMsg, key) + case "registration": + err = unpopulate(val, "Registration", &a.Registration) + delete(rawMsg, key) + case "validation": + err = unpopulate(val, "Validation", &a.Validation) + 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 AzureActiveDirectoryLogin. +func (a AzureActiveDirectoryLogin) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "disableWWWAuthenticate", a.DisableWWWAuthenticate) + populate(objectMap, "loginParameters", a.LoginParameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureActiveDirectoryLogin. +func (a *AzureActiveDirectoryLogin) 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 "disableWWWAuthenticate": + err = unpopulate(val, "DisableWWWAuthenticate", &a.DisableWWWAuthenticate) + delete(rawMsg, key) + case "loginParameters": + err = unpopulate(val, "LoginParameters", &a.LoginParameters) + 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 AzureActiveDirectoryRegistration. +func (a AzureActiveDirectoryRegistration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "clientId", a.ClientID) + populate(objectMap, "clientSecretCertificateIssuer", a.ClientSecretCertificateIssuer) + populate(objectMap, "clientSecretCertificateSubjectAlternativeName", a.ClientSecretCertificateSubjectAlternativeName) + populate(objectMap, "clientSecretCertificateThumbprint", a.ClientSecretCertificateThumbprint) + populate(objectMap, "clientSecretSettingName", a.ClientSecretSettingName) + populate(objectMap, "openIdIssuer", a.OpenIDIssuer) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureActiveDirectoryRegistration. +func (a *AzureActiveDirectoryRegistration) 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 "clientId": + err = unpopulate(val, "ClientID", &a.ClientID) + delete(rawMsg, key) + case "clientSecretCertificateIssuer": + err = unpopulate(val, "ClientSecretCertificateIssuer", &a.ClientSecretCertificateIssuer) + delete(rawMsg, key) + case "clientSecretCertificateSubjectAlternativeName": + err = unpopulate(val, "ClientSecretCertificateSubjectAlternativeName", &a.ClientSecretCertificateSubjectAlternativeName) + delete(rawMsg, key) + case "clientSecretCertificateThumbprint": + err = unpopulate(val, "ClientSecretCertificateThumbprint", &a.ClientSecretCertificateThumbprint) + delete(rawMsg, key) + case "clientSecretSettingName": + err = unpopulate(val, "ClientSecretSettingName", &a.ClientSecretSettingName) + delete(rawMsg, key) + case "openIdIssuer": + err = unpopulate(val, "OpenIDIssuer", &a.OpenIDIssuer) + 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 AzureActiveDirectoryValidation. +func (a AzureActiveDirectoryValidation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allowedAudiences", a.AllowedAudiences) + populate(objectMap, "defaultAuthorizationPolicy", a.DefaultAuthorizationPolicy) + populate(objectMap, "jwtClaimChecks", a.JwtClaimChecks) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureActiveDirectoryValidation. +func (a *AzureActiveDirectoryValidation) 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 "allowedAudiences": + err = unpopulate(val, "AllowedAudiences", &a.AllowedAudiences) + delete(rawMsg, key) + case "defaultAuthorizationPolicy": + err = unpopulate(val, "DefaultAuthorizationPolicy", &a.DefaultAuthorizationPolicy) + delete(rawMsg, key) + case "jwtClaimChecks": + err = unpopulate(val, "JwtClaimChecks", &a.JwtClaimChecks) + 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 AzureBlobStorageApplicationLogsConfig. +func (a AzureBlobStorageApplicationLogsConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "level", a.Level) + populate(objectMap, "retentionInDays", a.RetentionInDays) + populate(objectMap, "sasUrl", a.SasURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBlobStorageApplicationLogsConfig. +func (a *AzureBlobStorageApplicationLogsConfig) 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 "level": + err = unpopulate(val, "Level", &a.Level) + delete(rawMsg, key) + case "retentionInDays": + err = unpopulate(val, "RetentionInDays", &a.RetentionInDays) + delete(rawMsg, key) + case "sasUrl": + err = unpopulate(val, "SasURL", &a.SasURL) + 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 AzureBlobStorageHTTPLogsConfig. +func (a AzureBlobStorageHTTPLogsConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "enabled", a.Enabled) + populate(objectMap, "retentionInDays", a.RetentionInDays) + populate(objectMap, "sasUrl", a.SasURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBlobStorageHTTPLogsConfig. +func (a *AzureBlobStorageHTTPLogsConfig) 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 "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + case "retentionInDays": + err = unpopulate(val, "RetentionInDays", &a.RetentionInDays) + delete(rawMsg, key) + case "sasUrl": + err = unpopulate(val, "SasURL", &a.SasURL) + 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 AzureResourceErrorInfo. +func (a AzureResourceErrorInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", a.Code) + populate(objectMap, "details", a.Details) + populate(objectMap, "message", a.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureResourceErrorInfo. +func (a *AzureResourceErrorInfo) 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 "code": + err = unpopulate(val, "Code", &a.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &a.Details) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &a.Message) + 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 AzureStaticWebApps. +func (a AzureStaticWebApps) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "enabled", a.Enabled) + populate(objectMap, "registration", a.Registration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStaticWebApps. +func (a *AzureStaticWebApps) 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 "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + case "registration": + err = unpopulate(val, "Registration", &a.Registration) + 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 AzureStaticWebAppsRegistration. +func (a AzureStaticWebAppsRegistration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "clientId", a.ClientID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStaticWebAppsRegistration. +func (a *AzureStaticWebAppsRegistration) 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 "clientId": + err = unpopulate(val, "ClientID", &a.ClientID) + 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 AzureStorageInfoValue. +func (a AzureStorageInfoValue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "accessKey", a.AccessKey) + populate(objectMap, "accountName", a.AccountName) + populate(objectMap, "mountPath", a.MountPath) + populate(objectMap, "shareName", a.ShareName) + populate(objectMap, "state", a.State) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageInfoValue. +func (a *AzureStorageInfoValue) 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 "accessKey": + err = unpopulate(val, "AccessKey", &a.AccessKey) + delete(rawMsg, key) + case "accountName": + err = unpopulate(val, "AccountName", &a.AccountName) + delete(rawMsg, key) + case "mountPath": + err = unpopulate(val, "MountPath", &a.MountPath) + delete(rawMsg, key) + case "shareName": + err = unpopulate(val, "ShareName", &a.ShareName) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &a.State) + 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 AzureStoragePropertyDictionaryResource. +func (a AzureStoragePropertyDictionaryResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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 AzureStoragePropertyDictionaryResource. +func (a *AzureStoragePropertyDictionaryResource) 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 AzureTableStorageApplicationLogsConfig. +func (a AzureTableStorageApplicationLogsConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "level", a.Level) + populate(objectMap, "sasUrl", a.SasURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureTableStorageApplicationLogsConfig. +func (a *AzureTableStorageApplicationLogsConfig) 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 "level": + err = unpopulate(val, "Level", &a.Level) + delete(rawMsg, key) + case "sasUrl": + err = unpopulate(val, "SasURL", &a.SasURL) + 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 BackupItem. +func (b BackupItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", b.ID) + populate(objectMap, "kind", b.Kind) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupItem. +func (b *BackupItem) 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", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &b.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupItemCollection. +func (b BackupItemCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupItemCollection. +func (b *BackupItemCollection) 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", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupItemProperties. +func (b BackupItemProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", b.BackupID) + populate(objectMap, "blobName", b.BlobName) + populate(objectMap, "correlationId", b.CorrelationID) + populateTimeRFC3339(objectMap, "created", b.Created) + populate(objectMap, "databases", b.Databases) + populateTimeRFC3339(objectMap, "finishedTimeStamp", b.FinishedTimeStamp) + populateTimeRFC3339(objectMap, "lastRestoreTimeStamp", b.LastRestoreTimeStamp) + populate(objectMap, "log", b.Log) + populate(objectMap, "name", b.Name) + populate(objectMap, "scheduled", b.Scheduled) + populate(objectMap, "sizeInBytes", b.SizeInBytes) + populate(objectMap, "status", b.Status) + populate(objectMap, "storageAccountUrl", b.StorageAccountURL) + populate(objectMap, "websiteSizeInBytes", b.WebsiteSizeInBytes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupItemProperties. +func (b *BackupItemProperties) 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", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "BackupID", &b.BackupID) + delete(rawMsg, key) + case "blobName": + err = unpopulate(val, "BlobName", &b.BlobName) + delete(rawMsg, key) + case "correlationId": + err = unpopulate(val, "CorrelationID", &b.CorrelationID) + delete(rawMsg, key) + case "created": + err = unpopulateTimeRFC3339(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) + delete(rawMsg, key) + case "lastRestoreTimeStamp": + err = unpopulateTimeRFC3339(val, "LastRestoreTimeStamp", &b.LastRestoreTimeStamp) + delete(rawMsg, key) + case "log": + err = unpopulate(val, "Log", &b.Log) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "scheduled": + err = unpopulate(val, "Scheduled", &b.Scheduled) + delete(rawMsg, key) + case "sizeInBytes": + err = unpopulate(val, "SizeInBytes", &b.SizeInBytes) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &b.Status) + delete(rawMsg, key) + case "storageAccountUrl": + err = unpopulate(val, "StorageAccountURL", &b.StorageAccountURL) + delete(rawMsg, key) + case "websiteSizeInBytes": + err = unpopulate(val, "WebsiteSizeInBytes", &b.WebsiteSizeInBytes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupRequest. +func (b BackupRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", b.ID) + populate(objectMap, "kind", b.Kind) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupRequest. +func (b *BackupRequest) 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", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &b.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupRequestProperties. +func (b BackupRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "backupName", b.BackupName) + populate(objectMap, "backupSchedule", b.BackupSchedule) + populate(objectMap, "databases", b.Databases) + populate(objectMap, "enabled", b.Enabled) + populate(objectMap, "storageAccountUrl", b.StorageAccountURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupRequestProperties. +func (b *BackupRequestProperties) 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", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupName": + err = unpopulate(val, "BackupName", &b.BackupName) + delete(rawMsg, key) + case "backupSchedule": + err = unpopulate(val, "BackupSchedule", &b.BackupSchedule) + delete(rawMsg, key) + case "databases": + err = unpopulate(val, "Databases", &b.Databases) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &b.Enabled) + delete(rawMsg, key) + case "storageAccountUrl": + err = unpopulate(val, "StorageAccountURL", &b.StorageAccountURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupSchedule. +func (b BackupSchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "frequencyInterval", b.FrequencyInterval) + populate(objectMap, "frequencyUnit", b.FrequencyUnit) + populate(objectMap, "keepAtLeastOneBackup", b.KeepAtLeastOneBackup) + populateTimeRFC3339(objectMap, "lastExecutionTime", b.LastExecutionTime) + populate(objectMap, "retentionPeriodInDays", b.RetentionPeriodInDays) + populateTimeRFC3339(objectMap, "startTime", b.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupSchedule. +func (b *BackupSchedule) 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", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "frequencyInterval": + err = unpopulate(val, "FrequencyInterval", &b.FrequencyInterval) + delete(rawMsg, key) + case "frequencyUnit": + err = unpopulate(val, "FrequencyUnit", &b.FrequencyUnit) + delete(rawMsg, key) + case "keepAtLeastOneBackup": + err = unpopulate(val, "KeepAtLeastOneBackup", &b.KeepAtLeastOneBackup) + delete(rawMsg, key) + case "lastExecutionTime": + err = unpopulateTimeRFC3339(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) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BillingMeter. +func (b BillingMeter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", b.ID) + populate(objectMap, "kind", b.Kind) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BillingMeter. +func (b *BillingMeter) 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", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &b.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BillingMeterCollection. +func (b BillingMeterCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BillingMeterCollection. +func (b *BillingMeterCollection) 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", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BillingMeterProperties. +func (b BillingMeterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "billingLocation", b.BillingLocation) + populate(objectMap, "friendlyName", b.FriendlyName) + populate(objectMap, "meterId", b.MeterID) + populate(objectMap, "multiplier", b.Multiplier) + populate(objectMap, "osType", b.OSType) + populate(objectMap, "resourceType", b.ResourceType) + populate(objectMap, "shortName", b.ShortName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BillingMeterProperties. +func (b *BillingMeterProperties) 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", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "billingLocation": + err = unpopulate(val, "BillingLocation", &b.BillingLocation) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &b.FriendlyName) + delete(rawMsg, key) + case "meterId": + err = unpopulate(val, "MeterID", &b.MeterID) + delete(rawMsg, key) + case "multiplier": + err = unpopulate(val, "Multiplier", &b.Multiplier) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &b.OSType) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &b.ResourceType) + delete(rawMsg, key) + case "shortName": + err = unpopulate(val, "ShortName", &b.ShortName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BlobStorageTokenStore. +func (b BlobStorageTokenStore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "sasUrlSettingName", b.SasURLSettingName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BlobStorageTokenStore. +func (b *BlobStorageTokenStore) 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", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sasUrlSettingName": + err = unpopulate(val, "SasURLSettingName", &b.SasURLSettingName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Capability. +func (c Capability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "name", c.Name) + populate(objectMap, "reason", c.Reason) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Capability. +func (c *Capability) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &c.Reason) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Certificate. +func (c Certificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "keyVaultId", c.KeyVaultID) + populate(objectMap, "keyVaultSecretName", c.KeyVaultSecretName) + populate(objectMap, "provisioningState", c.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Certificate. +func (c *Certificate) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyVaultId": + err = unpopulate(val, "KeyVaultID", &c.KeyVaultID) + delete(rawMsg, key) + case "keyVaultSecretName": + err = unpopulate(val, "KeyVaultSecretName", &c.KeyVaultSecretName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateCollection. +func (c CertificateCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateCollection. +func (c *CertificateCollection) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateDetails. +func (c CertificateDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "issuer", c.Issuer) + populateTimeRFC3339(objectMap, "notAfter", c.NotAfter) + populateTimeRFC3339(objectMap, "notBefore", c.NotBefore) + populate(objectMap, "rawData", c.RawData) + populate(objectMap, "serialNumber", c.SerialNumber) + populate(objectMap, "signatureAlgorithm", c.SignatureAlgorithm) + populate(objectMap, "subject", c.Subject) + populate(objectMap, "thumbprint", c.Thumbprint) + populate(objectMap, "version", c.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateDetails. +func (c *CertificateDetails) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "issuer": + err = unpopulate(val, "Issuer", &c.Issuer) + delete(rawMsg, key) + case "notAfter": + err = unpopulateTimeRFC3339(val, "NotAfter", &c.NotAfter) + delete(rawMsg, key) + case "notBefore": + err = unpopulateTimeRFC3339(val, "NotBefore", &c.NotBefore) + delete(rawMsg, key) + case "rawData": + err = unpopulate(val, "RawData", &c.RawData) + delete(rawMsg, key) + case "serialNumber": + err = unpopulate(val, "SerialNumber", &c.SerialNumber) + delete(rawMsg, key) + case "signatureAlgorithm": + err = unpopulate(val, "SignatureAlgorithm", &c.SignatureAlgorithm) + delete(rawMsg, key) + case "subject": + err = unpopulate(val, "Subject", &c.Subject) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &c.Thumbprint) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &c.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateEmail. +func (c CertificateEmail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "emailId", c.EmailID) + populateTimeRFC3339(objectMap, "timeStamp", c.TimeStamp) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateEmail. +func (c *CertificateEmail) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "emailId": + err = unpopulate(val, "EmailID", &c.EmailID) + delete(rawMsg, key) + case "timeStamp": + err = unpopulateTimeRFC3339(val, "TimeStamp", &c.TimeStamp) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateOrder. +func (c CertificateOrder) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "location", c.Location) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "tags", c.Tags) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateOrder. +func (c *CertificateOrder) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &c.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateOrderAction. +func (c CertificateOrderAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "actionType", c.ActionType) + populateTimeRFC3339(objectMap, "createdAt", c.CreatedAt) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateOrderAction. +func (c *CertificateOrderAction) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionType": + err = unpopulate(val, "ActionType", &c.ActionType) + delete(rawMsg, key) + case "createdAt": + err = unpopulateTimeRFC3339(val, "CreatedAt", &c.CreatedAt) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateOrderCollection. +func (c CertificateOrderCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateOrderCollection. +func (c *CertificateOrderCollection) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateOrderContact. +func (c CertificateOrderContact) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "email", c.Email) + populate(objectMap, "nameFirst", c.NameFirst) + populate(objectMap, "nameLast", c.NameLast) + populate(objectMap, "phone", c.Phone) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateOrderContact. +func (c *CertificateOrderContact) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "email": + err = unpopulate(val, "Email", &c.Email) + delete(rawMsg, key) + case "nameFirst": + err = unpopulate(val, "NameFirst", &c.NameFirst) + delete(rawMsg, key) + case "nameLast": + err = unpopulate(val, "NameLast", &c.NameLast) + delete(rawMsg, key) + case "phone": + err = unpopulate(val, "Phone", &c.Phone) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateOrderPatchResource. +func (c CertificateOrderPatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateOrderPatchResource. +func (c *CertificateOrderPatchResource) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateOrderPatchResourceProperties. +func (c CertificateOrderPatchResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "appServiceCertificateNotRenewableReasons", c.AppServiceCertificateNotRenewableReasons) + populate(objectMap, "autoRenew", c.AutoRenew) + populate(objectMap, "certificates", c.Certificates) + populate(objectMap, "contact", c.Contact) + populate(objectMap, "csr", c.Csr) + populate(objectMap, "distinguishedName", c.DistinguishedName) + populate(objectMap, "domainVerificationToken", c.DomainVerificationToken) + populateTimeRFC3339(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) + populate(objectMap, "productType", c.ProductType) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "root", c.Root) + populate(objectMap, "serialNumber", c.SerialNumber) + populate(objectMap, "signedCertificate", c.SignedCertificate) + populate(objectMap, "status", c.Status) + populate(objectMap, "validityInYears", c.ValidityInYears) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateOrderPatchResourceProperties. +func (c *CertificateOrderPatchResourceProperties) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appServiceCertificateNotRenewableReasons": + err = unpopulate(val, "AppServiceCertificateNotRenewableReasons", &c.AppServiceCertificateNotRenewableReasons) + delete(rawMsg, key) + case "autoRenew": + err = unpopulate(val, "AutoRenew", &c.AutoRenew) + delete(rawMsg, key) + case "certificates": + err = unpopulate(val, "Certificates", &c.Certificates) + delete(rawMsg, key) + case "contact": + err = unpopulate(val, "Contact", &c.Contact) + delete(rawMsg, key) + case "csr": + err = unpopulate(val, "Csr", &c.Csr) + delete(rawMsg, key) + case "distinguishedName": + err = unpopulate(val, "DistinguishedName", &c.DistinguishedName) + delete(rawMsg, key) + case "domainVerificationToken": + err = unpopulate(val, "DomainVerificationToken", &c.DomainVerificationToken) + delete(rawMsg, key) + case "expirationTime": + err = unpopulateTimeRFC3339(val, "ExpirationTime", &c.ExpirationTime) + delete(rawMsg, key) + case "intermediate": + err = unpopulate(val, "Intermediate", &c.Intermediate) + delete(rawMsg, key) + case "isPrivateKeyExternal": + err = unpopulate(val, "IsPrivateKeyExternal", &c.IsPrivateKeyExternal) + delete(rawMsg, key) + case "keySize": + err = unpopulate(val, "KeySize", &c.KeySize) + delete(rawMsg, key) + case "lastCertificateIssuanceTime": + err = unpopulateTimeRFC3339(val, "LastCertificateIssuanceTime", &c.LastCertificateIssuanceTime) + delete(rawMsg, key) + case "nextAutoRenewalTimeStamp": + err = unpopulateTimeRFC3339(val, "NextAutoRenewalTimeStamp", &c.NextAutoRenewalTimeStamp) + delete(rawMsg, key) + case "productType": + err = unpopulate(val, "ProductType", &c.ProductType) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "root": + err = unpopulate(val, "Root", &c.Root) + delete(rawMsg, key) + case "serialNumber": + err = unpopulate(val, "SerialNumber", &c.SerialNumber) + delete(rawMsg, key) + case "signedCertificate": + err = unpopulate(val, "SignedCertificate", &c.SignedCertificate) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &c.Status) + delete(rawMsg, key) + case "validityInYears": + err = unpopulate(val, "ValidityInYears", &c.ValidityInYears) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateOrderProperties. +func (c CertificateOrderProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "appServiceCertificateNotRenewableReasons", c.AppServiceCertificateNotRenewableReasons) + populate(objectMap, "autoRenew", c.AutoRenew) + populate(objectMap, "certificates", c.Certificates) + populate(objectMap, "contact", c.Contact) + populate(objectMap, "csr", c.Csr) + populate(objectMap, "distinguishedName", c.DistinguishedName) + populate(objectMap, "domainVerificationToken", c.DomainVerificationToken) + populateTimeRFC3339(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) + populate(objectMap, "productType", c.ProductType) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "root", c.Root) + populate(objectMap, "serialNumber", c.SerialNumber) + populate(objectMap, "signedCertificate", c.SignedCertificate) + populate(objectMap, "status", c.Status) + populate(objectMap, "validityInYears", c.ValidityInYears) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateOrderProperties. +func (c *CertificateOrderProperties) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appServiceCertificateNotRenewableReasons": + err = unpopulate(val, "AppServiceCertificateNotRenewableReasons", &c.AppServiceCertificateNotRenewableReasons) + delete(rawMsg, key) + case "autoRenew": + err = unpopulate(val, "AutoRenew", &c.AutoRenew) + delete(rawMsg, key) + case "certificates": + err = unpopulate(val, "Certificates", &c.Certificates) + delete(rawMsg, key) + case "contact": + err = unpopulate(val, "Contact", &c.Contact) + delete(rawMsg, key) + case "csr": + err = unpopulate(val, "Csr", &c.Csr) + delete(rawMsg, key) + case "distinguishedName": + err = unpopulate(val, "DistinguishedName", &c.DistinguishedName) + delete(rawMsg, key) + case "domainVerificationToken": + err = unpopulate(val, "DomainVerificationToken", &c.DomainVerificationToken) + delete(rawMsg, key) + case "expirationTime": + err = unpopulateTimeRFC3339(val, "ExpirationTime", &c.ExpirationTime) + delete(rawMsg, key) + case "intermediate": + err = unpopulate(val, "Intermediate", &c.Intermediate) + delete(rawMsg, key) + case "isPrivateKeyExternal": + err = unpopulate(val, "IsPrivateKeyExternal", &c.IsPrivateKeyExternal) + delete(rawMsg, key) + case "keySize": + err = unpopulate(val, "KeySize", &c.KeySize) + delete(rawMsg, key) + case "lastCertificateIssuanceTime": + err = unpopulateTimeRFC3339(val, "LastCertificateIssuanceTime", &c.LastCertificateIssuanceTime) + delete(rawMsg, key) + case "nextAutoRenewalTimeStamp": + err = unpopulateTimeRFC3339(val, "NextAutoRenewalTimeStamp", &c.NextAutoRenewalTimeStamp) + delete(rawMsg, key) + case "productType": + err = unpopulate(val, "ProductType", &c.ProductType) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "root": + err = unpopulate(val, "Root", &c.Root) + delete(rawMsg, key) + case "serialNumber": + err = unpopulate(val, "SerialNumber", &c.SerialNumber) + delete(rawMsg, key) + case "signedCertificate": + err = unpopulate(val, "SignedCertificate", &c.SignedCertificate) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &c.Status) + delete(rawMsg, key) + case "validityInYears": + err = unpopulate(val, "ValidityInYears", &c.ValidityInYears) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificatePatchResource. +func (c CertificatePatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificatePatchResource. +func (c *CertificatePatchResource) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateResource. +func (c CertificateResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "location", c.Location) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "tags", c.Tags) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateResource. +func (c *CertificateResource) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &c.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClientRegistration. +func (c ClientRegistration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "clientId", c.ClientID) + populate(objectMap, "clientSecretSettingName", c.ClientSecretSettingName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientRegistration. +func (c *ClientRegistration) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &c.ClientID) + delete(rawMsg, key) + case "clientSecretSettingName": + err = unpopulate(val, "ClientSecretSettingName", &c.ClientSecretSettingName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CloningInfo. +func (c CloningInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "appSettingsOverrides", c.AppSettingsOverrides) + populate(objectMap, "cloneCustomHostNames", c.CloneCustomHostNames) + populate(objectMap, "cloneSourceControl", c.CloneSourceControl) + populate(objectMap, "configureLoadBalancing", c.ConfigureLoadBalancing) + populate(objectMap, "correlationId", c.CorrelationID) + populate(objectMap, "hostingEnvironment", c.HostingEnvironment) + populate(objectMap, "overwrite", c.Overwrite) + populate(objectMap, "sourceWebAppId", c.SourceWebAppID) + populate(objectMap, "sourceWebAppLocation", c.SourceWebAppLocation) + populate(objectMap, "trafficManagerProfileId", c.TrafficManagerProfileID) + populate(objectMap, "trafficManagerProfileName", c.TrafficManagerProfileName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CloningInfo. +func (c *CloningInfo) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appSettingsOverrides": + err = unpopulate(val, "AppSettingsOverrides", &c.AppSettingsOverrides) + delete(rawMsg, key) + case "cloneCustomHostNames": + err = unpopulate(val, "CloneCustomHostNames", &c.CloneCustomHostNames) + delete(rawMsg, key) + case "cloneSourceControl": + err = unpopulate(val, "CloneSourceControl", &c.CloneSourceControl) + delete(rawMsg, key) + case "configureLoadBalancing": + err = unpopulate(val, "ConfigureLoadBalancing", &c.ConfigureLoadBalancing) + delete(rawMsg, key) + case "correlationId": + err = unpopulate(val, "CorrelationID", &c.CorrelationID) + delete(rawMsg, key) + case "hostingEnvironment": + err = unpopulate(val, "HostingEnvironment", &c.HostingEnvironment) + delete(rawMsg, key) + case "overwrite": + err = unpopulate(val, "Overwrite", &c.Overwrite) + delete(rawMsg, key) + case "sourceWebAppId": + err = unpopulate(val, "SourceWebAppID", &c.SourceWebAppID) + delete(rawMsg, key) + case "sourceWebAppLocation": + err = unpopulate(val, "SourceWebAppLocation", &c.SourceWebAppLocation) + delete(rawMsg, key) + case "trafficManagerProfileId": + err = unpopulate(val, "TrafficManagerProfileID", &c.TrafficManagerProfileID) + delete(rawMsg, key) + case "trafficManagerProfileName": + err = unpopulate(val, "TrafficManagerProfileName", &c.TrafficManagerProfileName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Configuration. +func (c Configuration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "activeRevisionsMode", c.ActiveRevisionsMode) + populate(objectMap, "ingress", c.Ingress) + populate(objectMap, "registries", c.Registries) + populate(objectMap, "secrets", c.Secrets) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Configuration. +func (c *Configuration) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activeRevisionsMode": + err = unpopulate(val, "ActiveRevisionsMode", &c.ActiveRevisionsMode) + delete(rawMsg, key) + case "ingress": + err = unpopulate(val, "Ingress", &c.Ingress) + delete(rawMsg, key) + case "registries": + err = unpopulate(val, "Registries", &c.Registries) + delete(rawMsg, key) + case "secrets": + err = unpopulate(val, "Secrets", &c.Secrets) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnStringInfo. +func (c ConnStringInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "connectionString", c.ConnectionString) + populate(objectMap, "name", c.Name) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnStringInfo. +func (c *ConnStringInfo) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connectionString": + err = unpopulate(val, "ConnectionString", &c.ConnectionString) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnStringValueTypePair. +func (c ConnStringValueTypePair) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "type", c.Type) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnStringValueTypePair. +func (c *ConnStringValueTypePair) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionStringDictionary. +func (c ConnectionStringDictionary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionStringDictionary. +func (c *ConnectionStringDictionary) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Contact. +func (c Contact) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "addressMailing", c.AddressMailing) + populate(objectMap, "email", c.Email) + populate(objectMap, "fax", c.Fax) + populate(objectMap, "jobTitle", c.JobTitle) + populate(objectMap, "nameFirst", c.NameFirst) + populate(objectMap, "nameLast", c.NameLast) + populate(objectMap, "nameMiddle", c.NameMiddle) + populate(objectMap, "organization", c.Organization) + populate(objectMap, "phone", c.Phone) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Contact. +func (c *Contact) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressMailing": + err = unpopulate(val, "AddressMailing", &c.AddressMailing) + delete(rawMsg, key) + case "email": + err = unpopulate(val, "Email", &c.Email) + delete(rawMsg, key) + case "fax": + err = unpopulate(val, "Fax", &c.Fax) + delete(rawMsg, key) + case "jobTitle": + err = unpopulate(val, "JobTitle", &c.JobTitle) + delete(rawMsg, key) + case "nameFirst": + err = unpopulate(val, "NameFirst", &c.NameFirst) + delete(rawMsg, key) + case "nameLast": + err = unpopulate(val, "NameLast", &c.NameLast) + delete(rawMsg, key) + case "nameMiddle": + err = unpopulate(val, "NameMiddle", &c.NameMiddle) + delete(rawMsg, key) + case "organization": + err = unpopulate(val, "Organization", &c.Organization) + delete(rawMsg, key) + case "phone": + err = unpopulate(val, "Phone", &c.Phone) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Container. +func (c Container) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "args", c.Args) + populate(objectMap, "command", c.Command) + populate(objectMap, "env", c.Env) + populate(objectMap, "image", c.Image) + populate(objectMap, "name", c.Name) + populate(objectMap, "resources", c.Resources) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Container. +func (c *Container) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "args": + err = unpopulate(val, "Args", &c.Args) + delete(rawMsg, key) + case "command": + err = unpopulate(val, "Command", &c.Command) + delete(rawMsg, key) + case "env": + err = unpopulate(val, "Env", &c.Env) + delete(rawMsg, key) + case "image": + err = unpopulate(val, "Image", &c.Image) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "resources": + err = unpopulate(val, "Resources", &c.Resources) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerApp. +func (c ContainerApp) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "location", c.Location) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "tags", c.Tags) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerApp. +func (c *ContainerApp) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &c.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerAppCollection. +func (c ContainerAppCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppCollection. +func (c *ContainerAppCollection) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerAppProperties. +func (c ContainerAppProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "configuration", c.Configuration) + populate(objectMap, "kubeEnvironmentId", c.KubeEnvironmentID) + populate(objectMap, "latestRevisionFqdn", c.LatestRevisionFqdn) + populate(objectMap, "latestRevisionName", c.LatestRevisionName) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "template", c.Template) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppProperties. +func (c *ContainerAppProperties) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "configuration": + err = unpopulate(val, "Configuration", &c.Configuration) + delete(rawMsg, key) + case "kubeEnvironmentId": + err = unpopulate(val, "KubeEnvironmentID", &c.KubeEnvironmentID) + delete(rawMsg, key) + case "latestRevisionFqdn": + err = unpopulate(val, "LatestRevisionFqdn", &c.LatestRevisionFqdn) + delete(rawMsg, key) + case "latestRevisionName": + err = unpopulate(val, "LatestRevisionName", &c.LatestRevisionName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "template": + err = unpopulate(val, "Template", &c.Template) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerAppSecret. +func (c ContainerAppSecret) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "name", c.Name) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppSecret. +func (c *ContainerAppSecret) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerAppsConfiguration. +func (c ContainerAppsConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "appSubnetResourceId", c.AppSubnetResourceID) + populate(objectMap, "controlPlaneSubnetResourceId", c.ControlPlaneSubnetResourceID) + populate(objectMap, "daprAIInstrumentationKey", c.DaprAIInstrumentationKey) + populate(objectMap, "dockerBridgeCidr", c.DockerBridgeCidr) + populate(objectMap, "platformReservedCidr", c.PlatformReservedCidr) + populate(objectMap, "platformReservedDnsIP", c.PlatformReservedDNSIP) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppsConfiguration. +func (c *ContainerAppsConfiguration) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appSubnetResourceId": + err = unpopulate(val, "AppSubnetResourceID", &c.AppSubnetResourceID) + delete(rawMsg, key) + case "controlPlaneSubnetResourceId": + err = unpopulate(val, "ControlPlaneSubnetResourceID", &c.ControlPlaneSubnetResourceID) + delete(rawMsg, key) + case "daprAIInstrumentationKey": + err = unpopulate(val, "DaprAIInstrumentationKey", &c.DaprAIInstrumentationKey) + delete(rawMsg, key) + case "dockerBridgeCidr": + err = unpopulate(val, "DockerBridgeCidr", &c.DockerBridgeCidr) + delete(rawMsg, key) + case "platformReservedCidr": + err = unpopulate(val, "PlatformReservedCidr", &c.PlatformReservedCidr) + delete(rawMsg, key) + case "platformReservedDnsIP": + err = unpopulate(val, "PlatformReservedDNSIP", &c.PlatformReservedDNSIP) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerCPUStatistics. +func (c ContainerCPUStatistics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "cpuUsage", c.CPUUsage) + populate(objectMap, "onlineCpuCount", c.OnlineCPUCount) + populate(objectMap, "systemCpuUsage", c.SystemCPUUsage) + populate(objectMap, "throttlingData", c.ThrottlingData) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerCPUStatistics. +func (c *ContainerCPUStatistics) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpuUsage": + err = unpopulate(val, "CPUUsage", &c.CPUUsage) + delete(rawMsg, key) + case "onlineCpuCount": + err = unpopulate(val, "OnlineCPUCount", &c.OnlineCPUCount) + delete(rawMsg, key) + case "systemCpuUsage": + err = unpopulate(val, "SystemCPUUsage", &c.SystemCPUUsage) + delete(rawMsg, key) + case "throttlingData": + err = unpopulate(val, "ThrottlingData", &c.ThrottlingData) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerCPUUsage. +func (c ContainerCPUUsage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "kernelModeUsage", c.KernelModeUsage) + populate(objectMap, "perCpuUsage", c.PerCPUUsage) + populate(objectMap, "totalUsage", c.TotalUsage) + populate(objectMap, "userModeUsage", c.UserModeUsage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerCPUUsage. +func (c *ContainerCPUUsage) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "kernelModeUsage": + err = unpopulate(val, "KernelModeUsage", &c.KernelModeUsage) + delete(rawMsg, key) + case "perCpuUsage": + err = unpopulate(val, "PerCPUUsage", &c.PerCPUUsage) + delete(rawMsg, key) + case "totalUsage": + err = unpopulate(val, "TotalUsage", &c.TotalUsage) + delete(rawMsg, key) + case "userModeUsage": + err = unpopulate(val, "UserModeUsage", &c.UserModeUsage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerInfo. +func (c ContainerInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "currentCpuStats", c.CurrentCPUStats) + populateTimeRFC3339(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) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerInfo. +func (c *ContainerInfo) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentCpuStats": + err = unpopulate(val, "CurrentCPUStats", &c.CurrentCPUStats) + delete(rawMsg, key) + case "currentTimeStamp": + err = unpopulateTimeRFC3339(val, "CurrentTimeStamp", &c.CurrentTimeStamp) + delete(rawMsg, key) + case "eth0": + err = unpopulate(val, "Eth0", &c.Eth0) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "memoryStats": + err = unpopulate(val, "MemoryStats", &c.MemoryStats) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "previousCpuStats": + err = unpopulate(val, "PreviousCPUStats", &c.PreviousCPUStats) + delete(rawMsg, key) + case "previousTimeStamp": + err = unpopulateTimeRFC3339(val, "PreviousTimeStamp", &c.PreviousTimeStamp) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerMemoryStatistics. +func (c ContainerMemoryStatistics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "limit", c.Limit) + populate(objectMap, "maxUsage", c.MaxUsage) + populate(objectMap, "usage", c.Usage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerMemoryStatistics. +func (c *ContainerMemoryStatistics) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "limit": + err = unpopulate(val, "Limit", &c.Limit) + delete(rawMsg, key) + case "maxUsage": + err = unpopulate(val, "MaxUsage", &c.MaxUsage) + delete(rawMsg, key) + case "usage": + err = unpopulate(val, "Usage", &c.Usage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterfaceStatistics. +func (c ContainerNetworkInterfaceStatistics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "rxBytes", c.RxBytes) + populate(objectMap, "rxDropped", c.RxDropped) + populate(objectMap, "rxErrors", c.RxErrors) + populate(objectMap, "rxPackets", c.RxPackets) + populate(objectMap, "txBytes", c.TxBytes) + populate(objectMap, "txDropped", c.TxDropped) + populate(objectMap, "txErrors", c.TxErrors) + populate(objectMap, "txPackets", c.TxPackets) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerNetworkInterfaceStatistics. +func (c *ContainerNetworkInterfaceStatistics) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "rxBytes": + err = unpopulate(val, "RxBytes", &c.RxBytes) + delete(rawMsg, key) + case "rxDropped": + err = unpopulate(val, "RxDropped", &c.RxDropped) + delete(rawMsg, key) + case "rxErrors": + err = unpopulate(val, "RxErrors", &c.RxErrors) + delete(rawMsg, key) + case "rxPackets": + err = unpopulate(val, "RxPackets", &c.RxPackets) + delete(rawMsg, key) + case "txBytes": + err = unpopulate(val, "TxBytes", &c.TxBytes) + delete(rawMsg, key) + case "txDropped": + err = unpopulate(val, "TxDropped", &c.TxDropped) + delete(rawMsg, key) + case "txErrors": + err = unpopulate(val, "TxErrors", &c.TxErrors) + delete(rawMsg, key) + case "txPackets": + err = unpopulate(val, "TxPackets", &c.TxPackets) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerResources. +func (c ContainerResources) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "cpu", c.CPU) + populate(objectMap, "memory", c.Memory) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerResources. +func (c *ContainerResources) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpu": + err = unpopulate(val, "CPU", &c.CPU) + delete(rawMsg, key) + case "memory": + err = unpopulate(val, "Memory", &c.Memory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerThrottlingData. +func (c ContainerThrottlingData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "periods", c.Periods) + populate(objectMap, "throttledPeriods", c.ThrottledPeriods) + populate(objectMap, "throttledTime", c.ThrottledTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerThrottlingData. +func (c *ContainerThrottlingData) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "periods": + err = unpopulate(val, "Periods", &c.Periods) + delete(rawMsg, key) + case "throttledPeriods": + err = unpopulate(val, "ThrottledPeriods", &c.ThrottledPeriods) + delete(rawMsg, key) + case "throttledTime": + err = unpopulate(val, "ThrottledTime", &c.ThrottledTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContentHash. +func (c ContentHash) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "algorithm", c.Algorithm) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContentHash. +func (c *ContentHash) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "algorithm": + err = unpopulate(val, "Algorithm", &c.Algorithm) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContentLink. +func (c ContentLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "contentHash", c.ContentHash) + populate(objectMap, "contentSize", c.ContentSize) + populate(objectMap, "contentVersion", c.ContentVersion) + populate(objectMap, "metadata", &c.Metadata) + populate(objectMap, "uri", c.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContentLink. +func (c *ContentLink) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "contentHash": + err = unpopulate(val, "ContentHash", &c.ContentHash) + delete(rawMsg, key) + case "contentSize": + err = unpopulate(val, "ContentSize", &c.ContentSize) + delete(rawMsg, key) + case "contentVersion": + err = unpopulate(val, "ContentVersion", &c.ContentVersion) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &c.Metadata) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &c.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContinuousWebJob. +func (c ContinuousWebJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContinuousWebJob. +func (c *ContinuousWebJob) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContinuousWebJobCollection. +func (c ContinuousWebJobCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContinuousWebJobCollection. +func (c *ContinuousWebJobCollection) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContinuousWebJobProperties. +func (c ContinuousWebJobProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "detailed_status", c.DetailedStatus) + populate(objectMap, "error", c.Error) + populate(objectMap, "extra_info_url", c.ExtraInfoURL) + populate(objectMap, "log_url", c.LogURL) + populate(objectMap, "run_command", c.RunCommand) + populate(objectMap, "settings", c.Settings) + populate(objectMap, "status", c.Status) + populate(objectMap, "url", c.URL) + populate(objectMap, "using_sdk", c.UsingSdk) + populate(objectMap, "web_job_type", c.WebJobType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContinuousWebJobProperties. +func (c *ContinuousWebJobProperties) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "detailed_status": + err = unpopulate(val, "DetailedStatus", &c.DetailedStatus) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &c.Error) + delete(rawMsg, key) + case "extra_info_url": + err = unpopulate(val, "ExtraInfoURL", &c.ExtraInfoURL) + delete(rawMsg, key) + case "log_url": + err = unpopulate(val, "LogURL", &c.LogURL) + delete(rawMsg, key) + case "run_command": + err = unpopulate(val, "RunCommand", &c.RunCommand) + delete(rawMsg, key) + case "settings": + err = unpopulate(val, "Settings", &c.Settings) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &c.Status) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &c.URL) + delete(rawMsg, key) + case "using_sdk": + err = unpopulate(val, "UsingSdk", &c.UsingSdk) + delete(rawMsg, key) + case "web_job_type": + err = unpopulate(val, "WebJobType", &c.WebJobType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CookieExpiration. +func (c CookieExpiration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "convention", c.Convention) + populate(objectMap, "timeToExpiration", c.TimeToExpiration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CookieExpiration. +func (c *CookieExpiration) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "convention": + err = unpopulate(val, "Convention", &c.Convention) + delete(rawMsg, key) + case "timeToExpiration": + err = unpopulate(val, "TimeToExpiration", &c.TimeToExpiration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Correlation. +func (c Correlation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "clientTrackingId", c.ClientTrackingID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Correlation. +func (c *Correlation) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientTrackingId": + err = unpopulate(val, "ClientTrackingID", &c.ClientTrackingID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CorsSettings. +func (c CorsSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allowedOrigins", c.AllowedOrigins) + populate(objectMap, "supportCredentials", c.SupportCredentials) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CorsSettings. +func (c *CorsSettings) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedOrigins": + err = unpopulate(val, "AllowedOrigins", &c.AllowedOrigins) + delete(rawMsg, key) + case "supportCredentials": + err = unpopulate(val, "SupportCredentials", &c.SupportCredentials) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmDeploymentStatus. +func (c CsmDeploymentStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmDeploymentStatus. +func (c *CsmDeploymentStatus) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmDeploymentStatusCollection. +func (c CsmDeploymentStatusCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmDeploymentStatusCollection. +func (c *CsmDeploymentStatusCollection) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmDeploymentStatusProperties. +func (c CsmDeploymentStatusProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "deploymentId", c.DeploymentID) + populate(objectMap, "errors", c.Errors) + populate(objectMap, "failedInstancesLogs", c.FailedInstancesLogs) + populate(objectMap, "numberOfInstancesFailed", c.NumberOfInstancesFailed) + populate(objectMap, "numberOfInstancesInProgress", c.NumberOfInstancesInProgress) + populate(objectMap, "numberOfInstancesSuccessful", c.NumberOfInstancesSuccessful) + populate(objectMap, "status", c.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmDeploymentStatusProperties. +func (c *CsmDeploymentStatusProperties) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deploymentId": + err = unpopulate(val, "DeploymentID", &c.DeploymentID) + delete(rawMsg, key) + case "errors": + err = unpopulate(val, "Errors", &c.Errors) + delete(rawMsg, key) + case "failedInstancesLogs": + err = unpopulate(val, "FailedInstancesLogs", &c.FailedInstancesLogs) + delete(rawMsg, key) + case "numberOfInstancesFailed": + err = unpopulate(val, "NumberOfInstancesFailed", &c.NumberOfInstancesFailed) + delete(rawMsg, key) + case "numberOfInstancesInProgress": + err = unpopulate(val, "NumberOfInstancesInProgress", &c.NumberOfInstancesInProgress) + delete(rawMsg, key) + case "numberOfInstancesSuccessful": + err = unpopulate(val, "NumberOfInstancesSuccessful", &c.NumberOfInstancesSuccessful) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &c.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmMoveResourceEnvelope. +func (c CsmMoveResourceEnvelope) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "resources", c.Resources) + populate(objectMap, "targetResourceGroup", c.TargetResourceGroup) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmMoveResourceEnvelope. +func (c *CsmMoveResourceEnvelope) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resources": + err = unpopulate(val, "Resources", &c.Resources) + delete(rawMsg, key) + case "targetResourceGroup": + err = unpopulate(val, "TargetResourceGroup", &c.TargetResourceGroup) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmOperationCollection. +func (c CsmOperationCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmOperationCollection. +func (c *CsmOperationCollection) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmOperationDescription. +func (c CsmOperationDescription) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "display", c.Display) + populate(objectMap, "isDataAction", c.IsDataAction) + populate(objectMap, "name", c.Name) + populate(objectMap, "origin", c.Origin) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmOperationDescription. +func (c *CsmOperationDescription) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "display": + err = unpopulate(val, "Display", &c.Display) + delete(rawMsg, key) + case "isDataAction": + err = unpopulate(val, "IsDataAction", &c.IsDataAction) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &c.Origin) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmOperationDescriptionProperties. +func (c CsmOperationDescriptionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "serviceSpecification", c.ServiceSpecification) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmOperationDescriptionProperties. +func (c *CsmOperationDescriptionProperties) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "serviceSpecification": + err = unpopulate(val, "ServiceSpecification", &c.ServiceSpecification) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmOperationDisplay. +func (c CsmOperationDisplay) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", c.Description) + populate(objectMap, "operation", c.Operation) + populate(objectMap, "provider", c.Provider) + populate(objectMap, "resource", c.Resource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmOperationDisplay. +func (c *CsmOperationDisplay) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &c.Description) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &c.Operation) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &c.Provider) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &c.Resource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmPublishingCredentialsPoliciesEntity. +func (c CsmPublishingCredentialsPoliciesEntity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmPublishingCredentialsPoliciesEntity. +func (c *CsmPublishingCredentialsPoliciesEntity) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmPublishingCredentialsPoliciesEntityProperties. +func (c CsmPublishingCredentialsPoliciesEntityProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allow", c.Allow) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmPublishingCredentialsPoliciesEntityProperties. +func (c *CsmPublishingCredentialsPoliciesEntityProperties) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allow": + err = unpopulate(val, "Allow", &c.Allow) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmPublishingProfileOptions. +func (c CsmPublishingProfileOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "format", c.Format) + populate(objectMap, "includeDisasterRecoveryEndpoints", c.IncludeDisasterRecoveryEndpoints) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmPublishingProfileOptions. +func (c *CsmPublishingProfileOptions) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "format": + err = unpopulate(val, "Format", &c.Format) + delete(rawMsg, key) + case "includeDisasterRecoveryEndpoints": + err = unpopulate(val, "IncludeDisasterRecoveryEndpoints", &c.IncludeDisasterRecoveryEndpoints) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmSlotEntity. +func (c CsmSlotEntity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "preserveVnet", c.PreserveVnet) + populate(objectMap, "targetSlot", c.TargetSlot) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmSlotEntity. +func (c *CsmSlotEntity) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "preserveVnet": + err = unpopulate(val, "PreserveVnet", &c.PreserveVnet) + delete(rawMsg, key) + case "targetSlot": + err = unpopulate(val, "TargetSlot", &c.TargetSlot) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmUsageQuota. +func (c CsmUsageQuota) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "currentValue", c.CurrentValue) + populate(objectMap, "limit", c.Limit) + populate(objectMap, "name", c.Name) + populateTimeRFC3339(objectMap, "nextResetTime", c.NextResetTime) + populate(objectMap, "unit", c.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmUsageQuota. +func (c *CsmUsageQuota) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentValue": + err = unpopulate(val, "CurrentValue", &c.CurrentValue) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &c.Limit) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "nextResetTime": + err = unpopulateTimeRFC3339(val, "NextResetTime", &c.NextResetTime) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &c.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmUsageQuotaCollection. +func (c CsmUsageQuotaCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmUsageQuotaCollection. +func (c *CsmUsageQuotaCollection) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomDNSSuffixConfiguration. +func (c CustomDNSSuffixConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDNSSuffixConfiguration. +func (c *CustomDNSSuffixConfiguration) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomDNSSuffixConfigurationProperties. +func (c CustomDNSSuffixConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "certificateUrl", c.CertificateURL) + populate(objectMap, "dnsSuffix", c.DNSSuffix) + populate(objectMap, "keyVaultReferenceIdentity", c.KeyVaultReferenceIdentity) + populate(objectMap, "provisioningDetails", c.ProvisioningDetails) + populate(objectMap, "provisioningState", c.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDNSSuffixConfigurationProperties. +func (c *CustomDNSSuffixConfigurationProperties) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificateUrl": + err = unpopulate(val, "CertificateURL", &c.CertificateURL) + delete(rawMsg, key) + case "dnsSuffix": + err = unpopulate(val, "DNSSuffix", &c.DNSSuffix) + delete(rawMsg, key) + case "keyVaultReferenceIdentity": + err = unpopulate(val, "KeyVaultReferenceIdentity", &c.KeyVaultReferenceIdentity) + delete(rawMsg, key) + case "provisioningDetails": + err = unpopulate(val, "ProvisioningDetails", &c.ProvisioningDetails) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomHostnameAnalysisResult. +func (c CustomHostnameAnalysisResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomHostnameAnalysisResult. +func (c *CustomHostnameAnalysisResult) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomHostnameAnalysisResultProperties. +func (c CustomHostnameAnalysisResultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "aRecords", c.ARecords) + populate(objectMap, "alternateCNameRecords", c.AlternateCNameRecords) + populate(objectMap, "alternateTxtRecords", c.AlternateTxtRecords) + populate(objectMap, "cNameRecords", c.CNameRecords) + populate(objectMap, "conflictingAppResourceId", c.ConflictingAppResourceID) + populate(objectMap, "customDomainVerificationFailureInfo", c.CustomDomainVerificationFailureInfo) + populate(objectMap, "customDomainVerificationTest", c.CustomDomainVerificationTest) + populate(objectMap, "hasConflictAcrossSubscription", c.HasConflictAcrossSubscription) + populate(objectMap, "hasConflictOnScaleUnit", c.HasConflictOnScaleUnit) + populate(objectMap, "isHostnameAlreadyVerified", c.IsHostnameAlreadyVerified) + populate(objectMap, "txtRecords", c.TxtRecords) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomHostnameAnalysisResultProperties. +func (c *CustomHostnameAnalysisResultProperties) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aRecords": + err = unpopulate(val, "ARecords", &c.ARecords) + delete(rawMsg, key) + case "alternateCNameRecords": + err = unpopulate(val, "AlternateCNameRecords", &c.AlternateCNameRecords) + delete(rawMsg, key) + case "alternateTxtRecords": + err = unpopulate(val, "AlternateTxtRecords", &c.AlternateTxtRecords) + delete(rawMsg, key) + case "cNameRecords": + err = unpopulate(val, "CNameRecords", &c.CNameRecords) + delete(rawMsg, key) + case "conflictingAppResourceId": + err = unpopulate(val, "ConflictingAppResourceID", &c.ConflictingAppResourceID) + delete(rawMsg, key) + case "customDomainVerificationFailureInfo": + err = unpopulate(val, "CustomDomainVerificationFailureInfo", &c.CustomDomainVerificationFailureInfo) + delete(rawMsg, key) + case "customDomainVerificationTest": + err = unpopulate(val, "CustomDomainVerificationTest", &c.CustomDomainVerificationTest) + delete(rawMsg, key) + case "hasConflictAcrossSubscription": + err = unpopulate(val, "HasConflictAcrossSubscription", &c.HasConflictAcrossSubscription) + delete(rawMsg, key) + case "hasConflictOnScaleUnit": + err = unpopulate(val, "HasConflictOnScaleUnit", &c.HasConflictOnScaleUnit) + delete(rawMsg, key) + case "isHostnameAlreadyVerified": + err = unpopulate(val, "IsHostnameAlreadyVerified", &c.IsHostnameAlreadyVerified) + delete(rawMsg, key) + case "txtRecords": + err = unpopulate(val, "TxtRecords", &c.TxtRecords) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomHostnameSites. +func (c CustomHostnameSites) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomHostnameSites. +func (c *CustomHostnameSites) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomHostnameSitesCollection. +func (c CustomHostnameSitesCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomHostnameSitesCollection. +func (c *CustomHostnameSitesCollection) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomHostnameSitesProperties. +func (c CustomHostnameSitesProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "customHostname", c.CustomHostname) + populate(objectMap, "region", c.Region) + populate(objectMap, "siteResourceIds", c.SiteResourceIDs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomHostnameSitesProperties. +func (c *CustomHostnameSitesProperties) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customHostname": + err = unpopulate(val, "CustomHostname", &c.CustomHostname) + delete(rawMsg, key) + case "region": + err = unpopulate(val, "Region", &c.Region) + delete(rawMsg, key) + case "siteResourceIds": + err = unpopulate(val, "SiteResourceIDs", &c.SiteResourceIDs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomOpenIDConnectProvider. +func (c CustomOpenIDConnectProvider) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "enabled", c.Enabled) + populate(objectMap, "login", c.Login) + populate(objectMap, "registration", c.Registration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomOpenIDConnectProvider. +func (c *CustomOpenIDConnectProvider) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &c.Enabled) + delete(rawMsg, key) + case "login": + err = unpopulate(val, "Login", &c.Login) + delete(rawMsg, key) + case "registration": + err = unpopulate(val, "Registration", &c.Registration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomScaleRule. +func (c CustomScaleRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "auth", c.Auth) + populate(objectMap, "metadata", c.Metadata) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomScaleRule. +func (c *CustomScaleRule) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "auth": + err = unpopulate(val, "Auth", &c.Auth) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &c.Metadata) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Dapr. +func (d Dapr) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "appId", d.AppID) + populate(objectMap, "appPort", d.AppPort) + populate(objectMap, "components", d.Components) + populate(objectMap, "enabled", d.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Dapr. +func (d *Dapr) 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 "components": + err = unpopulate(val, "Components", &d.Components) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &d.Enabled) + 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 DaprComponent. +func (d DaprComponent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "metadata", d.Metadata) + populate(objectMap, "name", d.Name) + populate(objectMap, "type", d.Type) + populate(objectMap, "version", d.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DaprComponent. +func (d *DaprComponent) 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 "metadata": + err = unpopulate(val, "Metadata", &d.Metadata) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &d.Version) + 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]interface{}) + populate(objectMap, "name", d.Name) + populate(objectMap, "secretRef", d.SecretRef) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DaprMetadata. +func (d *DaprMetadata) 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 "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "secretRef": + err = unpopulate(val, "SecretRef", &d.SecretRef) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + 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 DataProviderMetadata. +func (d DataProviderMetadata) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "propertyBag", d.PropertyBag) + populate(objectMap, "providerName", d.ProviderName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataProviderMetadata. +func (d *DataProviderMetadata) 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 "propertyBag": + err = unpopulate(val, "PropertyBag", &d.PropertyBag) + delete(rawMsg, key) + case "providerName": + err = unpopulate(val, "ProviderName", &d.ProviderName) + 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 DataSource. +func (d DataSource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "dataSourceUri", d.DataSourceURI) + populate(objectMap, "instructions", d.Instructions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataSource. +func (d *DataSource) 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 "dataSourceUri": + err = unpopulate(val, "DataSourceURI", &d.DataSourceURI) + delete(rawMsg, key) + case "instructions": + err = unpopulate(val, "Instructions", &d.Instructions) + 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 DataTableResponseColumn. +func (d DataTableResponseColumn) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "columnName", d.ColumnName) + populate(objectMap, "columnType", d.ColumnType) + populate(objectMap, "dataType", d.DataType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataTableResponseColumn. +func (d *DataTableResponseColumn) 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 "columnName": + err = unpopulate(val, "ColumnName", &d.ColumnName) + delete(rawMsg, key) + case "columnType": + err = unpopulate(val, "ColumnType", &d.ColumnType) + delete(rawMsg, key) + case "dataType": + err = unpopulate(val, "DataType", &d.DataType) + 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 DataTableResponseObject. +func (d DataTableResponseObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "columns", d.Columns) + populate(objectMap, "rows", d.Rows) + populate(objectMap, "tableName", d.TableName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataTableResponseObject. +func (d *DataTableResponseObject) 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 "columns": + err = unpopulate(val, "Columns", &d.Columns) + delete(rawMsg, key) + case "rows": + err = unpopulate(val, "Rows", &d.Rows) + delete(rawMsg, key) + case "tableName": + err = unpopulate(val, "TableName", &d.TableName) + 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 DatabaseBackupSetting. +func (d DatabaseBackupSetting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "connectionString", d.ConnectionString) + populate(objectMap, "connectionStringName", d.ConnectionStringName) + populate(objectMap, "databaseType", d.DatabaseType) + populate(objectMap, "name", d.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseBackupSetting. +func (d *DatabaseBackupSetting) 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 "connectionString": + err = unpopulate(val, "ConnectionString", &d.ConnectionString) + delete(rawMsg, key) + case "connectionStringName": + err = unpopulate(val, "ConnectionStringName", &d.ConnectionStringName) + delete(rawMsg, key) + case "databaseType": + err = unpopulate(val, "DatabaseType", &d.DatabaseType) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + 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 DefaultAuthorizationPolicy. +func (d DefaultAuthorizationPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allowedApplications", d.AllowedApplications) + populate(objectMap, "allowedPrincipals", d.AllowedPrincipals) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultAuthorizationPolicy. +func (d *DefaultAuthorizationPolicy) 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 "allowedApplications": + err = unpopulate(val, "AllowedApplications", &d.AllowedApplications) + delete(rawMsg, key) + case "allowedPrincipals": + err = unpopulate(val, "AllowedPrincipals", &d.AllowedPrincipals) + 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 DefaultErrorResponse. +func (d DefaultErrorResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "error", d.Error) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultErrorResponse. +func (d *DefaultErrorResponse) 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 "error": + err = unpopulate(val, "Error", &d.Error) + 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 DefaultErrorResponseError. +func (d DefaultErrorResponseError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", d.Code) + populate(objectMap, "details", d.Details) + populate(objectMap, "innererror", d.Innererror) + populate(objectMap, "message", d.Message) + populate(objectMap, "target", d.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultErrorResponseError. +func (d *DefaultErrorResponseError) 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 "code": + err = unpopulate(val, "Code", &d.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &d.Details) + delete(rawMsg, key) + case "innererror": + err = unpopulate(val, "Innererror", &d.Innererror) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &d.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &d.Target) + 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 DefaultErrorResponseErrorDetailsItem. +func (d DefaultErrorResponseErrorDetailsItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", d.Code) + populate(objectMap, "message", d.Message) + populate(objectMap, "target", d.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultErrorResponseErrorDetailsItem. +func (d *DefaultErrorResponseErrorDetailsItem) 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 "code": + err = unpopulate(val, "Code", &d.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &d.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &d.Target) + 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 DeletedAppRestoreRequest. +func (d DeletedAppRestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedAppRestoreRequest. +func (d *DeletedAppRestoreRequest) 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 "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + 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 DeletedAppRestoreRequestProperties. +func (d DeletedAppRestoreRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "deletedSiteId", d.DeletedSiteID) + populate(objectMap, "recoverConfiguration", d.RecoverConfiguration) + populate(objectMap, "snapshotTime", d.SnapshotTime) + populate(objectMap, "useDRSecondary", d.UseDRSecondary) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedAppRestoreRequestProperties. +func (d *DeletedAppRestoreRequestProperties) 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 "deletedSiteId": + err = unpopulate(val, "DeletedSiteID", &d.DeletedSiteID) + delete(rawMsg, key) + case "recoverConfiguration": + err = unpopulate(val, "RecoverConfiguration", &d.RecoverConfiguration) + delete(rawMsg, key) + case "snapshotTime": + err = unpopulate(val, "SnapshotTime", &d.SnapshotTime) + delete(rawMsg, key) + case "useDRSecondary": + err = unpopulate(val, "UseDRSecondary", &d.UseDRSecondary) + 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 DeletedSite. +func (d DeletedSite) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedSite. +func (d *DeletedSite) 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 "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + 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 DeletedSiteProperties. +func (d DeletedSiteProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "deletedSiteId", d.DeletedSiteID) + populate(objectMap, "deletedSiteName", d.DeletedSiteName) + populate(objectMap, "deletedTimestamp", d.DeletedTimestamp) + populate(objectMap, "geoRegionName", d.GeoRegionName) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "resourceGroup", d.ResourceGroup) + populate(objectMap, "slot", d.Slot) + populate(objectMap, "subscription", d.Subscription) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedSiteProperties. +func (d *DeletedSiteProperties) 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 "deletedSiteId": + err = unpopulate(val, "DeletedSiteID", &d.DeletedSiteID) + delete(rawMsg, key) + case "deletedSiteName": + err = unpopulate(val, "DeletedSiteName", &d.DeletedSiteName) + delete(rawMsg, key) + case "deletedTimestamp": + err = unpopulate(val, "DeletedTimestamp", &d.DeletedTimestamp) + delete(rawMsg, key) + case "geoRegionName": + err = unpopulate(val, "GeoRegionName", &d.GeoRegionName) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &d.ResourceGroup) + delete(rawMsg, key) + case "slot": + err = unpopulate(val, "Slot", &d.Slot) + delete(rawMsg, key) + case "subscription": + err = unpopulate(val, "Subscription", &d.Subscription) + 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 DeletedWebAppCollection. +func (d DeletedWebAppCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedWebAppCollection. +func (d *DeletedWebAppCollection) 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 "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + 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 Deployment. +func (d Deployment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Deployment. +func (d *Deployment) 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 "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + 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 DeploymentCollection. +func (d DeploymentCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentCollection. +func (d *DeploymentCollection) 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 "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + 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 DeploymentLocations. +func (d DeploymentLocations) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "hostingEnvironmentDeploymentInfos", d.HostingEnvironmentDeploymentInfos) + populate(objectMap, "hostingEnvironments", d.HostingEnvironments) + populate(objectMap, "locations", d.Locations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentLocations. +func (d *DeploymentLocations) 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 "hostingEnvironmentDeploymentInfos": + err = unpopulate(val, "HostingEnvironmentDeploymentInfos", &d.HostingEnvironmentDeploymentInfos) + delete(rawMsg, key) + case "hostingEnvironments": + err = unpopulate(val, "HostingEnvironments", &d.HostingEnvironments) + delete(rawMsg, key) + case "locations": + err = unpopulate(val, "Locations", &d.Locations) + 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 DeploymentProperties. +func (d DeploymentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "active", d.Active) + populate(objectMap, "author", d.Author) + populate(objectMap, "author_email", d.AuthorEmail) + populate(objectMap, "deployer", d.Deployer) + populate(objectMap, "details", d.Details) + populateTimeRFC3339(objectMap, "end_time", d.EndTime) + populate(objectMap, "message", d.Message) + populateTimeRFC3339(objectMap, "start_time", d.StartTime) + populate(objectMap, "status", d.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentProperties. +func (d *DeploymentProperties) 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 "active": + err = unpopulate(val, "Active", &d.Active) + delete(rawMsg, key) + case "author": + err = unpopulate(val, "Author", &d.Author) + delete(rawMsg, key) + case "author_email": + err = unpopulate(val, "AuthorEmail", &d.AuthorEmail) + delete(rawMsg, key) + case "deployer": + err = unpopulate(val, "Deployer", &d.Deployer) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &d.Details) + delete(rawMsg, key) + case "end_time": + err = unpopulateTimeRFC3339(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) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &d.Status) + 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 DetectorAbnormalTimePeriod. +func (d DetectorAbnormalTimePeriod) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populateTimeRFC3339(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) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DetectorAbnormalTimePeriod. +func (d *DetectorAbnormalTimePeriod) 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 "endTime": + err = unpopulateTimeRFC3339(val, "EndTime", &d.EndTime) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &d.Message) + delete(rawMsg, key) + case "metaData": + err = unpopulate(val, "MetaData", &d.MetaData) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &d.Priority) + delete(rawMsg, key) + case "solutions": + err = unpopulate(val, "Solutions", &d.Solutions) + delete(rawMsg, key) + case "source": + err = unpopulate(val, "Source", &d.Source) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, "StartTime", &d.StartTime) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + 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 DetectorDefinition. +func (d DetectorDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", d.Description) + populate(objectMap, "displayName", d.DisplayName) + populate(objectMap, "isEnabled", d.IsEnabled) + populate(objectMap, "rank", d.Rank) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DetectorDefinition. +func (d *DetectorDefinition) 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 "description": + err = unpopulate(val, "Description", &d.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &d.DisplayName) + delete(rawMsg, key) + case "isEnabled": + err = unpopulate(val, "IsEnabled", &d.IsEnabled) + delete(rawMsg, key) + case "rank": + err = unpopulate(val, "Rank", &d.Rank) + 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 DetectorDefinitionResource. +func (d DetectorDefinitionResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DetectorDefinitionResource. +func (d *DetectorDefinitionResource) 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 "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + 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 DetectorInfo. +func (d DetectorInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "analysisType", d.AnalysisType) + populate(objectMap, "author", d.Author) + populate(objectMap, "category", d.Category) + populate(objectMap, "description", d.Description) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "score", d.Score) + populate(objectMap, "supportTopicList", d.SupportTopicList) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DetectorInfo. +func (d *DetectorInfo) 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 "analysisType": + err = unpopulate(val, "AnalysisType", &d.AnalysisType) + delete(rawMsg, key) + case "author": + err = unpopulate(val, "Author", &d.Author) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &d.Category) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &d.Description) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "score": + err = unpopulate(val, "Score", &d.Score) + delete(rawMsg, key) + case "supportTopicList": + err = unpopulate(val, "SupportTopicList", &d.SupportTopicList) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + 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 DetectorResponse. +func (d DetectorResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DetectorResponse. +func (d *DetectorResponse) 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 "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + 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 DetectorResponseCollection. +func (d DetectorResponseCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DetectorResponseCollection. +func (d *DetectorResponseCollection) 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 "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + 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 DetectorResponseProperties. +func (d DetectorResponseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "dataProvidersMetadata", d.DataProvidersMetadata) + populate(objectMap, "dataset", d.Dataset) + populate(objectMap, "metadata", d.Metadata) + populate(objectMap, "status", d.Status) + populate(objectMap, "suggestedUtterances", d.SuggestedUtterances) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DetectorResponseProperties. +func (d *DetectorResponseProperties) 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 "dataProvidersMetadata": + err = unpopulate(val, "DataProvidersMetadata", &d.DataProvidersMetadata) + delete(rawMsg, key) + case "dataset": + err = unpopulate(val, "Dataset", &d.Dataset) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &d.Metadata) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &d.Status) + delete(rawMsg, key) + case "suggestedUtterances": + err = unpopulate(val, "SuggestedUtterances", &d.SuggestedUtterances) + 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 DiagnosticAnalysis. +func (d DiagnosticAnalysis) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticAnalysis. +func (d *DiagnosticAnalysis) 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 "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + 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 DiagnosticAnalysisCollection. +func (d DiagnosticAnalysisCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticAnalysisCollection. +func (d *DiagnosticAnalysisCollection) 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 "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + 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 DiagnosticAnalysisProperties. +func (d DiagnosticAnalysisProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "abnormalTimePeriods", d.AbnormalTimePeriods) + populateTimeRFC3339(objectMap, "endTime", d.EndTime) + populate(objectMap, "nonCorrelatedDetectors", d.NonCorrelatedDetectors) + populate(objectMap, "payload", d.Payload) + populateTimeRFC3339(objectMap, "startTime", d.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticAnalysisProperties. +func (d *DiagnosticAnalysisProperties) 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 "abnormalTimePeriods": + err = unpopulate(val, "AbnormalTimePeriods", &d.AbnormalTimePeriods) + delete(rawMsg, key) + case "endTime": + err = unpopulateTimeRFC3339(val, "EndTime", &d.EndTime) + delete(rawMsg, key) + case "nonCorrelatedDetectors": + err = unpopulate(val, "NonCorrelatedDetectors", &d.NonCorrelatedDetectors) + delete(rawMsg, key) + case "payload": + err = unpopulate(val, "Payload", &d.Payload) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, "StartTime", &d.StartTime) + 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 DiagnosticCategory. +func (d DiagnosticCategory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticCategory. +func (d *DiagnosticCategory) 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 "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + 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 DiagnosticCategoryCollection. +func (d DiagnosticCategoryCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticCategoryCollection. +func (d *DiagnosticCategoryCollection) 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 "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + 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 DiagnosticCategoryProperties. +func (d DiagnosticCategoryProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", d.Description) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticCategoryProperties. +func (d *DiagnosticCategoryProperties) 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 "description": + err = unpopulate(val, "Description", &d.Description) + 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 DiagnosticData. +func (d DiagnosticData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "renderingProperties", d.RenderingProperties) + populate(objectMap, "table", d.Table) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticData. +func (d *DiagnosticData) 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 "renderingProperties": + err = unpopulate(val, "RenderingProperties", &d.RenderingProperties) + delete(rawMsg, key) + case "table": + err = unpopulate(val, "Table", &d.Table) + 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 DiagnosticDetectorCollection. +func (d DiagnosticDetectorCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticDetectorCollection. +func (d *DiagnosticDetectorCollection) 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 "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + 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 DiagnosticDetectorResponse. +func (d DiagnosticDetectorResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticDetectorResponse. +func (d *DiagnosticDetectorResponse) 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 "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + 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 DiagnosticDetectorResponseProperties. +func (d DiagnosticDetectorResponseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "abnormalTimePeriods", d.AbnormalTimePeriods) + populate(objectMap, "data", d.Data) + populate(objectMap, "detectorDefinition", d.DetectorDefinition) + populateTimeRFC3339(objectMap, "endTime", d.EndTime) + populate(objectMap, "issueDetected", d.IssueDetected) + populate(objectMap, "metrics", d.Metrics) + populate(objectMap, "responseMetaData", d.ResponseMetaData) + populateTimeRFC3339(objectMap, "startTime", d.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticDetectorResponseProperties. +func (d *DiagnosticDetectorResponseProperties) 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 "abnormalTimePeriods": + err = unpopulate(val, "AbnormalTimePeriods", &d.AbnormalTimePeriods) + delete(rawMsg, key) + case "data": + err = unpopulate(val, "Data", &d.Data) + delete(rawMsg, key) + case "detectorDefinition": + err = unpopulate(val, "DetectorDefinition", &d.DetectorDefinition) + delete(rawMsg, key) + case "endTime": + err = unpopulateTimeRFC3339(val, "EndTime", &d.EndTime) + delete(rawMsg, key) + case "issueDetected": + err = unpopulate(val, "IssueDetected", &d.IssueDetected) + delete(rawMsg, key) + case "metrics": + err = unpopulate(val, "Metrics", &d.Metrics) + delete(rawMsg, key) + case "responseMetaData": + err = unpopulate(val, "ResponseMetaData", &d.ResponseMetaData) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, "StartTime", &d.StartTime) + 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 DiagnosticMetricSample. +func (d DiagnosticMetricSample) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "isAggregated", d.IsAggregated) + populate(objectMap, "maximum", d.Maximum) + populate(objectMap, "minimum", d.Minimum) + populate(objectMap, "roleInstance", d.RoleInstance) + populateTimeRFC3339(objectMap, "timestamp", d.Timestamp) + populate(objectMap, "total", d.Total) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticMetricSample. +func (d *DiagnosticMetricSample) 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 "isAggregated": + err = unpopulate(val, "IsAggregated", &d.IsAggregated) + delete(rawMsg, key) + case "maximum": + err = unpopulate(val, "Maximum", &d.Maximum) + delete(rawMsg, key) + case "minimum": + err = unpopulate(val, "Minimum", &d.Minimum) + delete(rawMsg, key) + case "roleInstance": + err = unpopulate(val, "RoleInstance", &d.RoleInstance) + delete(rawMsg, key) + case "timestamp": + err = unpopulateTimeRFC3339(val, "Timestamp", &d.Timestamp) + delete(rawMsg, key) + case "total": + err = unpopulate(val, "Total", &d.Total) + 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 DiagnosticMetricSet. +func (d DiagnosticMetricSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populateTimeRFC3339(objectMap, "endTime", d.EndTime) + populate(objectMap, "name", d.Name) + populateTimeRFC3339(objectMap, "startTime", d.StartTime) + populate(objectMap, "timeGrain", d.TimeGrain) + populate(objectMap, "unit", d.Unit) + populate(objectMap, "values", d.Values) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticMetricSet. +func (d *DiagnosticMetricSet) 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 "endTime": + err = unpopulateTimeRFC3339(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) + delete(rawMsg, key) + case "timeGrain": + err = unpopulate(val, "TimeGrain", &d.TimeGrain) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &d.Unit) + delete(rawMsg, key) + case "values": + err = unpopulate(val, "Values", &d.Values) + 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 Dimension. +func (d Dimension) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "displayName", d.DisplayName) + populate(objectMap, "internalName", d.InternalName) + populate(objectMap, "name", d.Name) + populate(objectMap, "toBeExportedForShoebox", d.ToBeExportedForShoebox) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Dimension. +func (d *Dimension) 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 "displayName": + err = unpopulate(val, "DisplayName", &d.DisplayName) + delete(rawMsg, key) + case "internalName": + err = unpopulate(val, "InternalName", &d.InternalName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "toBeExportedForShoebox": + err = unpopulate(val, "ToBeExportedForShoebox", &d.ToBeExportedForShoebox) + 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 Domain. +func (d Domain) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "tags", d.Tags) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Domain. +func (d *Domain) 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 "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + 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 DomainAvailabilityCheckResult. +func (d DomainAvailabilityCheckResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "available", d.Available) + populate(objectMap, "domainType", d.DomainType) + populate(objectMap, "name", d.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainAvailabilityCheckResult. +func (d *DomainAvailabilityCheckResult) 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 "available": + err = unpopulate(val, "Available", &d.Available) + delete(rawMsg, key) + case "domainType": + err = unpopulate(val, "DomainType", &d.DomainType) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + 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 DomainCollection. +func (d DomainCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainCollection. +func (d *DomainCollection) 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 "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + 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 DomainControlCenterSsoRequest. +func (d DomainControlCenterSsoRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "postParameterKey", d.PostParameterKey) + populate(objectMap, "postParameterValue", d.PostParameterValue) + populate(objectMap, "url", d.URL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainControlCenterSsoRequest. +func (d *DomainControlCenterSsoRequest) 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 "postParameterKey": + err = unpopulate(val, "PostParameterKey", &d.PostParameterKey) + delete(rawMsg, key) + case "postParameterValue": + err = unpopulate(val, "PostParameterValue", &d.PostParameterValue) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &d.URL) + 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 DomainOwnershipIdentifier. +func (d DomainOwnershipIdentifier) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainOwnershipIdentifier. +func (d *DomainOwnershipIdentifier) 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 "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + 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 DomainOwnershipIdentifierCollection. +func (d DomainOwnershipIdentifierCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainOwnershipIdentifierCollection. +func (d *DomainOwnershipIdentifierCollection) 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 "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + 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 DomainOwnershipIdentifierProperties. +func (d DomainOwnershipIdentifierProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "ownershipId", d.OwnershipID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainOwnershipIdentifierProperties. +func (d *DomainOwnershipIdentifierProperties) 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 "ownershipId": + err = unpopulate(val, "OwnershipID", &d.OwnershipID) + 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 DomainPatchResource. +func (d DomainPatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainPatchResource. +func (d *DomainPatchResource) 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 "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + 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 DomainPatchResourceProperties. +func (d DomainPatchResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "authCode", d.AuthCode) + populate(objectMap, "autoRenew", d.AutoRenew) + populate(objectMap, "consent", d.Consent) + populate(objectMap, "contactAdmin", d.ContactAdmin) + populate(objectMap, "contactBilling", d.ContactBilling) + populate(objectMap, "contactRegistrant", d.ContactRegistrant) + populate(objectMap, "contactTech", d.ContactTech) + populateTimeRFC3339(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) + populate(objectMap, "managedHostNames", d.ManagedHostNames) + populate(objectMap, "nameServers", d.NameServers) + populate(objectMap, "privacy", d.Privacy) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "readyForDnsRecordManagement", d.ReadyForDNSRecordManagement) + populate(objectMap, "registrationStatus", d.RegistrationStatus) + populate(objectMap, "targetDnsType", d.TargetDNSType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainPatchResourceProperties. +func (d *DomainPatchResourceProperties) 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 "authCode": + err = unpopulate(val, "AuthCode", &d.AuthCode) + delete(rawMsg, key) + case "autoRenew": + err = unpopulate(val, "AutoRenew", &d.AutoRenew) + delete(rawMsg, key) + case "consent": + err = unpopulate(val, "Consent", &d.Consent) + delete(rawMsg, key) + case "contactAdmin": + err = unpopulate(val, "ContactAdmin", &d.ContactAdmin) + delete(rawMsg, key) + case "contactBilling": + err = unpopulate(val, "ContactBilling", &d.ContactBilling) + delete(rawMsg, key) + case "contactRegistrant": + err = unpopulate(val, "ContactRegistrant", &d.ContactRegistrant) + delete(rawMsg, key) + case "contactTech": + err = unpopulate(val, "ContactTech", &d.ContactTech) + delete(rawMsg, key) + case "createdTime": + err = unpopulateTimeRFC3339(val, "CreatedTime", &d.CreatedTime) + delete(rawMsg, key) + case "dnsType": + err = unpopulate(val, "DNSType", &d.DNSType) + delete(rawMsg, key) + case "dnsZoneId": + err = unpopulate(val, "DNSZoneID", &d.DNSZoneID) + delete(rawMsg, key) + case "domainNotRenewableReasons": + err = unpopulate(val, "DomainNotRenewableReasons", &d.DomainNotRenewableReasons) + delete(rawMsg, key) + case "expirationTime": + err = unpopulateTimeRFC3339(val, "ExpirationTime", &d.ExpirationTime) + delete(rawMsg, key) + case "lastRenewedTime": + err = unpopulateTimeRFC3339(val, "LastRenewedTime", &d.LastRenewedTime) + delete(rawMsg, key) + case "managedHostNames": + err = unpopulate(val, "ManagedHostNames", &d.ManagedHostNames) + delete(rawMsg, key) + case "nameServers": + err = unpopulate(val, "NameServers", &d.NameServers) + delete(rawMsg, key) + case "privacy": + err = unpopulate(val, "Privacy", &d.Privacy) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + delete(rawMsg, key) + case "readyForDnsRecordManagement": + err = unpopulate(val, "ReadyForDNSRecordManagement", &d.ReadyForDNSRecordManagement) + delete(rawMsg, key) + case "registrationStatus": + err = unpopulate(val, "RegistrationStatus", &d.RegistrationStatus) + delete(rawMsg, key) + case "targetDnsType": + err = unpopulate(val, "TargetDNSType", &d.TargetDNSType) + 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 DomainProperties. +func (d DomainProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "authCode", d.AuthCode) + populate(objectMap, "autoRenew", d.AutoRenew) + populate(objectMap, "consent", d.Consent) + populate(objectMap, "contactAdmin", d.ContactAdmin) + populate(objectMap, "contactBilling", d.ContactBilling) + populate(objectMap, "contactRegistrant", d.ContactRegistrant) + populate(objectMap, "contactTech", d.ContactTech) + populateTimeRFC3339(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) + populate(objectMap, "managedHostNames", d.ManagedHostNames) + populate(objectMap, "nameServers", d.NameServers) + populate(objectMap, "privacy", d.Privacy) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "readyForDnsRecordManagement", d.ReadyForDNSRecordManagement) + populate(objectMap, "registrationStatus", d.RegistrationStatus) + populate(objectMap, "targetDnsType", d.TargetDNSType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainProperties. +func (d *DomainProperties) 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 "authCode": + err = unpopulate(val, "AuthCode", &d.AuthCode) + delete(rawMsg, key) + case "autoRenew": + err = unpopulate(val, "AutoRenew", &d.AutoRenew) + delete(rawMsg, key) + case "consent": + err = unpopulate(val, "Consent", &d.Consent) + delete(rawMsg, key) + case "contactAdmin": + err = unpopulate(val, "ContactAdmin", &d.ContactAdmin) + delete(rawMsg, key) + case "contactBilling": + err = unpopulate(val, "ContactBilling", &d.ContactBilling) + delete(rawMsg, key) + case "contactRegistrant": + err = unpopulate(val, "ContactRegistrant", &d.ContactRegistrant) + delete(rawMsg, key) + case "contactTech": + err = unpopulate(val, "ContactTech", &d.ContactTech) + delete(rawMsg, key) + case "createdTime": + err = unpopulateTimeRFC3339(val, "CreatedTime", &d.CreatedTime) + delete(rawMsg, key) + case "dnsType": + err = unpopulate(val, "DNSType", &d.DNSType) + delete(rawMsg, key) + case "dnsZoneId": + err = unpopulate(val, "DNSZoneID", &d.DNSZoneID) + delete(rawMsg, key) + case "domainNotRenewableReasons": + err = unpopulate(val, "DomainNotRenewableReasons", &d.DomainNotRenewableReasons) + delete(rawMsg, key) + case "expirationTime": + err = unpopulateTimeRFC3339(val, "ExpirationTime", &d.ExpirationTime) + delete(rawMsg, key) + case "lastRenewedTime": + err = unpopulateTimeRFC3339(val, "LastRenewedTime", &d.LastRenewedTime) + delete(rawMsg, key) + case "managedHostNames": + err = unpopulate(val, "ManagedHostNames", &d.ManagedHostNames) + delete(rawMsg, key) + case "nameServers": + err = unpopulate(val, "NameServers", &d.NameServers) + delete(rawMsg, key) + case "privacy": + err = unpopulate(val, "Privacy", &d.Privacy) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + delete(rawMsg, key) + case "readyForDnsRecordManagement": + err = unpopulate(val, "ReadyForDNSRecordManagement", &d.ReadyForDNSRecordManagement) + delete(rawMsg, key) + case "registrationStatus": + err = unpopulate(val, "RegistrationStatus", &d.RegistrationStatus) + delete(rawMsg, key) + case "targetDnsType": + err = unpopulate(val, "TargetDNSType", &d.TargetDNSType) + 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 DomainPurchaseConsent. +func (d DomainPurchaseConsent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populateTimeRFC3339(objectMap, "agreedAt", d.AgreedAt) + populate(objectMap, "agreedBy", d.AgreedBy) + populate(objectMap, "agreementKeys", d.AgreementKeys) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainPurchaseConsent. +func (d *DomainPurchaseConsent) 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 "agreedAt": + err = unpopulateTimeRFC3339(val, "AgreedAt", &d.AgreedAt) + delete(rawMsg, key) + case "agreedBy": + err = unpopulate(val, "AgreedBy", &d.AgreedBy) + delete(rawMsg, key) + case "agreementKeys": + err = unpopulate(val, "AgreementKeys", &d.AgreementKeys) + 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 DomainRecommendationSearchParameters. +func (d DomainRecommendationSearchParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "keywords", d.Keywords) + populate(objectMap, "maxDomainRecommendations", d.MaxDomainRecommendations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainRecommendationSearchParameters. +func (d *DomainRecommendationSearchParameters) 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 "keywords": + err = unpopulate(val, "Keywords", &d.Keywords) + delete(rawMsg, key) + case "maxDomainRecommendations": + err = unpopulate(val, "MaxDomainRecommendations", &d.MaxDomainRecommendations) + 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 EnabledConfig. +func (e EnabledConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "enabled", e.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnabledConfig. +func (e *EnabledConfig) 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", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &e.Enabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointDependency. +func (e EndpointDependency) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "domainName", e.DomainName) + populate(objectMap, "endpointDetails", e.EndpointDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDependency. +func (e *EndpointDependency) 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", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "domainName": + err = unpopulate(val, "DomainName", &e.DomainName) + delete(rawMsg, key) + case "endpointDetails": + err = unpopulate(val, "EndpointDetails", &e.EndpointDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointDetail. +func (e EndpointDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "ipAddress", e.IPAddress) + populate(objectMap, "isAccessible", e.IsAccessible) + populate(objectMap, "latency", e.Latency) + populate(objectMap, "port", e.Port) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDetail. +func (e *EndpointDetail) 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", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ipAddress": + err = unpopulate(val, "IPAddress", &e.IPAddress) + delete(rawMsg, key) + case "isAccessible": + err = unpopulate(val, "IsAccessible", &e.IsAccessible) + delete(rawMsg, key) + case "latency": + err = unpopulate(val, "Latency", &e.Latency) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &e.Port) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Environment. +func (e Environment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "clusterSettings", e.ClusterSettings) + populate(objectMap, "customDnsSuffixConfiguration", e.CustomDNSSuffixConfiguration) + populate(objectMap, "dnsSuffix", e.DNSSuffix) + populate(objectMap, "dedicatedHostCount", e.DedicatedHostCount) + populate(objectMap, "frontEndScaleFactor", e.FrontEndScaleFactor) + populate(objectMap, "hasLinuxWorkers", e.HasLinuxWorkers) + populate(objectMap, "internalLoadBalancingMode", e.InternalLoadBalancingMode) + populate(objectMap, "ipsslAddressCount", e.IpsslAddressCount) + populate(objectMap, "maximumNumberOfMachines", e.MaximumNumberOfMachines) + populate(objectMap, "multiRoleCount", e.MultiRoleCount) + populate(objectMap, "multiSize", e.MultiSize) + populate(objectMap, "networkingConfiguration", e.NetworkingConfiguration) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "status", e.Status) + populate(objectMap, "suspended", e.Suspended) + populate(objectMap, "upgradeAvailability", e.UpgradeAvailability) + populate(objectMap, "upgradePreference", e.UpgradePreference) + populate(objectMap, "userWhitelistedIpRanges", e.UserWhitelistedIPRanges) + populate(objectMap, "virtualNetwork", e.VirtualNetwork) + populate(objectMap, "zoneRedundant", e.ZoneRedundant) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Environment. +func (e *Environment) 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", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clusterSettings": + err = unpopulate(val, "ClusterSettings", &e.ClusterSettings) + delete(rawMsg, key) + case "customDnsSuffixConfiguration": + err = unpopulate(val, "CustomDNSSuffixConfiguration", &e.CustomDNSSuffixConfiguration) + delete(rawMsg, key) + case "dnsSuffix": + err = unpopulate(val, "DNSSuffix", &e.DNSSuffix) + delete(rawMsg, key) + case "dedicatedHostCount": + err = unpopulate(val, "DedicatedHostCount", &e.DedicatedHostCount) + delete(rawMsg, key) + case "frontEndScaleFactor": + err = unpopulate(val, "FrontEndScaleFactor", &e.FrontEndScaleFactor) + delete(rawMsg, key) + case "hasLinuxWorkers": + err = unpopulate(val, "HasLinuxWorkers", &e.HasLinuxWorkers) + delete(rawMsg, key) + case "internalLoadBalancingMode": + err = unpopulate(val, "InternalLoadBalancingMode", &e.InternalLoadBalancingMode) + delete(rawMsg, key) + case "ipsslAddressCount": + err = unpopulate(val, "IpsslAddressCount", &e.IpsslAddressCount) + delete(rawMsg, key) + case "maximumNumberOfMachines": + err = unpopulate(val, "MaximumNumberOfMachines", &e.MaximumNumberOfMachines) + delete(rawMsg, key) + case "multiRoleCount": + err = unpopulate(val, "MultiRoleCount", &e.MultiRoleCount) + delete(rawMsg, key) + case "multiSize": + err = unpopulate(val, "MultiSize", &e.MultiSize) + delete(rawMsg, key) + case "networkingConfiguration": + err = unpopulate(val, "NetworkingConfiguration", &e.NetworkingConfiguration) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &e.Status) + delete(rawMsg, key) + case "suspended": + err = unpopulate(val, "Suspended", &e.Suspended) + delete(rawMsg, key) + case "upgradeAvailability": + err = unpopulate(val, "UpgradeAvailability", &e.UpgradeAvailability) + delete(rawMsg, key) + case "upgradePreference": + err = unpopulate(val, "UpgradePreference", &e.UpgradePreference) + delete(rawMsg, key) + case "userWhitelistedIpRanges": + err = unpopulate(val, "UserWhitelistedIPRanges", &e.UserWhitelistedIPRanges) + delete(rawMsg, key) + case "virtualNetwork": + err = unpopulate(val, "VirtualNetwork", &e.VirtualNetwork) + delete(rawMsg, key) + case "zoneRedundant": + err = unpopulate(val, "ZoneRedundant", &e.ZoneRedundant) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnvironmentCollection. +func (e EnvironmentCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentCollection. +func (e *EnvironmentCollection) 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", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnvironmentPatchResource. +func (e EnvironmentPatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", e.ID) + populate(objectMap, "kind", e.Kind) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentPatchResource. +func (e *EnvironmentPatchResource) 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", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &e.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnvironmentResource. +func (e EnvironmentResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", e.ID) + populate(objectMap, "kind", e.Kind) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "tags", e.Tags) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentResource. +func (e *EnvironmentResource) 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", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &e.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &e.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &e.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnvironmentVar. +func (e EnvironmentVar) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "name", e.Name) + populate(objectMap, "secretRef", e.SecretRef) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentVar. +func (e *EnvironmentVar) 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", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "secretRef": + err = unpopulate(val, "SecretRef", &e.SecretRef) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorEntity. +func (e ErrorEntity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", e.Code) + populate(objectMap, "details", e.Details) + populate(objectMap, "extendedCode", e.ExtendedCode) + populate(objectMap, "innerErrors", e.InnerErrors) + populate(objectMap, "message", e.Message) + populate(objectMap, "messageTemplate", e.MessageTemplate) + populate(objectMap, "parameters", e.Parameters) + populate(objectMap, "target", e.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorEntity. +func (e *ErrorEntity) 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", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &e.Details) + delete(rawMsg, key) + case "extendedCode": + err = unpopulate(val, "ExtendedCode", &e.ExtendedCode) + delete(rawMsg, key) + case "innerErrors": + err = unpopulate(val, "InnerErrors", &e.InnerErrors) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) + delete(rawMsg, key) + case "messageTemplate": + err = unpopulate(val, "MessageTemplate", &e.MessageTemplate) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &e.Parameters) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &e.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorInfo. +func (e ErrorInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", e.Code) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorInfo. +func (e *ErrorInfo) 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", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorProperties. +func (e ErrorProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", e.Code) + populate(objectMap, "message", e.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorProperties. +func (e *ErrorProperties) 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", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorResponse. +func (e ErrorResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "error", e.Error) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse. +func (e *ErrorResponse) 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", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &e.Error) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Experiments. +func (e Experiments) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "rampUpRules", e.RampUpRules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Experiments. +func (e *Experiments) 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", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "rampUpRules": + err = unpopulate(val, "RampUpRules", &e.RampUpRules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Expression. +func (e Expression) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "error", e.Error) + populate(objectMap, "subexpressions", e.Subexpressions) + populate(objectMap, "text", e.Text) + populate(objectMap, "value", &e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Expression. +func (e *Expression) 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", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &e.Error) + delete(rawMsg, key) + case "subexpressions": + err = unpopulate(val, "Subexpressions", &e.Subexpressions) + delete(rawMsg, key) + case "text": + err = unpopulate(val, "Text", &e.Text) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressionRoot. +func (e ExpressionRoot) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "error", e.Error) + populate(objectMap, "path", e.Path) + populate(objectMap, "subexpressions", e.Subexpressions) + populate(objectMap, "text", e.Text) + populate(objectMap, "value", &e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressionRoot. +func (e *ExpressionRoot) 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", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &e.Error) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &e.Path) + delete(rawMsg, key) + case "subexpressions": + err = unpopulate(val, "Subexpressions", &e.Subexpressions) + delete(rawMsg, key) + case "text": + err = unpopulate(val, "Text", &e.Text) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressionTraces. +func (e ExpressionTraces) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "inputs", e.Inputs) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", &e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressionTraces. +func (e *ExpressionTraces) 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", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "inputs": + err = unpopulate(val, "Inputs", &e.Inputs) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExtendedLocation. +func (e ExtendedLocation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "name", e.Name) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedLocation. +func (e *ExtendedLocation) 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", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Facebook. +func (f Facebook) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "enabled", f.Enabled) + populate(objectMap, "graphApiVersion", f.GraphAPIVersion) + populate(objectMap, "login", f.Login) + populate(objectMap, "registration", f.Registration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Facebook. +func (f *Facebook) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &f.Enabled) + delete(rawMsg, key) + case "graphApiVersion": + err = unpopulate(val, "GraphAPIVersion", &f.GraphAPIVersion) + delete(rawMsg, key) + case "login": + err = unpopulate(val, "Login", &f.Login) + delete(rawMsg, key) + case "registration": + err = unpopulate(val, "Registration", &f.Registration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FileSystemApplicationLogsConfig. +func (f FileSystemApplicationLogsConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "level", f.Level) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FileSystemApplicationLogsConfig. +func (f *FileSystemApplicationLogsConfig) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "level": + err = unpopulate(val, "Level", &f.Level) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FileSystemHTTPLogsConfig. +func (f FileSystemHTTPLogsConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "enabled", f.Enabled) + populate(objectMap, "retentionInDays", f.RetentionInDays) + populate(objectMap, "retentionInMb", f.RetentionInMb) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FileSystemHTTPLogsConfig. +func (f *FileSystemHTTPLogsConfig) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &f.Enabled) + delete(rawMsg, key) + case "retentionInDays": + err = unpopulate(val, "RetentionInDays", &f.RetentionInDays) + delete(rawMsg, key) + case "retentionInMb": + err = unpopulate(val, "RetentionInMb", &f.RetentionInMb) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FileSystemTokenStore. +func (f FileSystemTokenStore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "directory", f.Directory) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FileSystemTokenStore. +func (f *FileSystemTokenStore) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "directory": + err = unpopulate(val, "Directory", &f.Directory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FlowAccessControlConfiguration. +func (f FlowAccessControlConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "actions", f.Actions) + populate(objectMap, "contents", f.Contents) + populate(objectMap, "triggers", f.Triggers) + populate(objectMap, "workflowManagement", f.WorkflowManagement) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FlowAccessControlConfiguration. +func (f *FlowAccessControlConfiguration) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actions": + err = unpopulate(val, "Actions", &f.Actions) + delete(rawMsg, key) + case "contents": + err = unpopulate(val, "Contents", &f.Contents) + delete(rawMsg, key) + case "triggers": + err = unpopulate(val, "Triggers", &f.Triggers) + delete(rawMsg, key) + case "workflowManagement": + err = unpopulate(val, "WorkflowManagement", &f.WorkflowManagement) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FlowAccessControlConfigurationPolicy. +func (f FlowAccessControlConfigurationPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allowedCallerIpAddresses", f.AllowedCallerIPAddresses) + populate(objectMap, "openAuthenticationPolicies", f.OpenAuthenticationPolicies) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FlowAccessControlConfigurationPolicy. +func (f *FlowAccessControlConfigurationPolicy) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedCallerIpAddresses": + err = unpopulate(val, "AllowedCallerIPAddresses", &f.AllowedCallerIPAddresses) + delete(rawMsg, key) + case "openAuthenticationPolicies": + err = unpopulate(val, "OpenAuthenticationPolicies", &f.OpenAuthenticationPolicies) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FlowEndpoints. +func (f FlowEndpoints) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "accessEndpointIpAddresses", f.AccessEndpointIPAddresses) + populate(objectMap, "outgoingIpAddresses", f.OutgoingIPAddresses) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FlowEndpoints. +func (f *FlowEndpoints) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessEndpointIpAddresses": + err = unpopulate(val, "AccessEndpointIPAddresses", &f.AccessEndpointIPAddresses) + delete(rawMsg, key) + case "outgoingIpAddresses": + err = unpopulate(val, "OutgoingIPAddresses", &f.OutgoingIPAddresses) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FlowEndpointsConfiguration. +func (f FlowEndpointsConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "connector", f.Connector) + populate(objectMap, "workflow", f.Workflow) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FlowEndpointsConfiguration. +func (f *FlowEndpointsConfiguration) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connector": + err = unpopulate(val, "Connector", &f.Connector) + delete(rawMsg, key) + case "workflow": + err = unpopulate(val, "Workflow", &f.Workflow) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ForwardProxy. +func (f ForwardProxy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "convention", f.Convention) + populate(objectMap, "customHostHeaderName", f.CustomHostHeaderName) + populate(objectMap, "customProtoHeaderName", f.CustomProtoHeaderName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ForwardProxy. +func (f *ForwardProxy) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "convention": + err = unpopulate(val, "Convention", &f.Convention) + delete(rawMsg, key) + case "customHostHeaderName": + err = unpopulate(val, "CustomHostHeaderName", &f.CustomHostHeaderName) + delete(rawMsg, key) + case "customProtoHeaderName": + err = unpopulate(val, "CustomProtoHeaderName", &f.CustomProtoHeaderName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FrontEndConfiguration. +func (f FrontEndConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "kind", f.Kind) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FrontEndConfiguration. +func (f *FrontEndConfiguration) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "kind": + err = unpopulate(val, "Kind", &f.Kind) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionAppMajorVersion. +func (f FunctionAppMajorVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "displayText", f.DisplayText) + populate(objectMap, "minorVersions", f.MinorVersions) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionAppMajorVersion. +func (f *FunctionAppMajorVersion) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayText": + err = unpopulate(val, "DisplayText", &f.DisplayText) + delete(rawMsg, key) + case "minorVersions": + err = unpopulate(val, "MinorVersions", &f.MinorVersions) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionAppMinorVersion. +func (f FunctionAppMinorVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "displayText", f.DisplayText) + populate(objectMap, "stackSettings", f.StackSettings) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionAppMinorVersion. +func (f *FunctionAppMinorVersion) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayText": + err = unpopulate(val, "DisplayText", &f.DisplayText) + delete(rawMsg, key) + case "stackSettings": + err = unpopulate(val, "StackSettings", &f.StackSettings) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionAppRuntimeSettings. +func (f FunctionAppRuntimeSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "appInsightsSettings", f.AppInsightsSettings) + populate(objectMap, "appSettingsDictionary", f.AppSettingsDictionary) + populateTimeRFC3339(objectMap, "endOfLifeDate", f.EndOfLifeDate) + populate(objectMap, "gitHubActionSettings", f.GitHubActionSettings) + populate(objectMap, "isAutoUpdate", f.IsAutoUpdate) + populate(objectMap, "isDefault", f.IsDefault) + populate(objectMap, "isDeprecated", f.IsDeprecated) + populate(objectMap, "isEarlyAccess", f.IsEarlyAccess) + populate(objectMap, "isHidden", f.IsHidden) + populate(objectMap, "isPreview", f.IsPreview) + populate(objectMap, "remoteDebuggingSupported", f.RemoteDebuggingSupported) + populate(objectMap, "runtimeVersion", f.RuntimeVersion) + populate(objectMap, "siteConfigPropertiesDictionary", f.SiteConfigPropertiesDictionary) + populate(objectMap, "supportedFunctionsExtensionVersions", f.SupportedFunctionsExtensionVersions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionAppRuntimeSettings. +func (f *FunctionAppRuntimeSettings) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appInsightsSettings": + err = unpopulate(val, "AppInsightsSettings", &f.AppInsightsSettings) + delete(rawMsg, key) + case "appSettingsDictionary": + err = unpopulate(val, "AppSettingsDictionary", &f.AppSettingsDictionary) + delete(rawMsg, key) + case "endOfLifeDate": + err = unpopulateTimeRFC3339(val, "EndOfLifeDate", &f.EndOfLifeDate) + delete(rawMsg, key) + case "gitHubActionSettings": + err = unpopulate(val, "GitHubActionSettings", &f.GitHubActionSettings) + delete(rawMsg, key) + case "isAutoUpdate": + err = unpopulate(val, "IsAutoUpdate", &f.IsAutoUpdate) + delete(rawMsg, key) + case "isDefault": + err = unpopulate(val, "IsDefault", &f.IsDefault) + delete(rawMsg, key) + case "isDeprecated": + err = unpopulate(val, "IsDeprecated", &f.IsDeprecated) + delete(rawMsg, key) + case "isEarlyAccess": + err = unpopulate(val, "IsEarlyAccess", &f.IsEarlyAccess) + delete(rawMsg, key) + case "isHidden": + err = unpopulate(val, "IsHidden", &f.IsHidden) + delete(rawMsg, key) + case "isPreview": + err = unpopulate(val, "IsPreview", &f.IsPreview) + delete(rawMsg, key) + case "remoteDebuggingSupported": + err = unpopulate(val, "RemoteDebuggingSupported", &f.RemoteDebuggingSupported) + delete(rawMsg, key) + case "runtimeVersion": + err = unpopulate(val, "RuntimeVersion", &f.RuntimeVersion) + delete(rawMsg, key) + case "siteConfigPropertiesDictionary": + err = unpopulate(val, "SiteConfigPropertiesDictionary", &f.SiteConfigPropertiesDictionary) + delete(rawMsg, key) + case "supportedFunctionsExtensionVersions": + err = unpopulate(val, "SupportedFunctionsExtensionVersions", &f.SupportedFunctionsExtensionVersions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionAppRuntimes. +func (f FunctionAppRuntimes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "linuxRuntimeSettings", f.LinuxRuntimeSettings) + populate(objectMap, "windowsRuntimeSettings", f.WindowsRuntimeSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionAppRuntimes. +func (f *FunctionAppRuntimes) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "linuxRuntimeSettings": + err = unpopulate(val, "LinuxRuntimeSettings", &f.LinuxRuntimeSettings) + delete(rawMsg, key) + case "windowsRuntimeSettings": + err = unpopulate(val, "WindowsRuntimeSettings", &f.WindowsRuntimeSettings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionAppStack. +func (f FunctionAppStack) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", f.ID) + populate(objectMap, "kind", f.Kind) + populate(objectMap, "location", f.Location) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionAppStack. +func (f *FunctionAppStack) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &f.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &f.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionAppStackCollection. +func (f FunctionAppStackCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionAppStackCollection. +func (f *FunctionAppStackCollection) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionAppStackProperties. +func (f FunctionAppStackProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "displayText", f.DisplayText) + populate(objectMap, "majorVersions", f.MajorVersions) + populate(objectMap, "preferredOs", f.PreferredOs) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionAppStackProperties. +func (f *FunctionAppStackProperties) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayText": + err = unpopulate(val, "DisplayText", &f.DisplayText) + delete(rawMsg, key) + case "majorVersions": + err = unpopulate(val, "MajorVersions", &f.MajorVersions) + delete(rawMsg, key) + case "preferredOs": + err = unpopulate(val, "PreferredOs", &f.PreferredOs) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionEnvelope. +func (f FunctionEnvelope) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", f.ID) + populate(objectMap, "kind", f.Kind) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionEnvelope. +func (f *FunctionEnvelope) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &f.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionEnvelopeCollection. +func (f FunctionEnvelopeCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionEnvelopeCollection. +func (f *FunctionEnvelopeCollection) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionEnvelopeProperties. +func (f FunctionEnvelopeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "config", &f.Config) + populate(objectMap, "config_href", f.ConfigHref) + populate(objectMap, "files", f.Files) + populate(objectMap, "function_app_id", f.FunctionAppID) + populate(objectMap, "href", f.Href) + populate(objectMap, "invoke_url_template", f.InvokeURLTemplate) + populate(objectMap, "isDisabled", f.IsDisabled) + populate(objectMap, "language", f.Language) + populate(objectMap, "script_href", f.ScriptHref) + populate(objectMap, "script_root_path_href", f.ScriptRootPathHref) + populate(objectMap, "secrets_file_href", f.SecretsFileHref) + populate(objectMap, "test_data", f.TestData) + populate(objectMap, "test_data_href", f.TestDataHref) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionEnvelopeProperties. +func (f *FunctionEnvelopeProperties) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "config": + err = unpopulate(val, "Config", &f.Config) + delete(rawMsg, key) + case "config_href": + err = unpopulate(val, "ConfigHref", &f.ConfigHref) + delete(rawMsg, key) + case "files": + err = unpopulate(val, "Files", &f.Files) + delete(rawMsg, key) + case "function_app_id": + err = unpopulate(val, "FunctionAppID", &f.FunctionAppID) + delete(rawMsg, key) + case "href": + err = unpopulate(val, "Href", &f.Href) + delete(rawMsg, key) + case "invoke_url_template": + err = unpopulate(val, "InvokeURLTemplate", &f.InvokeURLTemplate) + delete(rawMsg, key) + case "isDisabled": + err = unpopulate(val, "IsDisabled", &f.IsDisabled) + delete(rawMsg, key) + case "language": + err = unpopulate(val, "Language", &f.Language) + delete(rawMsg, key) + case "script_href": + err = unpopulate(val, "ScriptHref", &f.ScriptHref) + delete(rawMsg, key) + case "script_root_path_href": + err = unpopulate(val, "ScriptRootPathHref", &f.ScriptRootPathHref) + delete(rawMsg, key) + case "secrets_file_href": + err = unpopulate(val, "SecretsFileHref", &f.SecretsFileHref) + delete(rawMsg, key) + case "test_data": + err = unpopulate(val, "TestData", &f.TestData) + delete(rawMsg, key) + case "test_data_href": + err = unpopulate(val, "TestDataHref", &f.TestDataHref) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionSecrets. +func (f FunctionSecrets) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "key", f.Key) + populate(objectMap, "trigger_url", f.TriggerURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionSecrets. +func (f *FunctionSecrets) 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", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "key": + err = unpopulate(val, "Key", &f.Key) + delete(rawMsg, key) + case "trigger_url": + err = unpopulate(val, "TriggerURL", &f.TriggerURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GeoRegion. +func (g GeoRegion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", g.ID) + populate(objectMap, "kind", g.Kind) + populate(objectMap, "name", g.Name) + populate(objectMap, "properties", g.Properties) + populate(objectMap, "type", g.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GeoRegion. +func (g *GeoRegion) 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", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &g.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &g.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &g.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &g.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GeoRegionCollection. +func (g GeoRegionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", g.NextLink) + populate(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GeoRegionCollection. +func (g *GeoRegionCollection) 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", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &g.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &g.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GeoRegionProperties. +func (g GeoRegionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", g.Description) + populate(objectMap, "displayName", g.DisplayName) + populate(objectMap, "orgDomain", g.OrgDomain) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GeoRegionProperties. +func (g *GeoRegionProperties) 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", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &g.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &g.DisplayName) + delete(rawMsg, key) + case "orgDomain": + err = unpopulate(val, "OrgDomain", &g.OrgDomain) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GitHub. +func (g GitHub) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "enabled", g.Enabled) + populate(objectMap, "login", g.Login) + populate(objectMap, "registration", g.Registration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GitHub. +func (g *GitHub) 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", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &g.Enabled) + delete(rawMsg, key) + case "login": + err = unpopulate(val, "Login", &g.Login) + delete(rawMsg, key) + case "registration": + err = unpopulate(val, "Registration", &g.Registration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GitHubActionCodeConfiguration. +func (g GitHubActionCodeConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "runtimeStack", g.RuntimeStack) + populate(objectMap, "runtimeVersion", g.RuntimeVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GitHubActionCodeConfiguration. +func (g *GitHubActionCodeConfiguration) 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", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "runtimeStack": + err = unpopulate(val, "RuntimeStack", &g.RuntimeStack) + delete(rawMsg, key) + case "runtimeVersion": + err = unpopulate(val, "RuntimeVersion", &g.RuntimeVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GitHubActionConfiguration. +func (g GitHubActionConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "codeConfiguration", g.CodeConfiguration) + populate(objectMap, "containerConfiguration", g.ContainerConfiguration) + populate(objectMap, "generateWorkflowFile", g.GenerateWorkflowFile) + populate(objectMap, "isLinux", g.IsLinux) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GitHubActionConfiguration. +func (g *GitHubActionConfiguration) 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", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "codeConfiguration": + err = unpopulate(val, "CodeConfiguration", &g.CodeConfiguration) + delete(rawMsg, key) + case "containerConfiguration": + err = unpopulate(val, "ContainerConfiguration", &g.ContainerConfiguration) + delete(rawMsg, key) + case "generateWorkflowFile": + err = unpopulate(val, "GenerateWorkflowFile", &g.GenerateWorkflowFile) + delete(rawMsg, key) + case "isLinux": + err = unpopulate(val, "IsLinux", &g.IsLinux) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GitHubActionContainerConfiguration. +func (g GitHubActionContainerConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "imageName", g.ImageName) + populate(objectMap, "password", g.Password) + populate(objectMap, "serverUrl", g.ServerURL) + populate(objectMap, "username", g.Username) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GitHubActionContainerConfiguration. +func (g *GitHubActionContainerConfiguration) 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", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "imageName": + err = unpopulate(val, "ImageName", &g.ImageName) + delete(rawMsg, key) + case "password": + err = unpopulate(val, "Password", &g.Password) + delete(rawMsg, key) + case "serverUrl": + err = unpopulate(val, "ServerURL", &g.ServerURL) + delete(rawMsg, key) + case "username": + err = unpopulate(val, "Username", &g.Username) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GitHubActionWebAppStackSettings. +func (g GitHubActionWebAppStackSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "isSupported", g.IsSupported) + populate(objectMap, "supportedVersion", g.SupportedVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GitHubActionWebAppStackSettings. +func (g *GitHubActionWebAppStackSettings) 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", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isSupported": + err = unpopulate(val, "IsSupported", &g.IsSupported) + delete(rawMsg, key) + case "supportedVersion": + err = unpopulate(val, "SupportedVersion", &g.SupportedVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GithubToken. +func (g GithubToken) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "accessToken", g.AccessToken) + populate(objectMap, "errorMessage", g.ErrorMessage) + populate(objectMap, "gotToken", g.GotToken) + populate(objectMap, "scope", g.Scope) + populate(objectMap, "tokenType", g.TokenType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GithubToken. +func (g *GithubToken) 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", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessToken": + err = unpopulate(val, "AccessToken", &g.AccessToken) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &g.ErrorMessage) + delete(rawMsg, key) + case "gotToken": + err = unpopulate(val, "GotToken", &g.GotToken) + delete(rawMsg, key) + case "scope": + err = unpopulate(val, "Scope", &g.Scope) + delete(rawMsg, key) + case "tokenType": + err = unpopulate(val, "TokenType", &g.TokenType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GithubTokenRequest. +func (g GithubTokenRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", g.Code) + populate(objectMap, "state", g.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GithubTokenRequest. +func (g *GithubTokenRequest) 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", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &g.Code) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &g.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GlobalCsmSKUDescription. +func (g GlobalCsmSKUDescription) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "capabilities", g.Capabilities) + populate(objectMap, "capacity", g.Capacity) + populate(objectMap, "family", g.Family) + populate(objectMap, "locations", g.Locations) + populate(objectMap, "name", g.Name) + populate(objectMap, "size", g.Size) + populate(objectMap, "tier", g.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GlobalCsmSKUDescription. +func (g *GlobalCsmSKUDescription) 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", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capabilities": + err = unpopulate(val, "Capabilities", &g.Capabilities) + delete(rawMsg, key) + case "capacity": + err = unpopulate(val, "Capacity", &g.Capacity) + delete(rawMsg, key) + case "family": + err = unpopulate(val, "Family", &g.Family) + delete(rawMsg, key) + case "locations": + err = unpopulate(val, "Locations", &g.Locations) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &g.Size) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &g.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GlobalValidation. +func (g GlobalValidation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "excludedPaths", g.ExcludedPaths) + populate(objectMap, "redirectToProvider", g.RedirectToProvider) + populate(objectMap, "requireAuthentication", g.RequireAuthentication) + populate(objectMap, "unauthenticatedClientAction", g.UnauthenticatedClientAction) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GlobalValidation. +func (g *GlobalValidation) 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", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "excludedPaths": + err = unpopulate(val, "ExcludedPaths", &g.ExcludedPaths) + delete(rawMsg, key) + case "redirectToProvider": + err = unpopulate(val, "RedirectToProvider", &g.RedirectToProvider) + delete(rawMsg, key) + case "requireAuthentication": + err = unpopulate(val, "RequireAuthentication", &g.RequireAuthentication) + delete(rawMsg, key) + case "unauthenticatedClientAction": + err = unpopulate(val, "UnauthenticatedClientAction", &g.UnauthenticatedClientAction) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Google. +func (g Google) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "enabled", g.Enabled) + populate(objectMap, "login", g.Login) + populate(objectMap, "registration", g.Registration) + populate(objectMap, "validation", g.Validation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Google. +func (g *Google) 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", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &g.Enabled) + delete(rawMsg, key) + case "login": + err = unpopulate(val, "Login", &g.Login) + delete(rawMsg, key) + case "registration": + err = unpopulate(val, "Registration", &g.Registration) + delete(rawMsg, key) + case "validation": + err = unpopulate(val, "Validation", &g.Validation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HTTPLogsConfig. +func (h HTTPLogsConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "azureBlobStorage", h.AzureBlobStorage) + populate(objectMap, "fileSystem", h.FileSystem) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPLogsConfig. +func (h *HTTPLogsConfig) 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", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureBlobStorage": + err = unpopulate(val, "AzureBlobStorage", &h.AzureBlobStorage) + delete(rawMsg, key) + case "fileSystem": + err = unpopulate(val, "FileSystem", &h.FileSystem) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HTTPScaleRule. +func (h HTTPScaleRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "auth", h.Auth) + populate(objectMap, "metadata", h.Metadata) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPScaleRule. +func (h *HTTPScaleRule) 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", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "auth": + err = unpopulate(val, "Auth", &h.Auth) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &h.Metadata) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HTTPSettings. +func (h HTTPSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "forwardProxy", h.ForwardProxy) + populate(objectMap, "requireHttps", h.RequireHTTPS) + populate(objectMap, "routes", h.Routes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPSettings. +func (h *HTTPSettings) 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", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "forwardProxy": + err = unpopulate(val, "ForwardProxy", &h.ForwardProxy) + delete(rawMsg, key) + case "requireHttps": + err = unpopulate(val, "RequireHTTPS", &h.RequireHTTPS) + delete(rawMsg, key) + case "routes": + err = unpopulate(val, "Routes", &h.Routes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HTTPSettingsRoutes. +func (h HTTPSettingsRoutes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "apiPrefix", h.APIPrefix) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPSettingsRoutes. +func (h *HTTPSettingsRoutes) 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", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiPrefix": + err = unpopulate(val, "APIPrefix", &h.APIPrefix) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HandlerMapping. +func (h HandlerMapping) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "arguments", h.Arguments) + populate(objectMap, "extension", h.Extension) + populate(objectMap, "scriptProcessor", h.ScriptProcessor) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HandlerMapping. +func (h *HandlerMapping) 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", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "arguments": + err = unpopulate(val, "Arguments", &h.Arguments) + delete(rawMsg, key) + case "extension": + err = unpopulate(val, "Extension", &h.Extension) + delete(rawMsg, key) + case "scriptProcessor": + err = unpopulate(val, "ScriptProcessor", &h.ScriptProcessor) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostKeys. +func (h HostKeys) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "functionKeys", h.FunctionKeys) + populate(objectMap, "masterKey", h.MasterKey) + populate(objectMap, "systemKeys", h.SystemKeys) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostKeys. +func (h *HostKeys) 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", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "functionKeys": + err = unpopulate(val, "FunctionKeys", &h.FunctionKeys) + delete(rawMsg, key) + case "masterKey": + err = unpopulate(val, "MasterKey", &h.MasterKey) + delete(rawMsg, key) + case "systemKeys": + err = unpopulate(val, "SystemKeys", &h.SystemKeys) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostName. +func (h HostName) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "azureResourceName", h.AzureResourceName) + populate(objectMap, "azureResourceType", h.AzureResourceType) + populate(objectMap, "customHostNameDnsRecordType", h.CustomHostNameDNSRecordType) + populate(objectMap, "hostNameType", h.HostNameType) + populate(objectMap, "name", h.Name) + populate(objectMap, "siteNames", h.SiteNames) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostName. +func (h *HostName) 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", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureResourceName": + err = unpopulate(val, "AzureResourceName", &h.AzureResourceName) + delete(rawMsg, key) + case "azureResourceType": + err = unpopulate(val, "AzureResourceType", &h.AzureResourceType) + delete(rawMsg, key) + case "customHostNameDnsRecordType": + err = unpopulate(val, "CustomHostNameDNSRecordType", &h.CustomHostNameDNSRecordType) + delete(rawMsg, key) + case "hostNameType": + err = unpopulate(val, "HostNameType", &h.HostNameType) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "siteNames": + err = unpopulate(val, "SiteNames", &h.SiteNames) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostNameBinding. +func (h HostNameBinding) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", h.ID) + populate(objectMap, "kind", h.Kind) + populate(objectMap, "name", h.Name) + populate(objectMap, "properties", h.Properties) + populate(objectMap, "type", h.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostNameBinding. +func (h *HostNameBinding) 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", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &h.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &h.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &h.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &h.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostNameBindingCollection. +func (h HostNameBindingCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", h.NextLink) + populate(objectMap, "value", h.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostNameBindingCollection. +func (h *HostNameBindingCollection) 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", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &h.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &h.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostNameBindingProperties. +func (h HostNameBindingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "azureResourceName", h.AzureResourceName) + populate(objectMap, "azureResourceType", h.AzureResourceType) + populate(objectMap, "customHostNameDnsRecordType", h.CustomHostNameDNSRecordType) + populate(objectMap, "domainId", h.DomainID) + populate(objectMap, "hostNameType", h.HostNameType) + populate(objectMap, "sslState", h.SSLState) + populate(objectMap, "siteName", h.SiteName) + populate(objectMap, "thumbprint", h.Thumbprint) + populate(objectMap, "virtualIP", h.VirtualIP) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostNameBindingProperties. +func (h *HostNameBindingProperties) 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", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureResourceName": + err = unpopulate(val, "AzureResourceName", &h.AzureResourceName) + delete(rawMsg, key) + case "azureResourceType": + err = unpopulate(val, "AzureResourceType", &h.AzureResourceType) + delete(rawMsg, key) + case "customHostNameDnsRecordType": + err = unpopulate(val, "CustomHostNameDNSRecordType", &h.CustomHostNameDNSRecordType) + delete(rawMsg, key) + case "domainId": + err = unpopulate(val, "DomainID", &h.DomainID) + delete(rawMsg, key) + case "hostNameType": + err = unpopulate(val, "HostNameType", &h.HostNameType) + delete(rawMsg, key) + case "sslState": + err = unpopulate(val, "SSLState", &h.SSLState) + delete(rawMsg, key) + case "siteName": + err = unpopulate(val, "SiteName", &h.SiteName) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &h.Thumbprint) + delete(rawMsg, key) + case "virtualIP": + err = unpopulate(val, "VirtualIP", &h.VirtualIP) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostNameSSLState. +func (h HostNameSSLState) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "hostType", h.HostType) + populate(objectMap, "name", h.Name) + populate(objectMap, "sslState", h.SSLState) + populate(objectMap, "thumbprint", h.Thumbprint) + populate(objectMap, "toUpdate", h.ToUpdate) + populate(objectMap, "virtualIP", h.VirtualIP) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostNameSSLState. +func (h *HostNameSSLState) 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", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hostType": + err = unpopulate(val, "HostType", &h.HostType) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "sslState": + err = unpopulate(val, "SSLState", &h.SSLState) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &h.Thumbprint) + delete(rawMsg, key) + case "toUpdate": + err = unpopulate(val, "ToUpdate", &h.ToUpdate) + delete(rawMsg, key) + case "virtualIP": + err = unpopulate(val, "VirtualIP", &h.VirtualIP) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostingEnvironmentDeploymentInfo. +func (h HostingEnvironmentDeploymentInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "location", h.Location) + populate(objectMap, "name", h.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostingEnvironmentDeploymentInfo. +func (h *HostingEnvironmentDeploymentInfo) 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", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "location": + err = unpopulate(val, "Location", &h.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostingEnvironmentDiagnostics. +func (h HostingEnvironmentDiagnostics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "diagnosticsOutput", h.DiagnosticsOutput) + populate(objectMap, "name", h.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostingEnvironmentDiagnostics. +func (h *HostingEnvironmentDiagnostics) 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", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diagnosticsOutput": + err = unpopulate(val, "DiagnosticsOutput", &h.DiagnosticsOutput) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostingEnvironmentProfile. +func (h HostingEnvironmentProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", h.ID) + populate(objectMap, "name", h.Name) + populate(objectMap, "type", h.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostingEnvironmentProfile. +func (h *HostingEnvironmentProfile) 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", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &h.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &h.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HybridConnection. +func (h HybridConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", h.ID) + populate(objectMap, "kind", h.Kind) + populate(objectMap, "name", h.Name) + populate(objectMap, "properties", h.Properties) + populate(objectMap, "type", h.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HybridConnection. +func (h *HybridConnection) 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", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &h.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &h.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &h.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &h.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HybridConnectionCollection. +func (h HybridConnectionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", h.NextLink) + populate(objectMap, "value", h.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HybridConnectionCollection. +func (h *HybridConnectionCollection) 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", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &h.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &h.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HybridConnectionKey. +func (h HybridConnectionKey) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", h.ID) + populate(objectMap, "kind", h.Kind) + populate(objectMap, "name", h.Name) + populate(objectMap, "properties", h.Properties) + populate(objectMap, "type", h.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HybridConnectionKey. +func (h *HybridConnectionKey) 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", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &h.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &h.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &h.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &h.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HybridConnectionKeyProperties. +func (h HybridConnectionKeyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "sendKeyName", h.SendKeyName) + populate(objectMap, "sendKeyValue", h.SendKeyValue) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HybridConnectionKeyProperties. +func (h *HybridConnectionKeyProperties) 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", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sendKeyName": + err = unpopulate(val, "SendKeyName", &h.SendKeyName) + delete(rawMsg, key) + case "sendKeyValue": + err = unpopulate(val, "SendKeyValue", &h.SendKeyValue) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HybridConnectionLimits. +func (h HybridConnectionLimits) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", h.ID) + populate(objectMap, "kind", h.Kind) + populate(objectMap, "name", h.Name) + populate(objectMap, "properties", h.Properties) + populate(objectMap, "type", h.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HybridConnectionLimits. +func (h *HybridConnectionLimits) 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", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &h.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &h.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &h.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &h.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HybridConnectionLimitsProperties. +func (h HybridConnectionLimitsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "current", h.Current) + populate(objectMap, "maximum", h.Maximum) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HybridConnectionLimitsProperties. +func (h *HybridConnectionLimitsProperties) 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", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "current": + err = unpopulate(val, "Current", &h.Current) + delete(rawMsg, key) + case "maximum": + err = unpopulate(val, "Maximum", &h.Maximum) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HybridConnectionProperties. +func (h HybridConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "hostname", h.Hostname) + populate(objectMap, "port", h.Port) + populate(objectMap, "relayArmUri", h.RelayArmURI) + populate(objectMap, "relayName", h.RelayName) + populate(objectMap, "sendKeyName", h.SendKeyName) + populate(objectMap, "sendKeyValue", h.SendKeyValue) + populate(objectMap, "serviceBusNamespace", h.ServiceBusNamespace) + populate(objectMap, "serviceBusSuffix", h.ServiceBusSuffix) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HybridConnectionProperties. +func (h *HybridConnectionProperties) 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", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hostname": + err = unpopulate(val, "Hostname", &h.Hostname) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &h.Port) + delete(rawMsg, key) + case "relayArmUri": + err = unpopulate(val, "RelayArmURI", &h.RelayArmURI) + delete(rawMsg, key) + case "relayName": + err = unpopulate(val, "RelayName", &h.RelayName) + delete(rawMsg, key) + case "sendKeyName": + err = unpopulate(val, "SendKeyName", &h.SendKeyName) + delete(rawMsg, key) + case "sendKeyValue": + err = unpopulate(val, "SendKeyValue", &h.SendKeyValue) + delete(rawMsg, key) + case "serviceBusNamespace": + err = unpopulate(val, "ServiceBusNamespace", &h.ServiceBusNamespace) + delete(rawMsg, key) + case "serviceBusSuffix": + err = unpopulate(val, "ServiceBusSuffix", &h.ServiceBusSuffix) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPAddress. +func (i IPAddress) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "address", i.Address) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPAddress. +func (i *IPAddress) 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", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "address": + err = unpopulate(val, "Address", &i.Address) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPAddressRange. +func (i IPAddressRange) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "addressRange", i.AddressRange) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPAddressRange. +func (i *IPAddressRange) 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", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressRange": + err = unpopulate(val, "AddressRange", &i.AddressRange) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPSecurityRestriction. +func (i IPSecurityRestriction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "action", i.Action) + populate(objectMap, "description", i.Description) + populate(objectMap, "headers", i.Headers) + populate(objectMap, "ipAddress", i.IPAddress) + populate(objectMap, "name", i.Name) + populate(objectMap, "priority", i.Priority) + populate(objectMap, "subnetMask", i.SubnetMask) + populate(objectMap, "subnetTrafficTag", i.SubnetTrafficTag) + populate(objectMap, "tag", i.Tag) + populate(objectMap, "vnetSubnetResourceId", i.VnetSubnetResourceID) + populate(objectMap, "vnetTrafficTag", i.VnetTrafficTag) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPSecurityRestriction. +func (i *IPSecurityRestriction) 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", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, "Action", &i.Action) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &i.Description) + delete(rawMsg, key) + case "headers": + err = unpopulate(val, "Headers", &i.Headers) + delete(rawMsg, key) + case "ipAddress": + err = unpopulate(val, "IPAddress", &i.IPAddress) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &i.Priority) + delete(rawMsg, key) + case "subnetMask": + err = unpopulate(val, "SubnetMask", &i.SubnetMask) + delete(rawMsg, key) + case "subnetTrafficTag": + err = unpopulate(val, "SubnetTrafficTag", &i.SubnetTrafficTag) + delete(rawMsg, key) + case "tag": + err = unpopulate(val, "Tag", &i.Tag) + delete(rawMsg, key) + case "vnetSubnetResourceId": + err = unpopulate(val, "VnetSubnetResourceID", &i.VnetSubnetResourceID) + delete(rawMsg, key) + case "vnetTrafficTag": + err = unpopulate(val, "VnetTrafficTag", &i.VnetTrafficTag) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Identifier. +func (i Identifier) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", i.ID) + populate(objectMap, "kind", i.Kind) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Identifier. +func (i *Identifier) 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", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &i.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentifierCollection. +func (i IdentifierCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentifierCollection. +func (i *IdentifierCollection) 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", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentifierProperties. +func (i IdentifierProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentifierProperties. +func (i *IdentifierProperties) 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", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentityProviders. +func (i IdentityProviders) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "apple", i.Apple) + populate(objectMap, "azureActiveDirectory", i.AzureActiveDirectory) + populate(objectMap, "azureStaticWebApps", i.AzureStaticWebApps) + populate(objectMap, "customOpenIdConnectProviders", i.CustomOpenIDConnectProviders) + populate(objectMap, "facebook", i.Facebook) + populate(objectMap, "gitHub", i.GitHub) + populate(objectMap, "google", i.Google) + populate(objectMap, "legacyMicrosoftAccount", i.LegacyMicrosoftAccount) + populate(objectMap, "twitter", i.Twitter) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviders. +func (i *IdentityProviders) 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", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apple": + err = unpopulate(val, "Apple", &i.Apple) + delete(rawMsg, key) + case "azureActiveDirectory": + err = unpopulate(val, "AzureActiveDirectory", &i.AzureActiveDirectory) + delete(rawMsg, key) + case "azureStaticWebApps": + err = unpopulate(val, "AzureStaticWebApps", &i.AzureStaticWebApps) + delete(rawMsg, key) + case "customOpenIdConnectProviders": + err = unpopulate(val, "CustomOpenIDConnectProviders", &i.CustomOpenIDConnectProviders) + delete(rawMsg, key) + case "facebook": + err = unpopulate(val, "Facebook", &i.Facebook) + delete(rawMsg, key) + case "gitHub": + err = unpopulate(val, "GitHub", &i.GitHub) + delete(rawMsg, key) + case "google": + err = unpopulate(val, "Google", &i.Google) + delete(rawMsg, key) + case "legacyMicrosoftAccount": + err = unpopulate(val, "LegacyMicrosoftAccount", &i.LegacyMicrosoftAccount) + delete(rawMsg, key) + case "twitter": + err = unpopulate(val, "Twitter", &i.Twitter) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InboundEnvironmentEndpoint. +func (i InboundEnvironmentEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", i.Description) + populate(objectMap, "endpoints", i.Endpoints) + populate(objectMap, "ports", i.Ports) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InboundEnvironmentEndpoint. +func (i *InboundEnvironmentEndpoint) 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", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &i.Description) + delete(rawMsg, key) + case "endpoints": + err = unpopulate(val, "Endpoints", &i.Endpoints) + delete(rawMsg, key) + case "ports": + err = unpopulate(val, "Ports", &i.Ports) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InboundEnvironmentEndpointCollection. +func (i InboundEnvironmentEndpointCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InboundEnvironmentEndpointCollection. +func (i *InboundEnvironmentEndpointCollection) 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", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Ingress. +func (i Ingress) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allowInsecure", i.AllowInsecure) + populate(objectMap, "external", i.External) + populate(objectMap, "fqdn", i.Fqdn) + populate(objectMap, "targetPort", i.TargetPort) + populate(objectMap, "traffic", i.Traffic) + populate(objectMap, "transport", i.Transport) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Ingress. +func (i *Ingress) 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", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowInsecure": + err = unpopulate(val, "AllowInsecure", &i.AllowInsecure) + delete(rawMsg, key) + case "external": + err = unpopulate(val, "External", &i.External) + delete(rawMsg, key) + case "fqdn": + err = unpopulate(val, "Fqdn", &i.Fqdn) + delete(rawMsg, key) + case "targetPort": + err = unpopulate(val, "TargetPort", &i.TargetPort) + delete(rawMsg, key) + case "traffic": + err = unpopulate(val, "Traffic", &i.Traffic) + delete(rawMsg, key) + case "transport": + err = unpopulate(val, "Transport", &i.Transport) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JSONSchema. +func (j JSONSchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "content", j.Content) + populate(objectMap, "title", j.Title) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JSONSchema. +func (j *JSONSchema) 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", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "content": + err = unpopulate(val, "Content", &j.Content) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &j.Title) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JwtClaimChecks. +func (j JwtClaimChecks) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allowedClientApplications", j.AllowedClientApplications) + populate(objectMap, "allowedGroups", j.AllowedGroups) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JwtClaimChecks. +func (j *JwtClaimChecks) 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", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedClientApplications": + err = unpopulate(val, "AllowedClientApplications", &j.AllowedClientApplications) + delete(rawMsg, key) + case "allowedGroups": + err = unpopulate(val, "AllowedGroups", &j.AllowedGroups) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyInfo. +func (k KeyInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "name", k.Name) + populate(objectMap, "value", k.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyInfo. +func (k *KeyInfo) 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", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &k.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &k.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyValuePairStringObject. +func (k KeyValuePairStringObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "key", k.Key) + populate(objectMap, "value", &k.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyValuePairStringObject. +func (k *KeyValuePairStringObject) 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", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "key": + err = unpopulate(val, "Key", &k.Key) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &k.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubeEnvironment. +func (k KubeEnvironment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "extendedLocation", k.ExtendedLocation) + populate(objectMap, "id", k.ID) + populate(objectMap, "kind", k.Kind) + populate(objectMap, "location", k.Location) + populate(objectMap, "name", k.Name) + populate(objectMap, "properties", k.Properties) + populate(objectMap, "tags", k.Tags) + populate(objectMap, "type", k.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubeEnvironment. +func (k *KubeEnvironment) 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", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &k.ExtendedLocation) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &k.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &k.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &k.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &k.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &k.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &k.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &k.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubeEnvironmentCollection. +func (k KubeEnvironmentCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", k.NextLink) + populate(objectMap, "value", k.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubeEnvironmentCollection. +func (k *KubeEnvironmentCollection) 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", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &k.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &k.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubeEnvironmentPatchResource. +func (k KubeEnvironmentPatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", k.ID) + populate(objectMap, "kind", k.Kind) + populate(objectMap, "name", k.Name) + populate(objectMap, "properties", k.Properties) + populate(objectMap, "type", k.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubeEnvironmentPatchResource. +func (k *KubeEnvironmentPatchResource) 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", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &k.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &k.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &k.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &k.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &k.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubeEnvironmentPatchResourceProperties. +func (k KubeEnvironmentPatchResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "aksResourceID", k.AksResourceID) + populate(objectMap, "appLogsConfiguration", k.AppLogsConfiguration) + populate(objectMap, "arcConfiguration", k.ArcConfiguration) + populate(objectMap, "containerAppsConfiguration", k.ContainerAppsConfiguration) + populate(objectMap, "defaultDomain", k.DefaultDomain) + populate(objectMap, "deploymentErrors", k.DeploymentErrors) + populate(objectMap, "internalLoadBalancerEnabled", k.InternalLoadBalancerEnabled) + populate(objectMap, "provisioningState", k.ProvisioningState) + populate(objectMap, "staticIp", k.StaticIP) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubeEnvironmentPatchResourceProperties. +func (k *KubeEnvironmentPatchResourceProperties) 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", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aksResourceID": + err = unpopulate(val, "AksResourceID", &k.AksResourceID) + delete(rawMsg, key) + case "appLogsConfiguration": + err = unpopulate(val, "AppLogsConfiguration", &k.AppLogsConfiguration) + delete(rawMsg, key) + case "arcConfiguration": + err = unpopulate(val, "ArcConfiguration", &k.ArcConfiguration) + delete(rawMsg, key) + case "containerAppsConfiguration": + err = unpopulate(val, "ContainerAppsConfiguration", &k.ContainerAppsConfiguration) + delete(rawMsg, key) + case "defaultDomain": + err = unpopulate(val, "DefaultDomain", &k.DefaultDomain) + delete(rawMsg, key) + case "deploymentErrors": + err = unpopulate(val, "DeploymentErrors", &k.DeploymentErrors) + delete(rawMsg, key) + case "internalLoadBalancerEnabled": + err = unpopulate(val, "InternalLoadBalancerEnabled", &k.InternalLoadBalancerEnabled) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &k.ProvisioningState) + delete(rawMsg, key) + case "staticIp": + err = unpopulate(val, "StaticIP", &k.StaticIP) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubeEnvironmentProfile. +func (k KubeEnvironmentProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", k.ID) + populate(objectMap, "name", k.Name) + populate(objectMap, "type", k.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubeEnvironmentProfile. +func (k *KubeEnvironmentProfile) 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", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &k.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &k.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &k.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubeEnvironmentProperties. +func (k KubeEnvironmentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "aksResourceID", k.AksResourceID) + populate(objectMap, "appLogsConfiguration", k.AppLogsConfiguration) + populate(objectMap, "arcConfiguration", k.ArcConfiguration) + populate(objectMap, "containerAppsConfiguration", k.ContainerAppsConfiguration) + populate(objectMap, "defaultDomain", k.DefaultDomain) + populate(objectMap, "deploymentErrors", k.DeploymentErrors) + populate(objectMap, "environmentType", k.EnvironmentType) + populate(objectMap, "internalLoadBalancerEnabled", k.InternalLoadBalancerEnabled) + populate(objectMap, "provisioningState", k.ProvisioningState) + populate(objectMap, "staticIp", k.StaticIP) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubeEnvironmentProperties. +func (k *KubeEnvironmentProperties) 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", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aksResourceID": + err = unpopulate(val, "AksResourceID", &k.AksResourceID) + delete(rawMsg, key) + case "appLogsConfiguration": + err = unpopulate(val, "AppLogsConfiguration", &k.AppLogsConfiguration) + delete(rawMsg, key) + case "arcConfiguration": + err = unpopulate(val, "ArcConfiguration", &k.ArcConfiguration) + delete(rawMsg, key) + case "containerAppsConfiguration": + err = unpopulate(val, "ContainerAppsConfiguration", &k.ContainerAppsConfiguration) + delete(rawMsg, key) + case "defaultDomain": + err = unpopulate(val, "DefaultDomain", &k.DefaultDomain) + delete(rawMsg, key) + case "deploymentErrors": + err = unpopulate(val, "DeploymentErrors", &k.DeploymentErrors) + delete(rawMsg, key) + case "environmentType": + err = unpopulate(val, "EnvironmentType", &k.EnvironmentType) + delete(rawMsg, key) + case "internalLoadBalancerEnabled": + err = unpopulate(val, "InternalLoadBalancerEnabled", &k.InternalLoadBalancerEnabled) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &k.ProvisioningState) + delete(rawMsg, key) + case "staticIp": + err = unpopulate(val, "StaticIP", &k.StaticIP) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LegacyMicrosoftAccount. +func (l LegacyMicrosoftAccount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "enabled", l.Enabled) + populate(objectMap, "login", l.Login) + populate(objectMap, "registration", l.Registration) + populate(objectMap, "validation", l.Validation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LegacyMicrosoftAccount. +func (l *LegacyMicrosoftAccount) 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", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &l.Enabled) + delete(rawMsg, key) + case "login": + err = unpopulate(val, "Login", &l.Login) + delete(rawMsg, key) + case "registration": + err = unpopulate(val, "Registration", &l.Registration) + delete(rawMsg, key) + case "validation": + err = unpopulate(val, "Validation", &l.Validation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LinuxJavaContainerSettings. +func (l LinuxJavaContainerSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populateTimeRFC3339(objectMap, "endOfLifeDate", l.EndOfLifeDate) + populate(objectMap, "isAutoUpdate", l.IsAutoUpdate) + populate(objectMap, "isDeprecated", l.IsDeprecated) + populate(objectMap, "isEarlyAccess", l.IsEarlyAccess) + populate(objectMap, "isHidden", l.IsHidden) + populate(objectMap, "isPreview", l.IsPreview) + populate(objectMap, "java11Runtime", l.Java11Runtime) + populate(objectMap, "java8Runtime", l.Java8Runtime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LinuxJavaContainerSettings. +func (l *LinuxJavaContainerSettings) 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", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endOfLifeDate": + err = unpopulateTimeRFC3339(val, "EndOfLifeDate", &l.EndOfLifeDate) + delete(rawMsg, key) + case "isAutoUpdate": + err = unpopulate(val, "IsAutoUpdate", &l.IsAutoUpdate) + delete(rawMsg, key) + case "isDeprecated": + err = unpopulate(val, "IsDeprecated", &l.IsDeprecated) + delete(rawMsg, key) + case "isEarlyAccess": + err = unpopulate(val, "IsEarlyAccess", &l.IsEarlyAccess) + delete(rawMsg, key) + case "isHidden": + err = unpopulate(val, "IsHidden", &l.IsHidden) + delete(rawMsg, key) + case "isPreview": + err = unpopulate(val, "IsPreview", &l.IsPreview) + delete(rawMsg, key) + case "java11Runtime": + err = unpopulate(val, "Java11Runtime", &l.Java11Runtime) + delete(rawMsg, key) + case "java8Runtime": + err = unpopulate(val, "Java8Runtime", &l.Java8Runtime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LocalizableString. +func (l LocalizableString) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "localizedValue", l.LocalizedValue) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizableString. +func (l *LocalizableString) 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", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "localizedValue": + err = unpopulate(val, "LocalizedValue", &l.LocalizedValue) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogAnalyticsConfiguration. +func (l LogAnalyticsConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "customerId", l.CustomerID) + populate(objectMap, "sharedKey", l.SharedKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogAnalyticsConfiguration. +func (l *LogAnalyticsConfiguration) 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", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customerId": + err = unpopulate(val, "CustomerID", &l.CustomerID) + delete(rawMsg, key) + case "sharedKey": + err = unpopulate(val, "SharedKey", &l.SharedKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogSpecification. +func (l LogSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "blobDuration", l.BlobDuration) + populate(objectMap, "displayName", l.DisplayName) + populate(objectMap, "logFilterPattern", l.LogFilterPattern) + populate(objectMap, "name", l.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification. +func (l *LogSpecification) 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", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobDuration": + err = unpopulate(val, "BlobDuration", &l.BlobDuration) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &l.DisplayName) + delete(rawMsg, key) + case "logFilterPattern": + err = unpopulate(val, "LogFilterPattern", &l.LogFilterPattern) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Login. +func (l Login) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allowedExternalRedirectUrls", l.AllowedExternalRedirectUrls) + populate(objectMap, "cookieExpiration", l.CookieExpiration) + populate(objectMap, "nonce", l.Nonce) + populate(objectMap, "preserveUrlFragmentsForLogins", l.PreserveURLFragmentsForLogins) + populate(objectMap, "routes", l.Routes) + populate(objectMap, "tokenStore", l.TokenStore) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Login. +func (l *Login) 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", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedExternalRedirectUrls": + err = unpopulate(val, "AllowedExternalRedirectUrls", &l.AllowedExternalRedirectUrls) + delete(rawMsg, key) + case "cookieExpiration": + err = unpopulate(val, "CookieExpiration", &l.CookieExpiration) + delete(rawMsg, key) + case "nonce": + err = unpopulate(val, "Nonce", &l.Nonce) + delete(rawMsg, key) + case "preserveUrlFragmentsForLogins": + err = unpopulate(val, "PreserveURLFragmentsForLogins", &l.PreserveURLFragmentsForLogins) + delete(rawMsg, key) + case "routes": + err = unpopulate(val, "Routes", &l.Routes) + delete(rawMsg, key) + case "tokenStore": + err = unpopulate(val, "TokenStore", &l.TokenStore) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoginRoutes. +func (l LoginRoutes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "logoutEndpoint", l.LogoutEndpoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoginRoutes. +func (l *LoginRoutes) 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", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logoutEndpoint": + err = unpopulate(val, "LogoutEndpoint", &l.LogoutEndpoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoginScopes. +func (l LoginScopes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "scopes", l.Scopes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoginScopes. +func (l *LoginScopes) 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", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "scopes": + err = unpopulate(val, "Scopes", &l.Scopes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MSDeploy. +func (m MSDeploy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", m.ID) + populate(objectMap, "kind", m.Kind) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MSDeploy. +func (m *MSDeploy) 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", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &m.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MSDeployCore. +func (m MSDeployCore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "appOffline", m.AppOffline) + populate(objectMap, "connectionString", m.ConnectionString) + populate(objectMap, "dbType", m.DbType) + populate(objectMap, "packageUri", m.PackageURI) + populate(objectMap, "setParameters", m.SetParameters) + populate(objectMap, "setParametersXmlFileUri", m.SetParametersXMLFileURI) + populate(objectMap, "skipAppData", m.SkipAppData) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MSDeployCore. +func (m *MSDeployCore) 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", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appOffline": + err = unpopulate(val, "AppOffline", &m.AppOffline) + delete(rawMsg, key) + case "connectionString": + err = unpopulate(val, "ConnectionString", &m.ConnectionString) + delete(rawMsg, key) + case "dbType": + err = unpopulate(val, "DbType", &m.DbType) + delete(rawMsg, key) + case "packageUri": + err = unpopulate(val, "PackageURI", &m.PackageURI) + delete(rawMsg, key) + case "setParameters": + err = unpopulate(val, "SetParameters", &m.SetParameters) + delete(rawMsg, key) + case "setParametersXmlFileUri": + err = unpopulate(val, "SetParametersXMLFileURI", &m.SetParametersXMLFileURI) + delete(rawMsg, key) + case "skipAppData": + err = unpopulate(val, "SkipAppData", &m.SkipAppData) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MSDeployLog. +func (m MSDeployLog) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", m.ID) + populate(objectMap, "kind", m.Kind) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MSDeployLog. +func (m *MSDeployLog) 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", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &m.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MSDeployLogEntry. +func (m MSDeployLogEntry) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "message", m.Message) + populateTimeRFC3339(objectMap, "time", m.Time) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MSDeployLogEntry. +func (m *MSDeployLogEntry) 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", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "message": + err = unpopulate(val, "Message", &m.Message) + delete(rawMsg, key) + case "time": + err = unpopulateTimeRFC3339(val, "Time", &m.Time) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MSDeployLogProperties. +func (m MSDeployLogProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "entries", m.Entries) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MSDeployLogProperties. +func (m *MSDeployLogProperties) 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", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "entries": + err = unpopulate(val, "Entries", &m.Entries) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MSDeployStatus. +func (m MSDeployStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", m.ID) + populate(objectMap, "kind", m.Kind) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MSDeployStatus. +func (m *MSDeployStatus) 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", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &m.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MSDeployStatusProperties. +func (m MSDeployStatusProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "complete", m.Complete) + populate(objectMap, "deployer", m.Deployer) + populateTimeRFC3339(objectMap, "endTime", m.EndTime) + populate(objectMap, "provisioningState", m.ProvisioningState) + populateTimeRFC3339(objectMap, "startTime", m.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MSDeployStatusProperties. +func (m *MSDeployStatusProperties) 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", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "complete": + err = unpopulate(val, "Complete", &m.Complete) + delete(rawMsg, key) + case "deployer": + err = unpopulate(val, "Deployer", &m.Deployer) + delete(rawMsg, key) + case "endTime": + err = unpopulateTimeRFC3339(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) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. +func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "principalId", m.PrincipalID) + populate(objectMap, "tenantId", m.TenantID) + populate(objectMap, "type", m.Type) + populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity. +func (m *ManagedServiceIdentity) 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", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &m.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &m.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricAvailability. +func (m MetricAvailability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "blobDuration", m.BlobDuration) + populate(objectMap, "timeGrain", m.TimeGrain) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricAvailability. +func (m *MetricAvailability) 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", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobDuration": + err = unpopulate(val, "BlobDuration", &m.BlobDuration) + delete(rawMsg, key) + case "timeGrain": + err = unpopulate(val, "TimeGrain", &m.TimeGrain) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricSpecification. +func (m MetricSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "aggregationType", m.AggregationType) + populate(objectMap, "availabilities", m.Availabilities) + populate(objectMap, "category", m.Category) + populate(objectMap, "dimensions", m.Dimensions) + populate(objectMap, "displayDescription", m.DisplayDescription) + populate(objectMap, "displayName", m.DisplayName) + populate(objectMap, "enableRegionalMdmAccount", m.EnableRegionalMdmAccount) + populate(objectMap, "fillGapWithZero", m.FillGapWithZero) + populate(objectMap, "isInternal", m.IsInternal) + populate(objectMap, "metricFilterPattern", m.MetricFilterPattern) + populate(objectMap, "name", m.Name) + populate(objectMap, "sourceMdmAccount", m.SourceMdmAccount) + populate(objectMap, "sourceMdmNamespace", m.SourceMdmNamespace) + populate(objectMap, "supportedAggregationTypes", m.SupportedAggregationTypes) + populate(objectMap, "supportedTimeGrainTypes", m.SupportedTimeGrainTypes) + populate(objectMap, "supportsInstanceLevelAggregation", m.SupportsInstanceLevelAggregation) + populate(objectMap, "unit", m.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification. +func (m *MetricSpecification) 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", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aggregationType": + err = unpopulate(val, "AggregationType", &m.AggregationType) + delete(rawMsg, key) + case "availabilities": + err = unpopulate(val, "Availabilities", &m.Availabilities) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &m.Category) + delete(rawMsg, key) + case "dimensions": + err = unpopulate(val, "Dimensions", &m.Dimensions) + delete(rawMsg, key) + case "displayDescription": + err = unpopulate(val, "DisplayDescription", &m.DisplayDescription) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &m.DisplayName) + delete(rawMsg, key) + case "enableRegionalMdmAccount": + err = unpopulate(val, "EnableRegionalMdmAccount", &m.EnableRegionalMdmAccount) + delete(rawMsg, key) + case "fillGapWithZero": + err = unpopulate(val, "FillGapWithZero", &m.FillGapWithZero) + delete(rawMsg, key) + case "isInternal": + err = unpopulate(val, "IsInternal", &m.IsInternal) + delete(rawMsg, key) + case "metricFilterPattern": + err = unpopulate(val, "MetricFilterPattern", &m.MetricFilterPattern) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "sourceMdmAccount": + err = unpopulate(val, "SourceMdmAccount", &m.SourceMdmAccount) + delete(rawMsg, key) + case "sourceMdmNamespace": + err = unpopulate(val, "SourceMdmNamespace", &m.SourceMdmNamespace) + delete(rawMsg, key) + case "supportedAggregationTypes": + err = unpopulate(val, "SupportedAggregationTypes", &m.SupportedAggregationTypes) + delete(rawMsg, key) + case "supportedTimeGrainTypes": + err = unpopulate(val, "SupportedTimeGrainTypes", &m.SupportedTimeGrainTypes) + delete(rawMsg, key) + case "supportsInstanceLevelAggregation": + err = unpopulate(val, "SupportsInstanceLevelAggregation", &m.SupportsInstanceLevelAggregation) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &m.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrateMySQLRequest. +func (m MigrateMySQLRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", m.ID) + populate(objectMap, "kind", m.Kind) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrateMySQLRequest. +func (m *MigrateMySQLRequest) 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", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &m.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrateMySQLRequestProperties. +func (m MigrateMySQLRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "connectionString", m.ConnectionString) + populate(objectMap, "migrationType", m.MigrationType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrateMySQLRequestProperties. +func (m *MigrateMySQLRequestProperties) 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", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connectionString": + err = unpopulate(val, "ConnectionString", &m.ConnectionString) + delete(rawMsg, key) + case "migrationType": + err = unpopulate(val, "MigrationType", &m.MigrationType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrateMySQLStatus. +func (m MigrateMySQLStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", m.ID) + populate(objectMap, "kind", m.Kind) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrateMySQLStatus. +func (m *MigrateMySQLStatus) 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", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &m.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrateMySQLStatusProperties. +func (m MigrateMySQLStatusProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "localMySqlEnabled", m.LocalMySQLEnabled) + populate(objectMap, "migrationOperationStatus", m.MigrationOperationStatus) + populate(objectMap, "operationId", m.OperationID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrateMySQLStatusProperties. +func (m *MigrateMySQLStatusProperties) 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", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "localMySqlEnabled": + err = unpopulate(val, "LocalMySQLEnabled", &m.LocalMySQLEnabled) + delete(rawMsg, key) + case "migrationOperationStatus": + err = unpopulate(val, "MigrationOperationStatus", &m.MigrationOperationStatus) + delete(rawMsg, key) + case "operationId": + err = unpopulate(val, "OperationID", &m.OperationID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NameIdentifier. +func (n NameIdentifier) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "name", n.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NameIdentifier. +func (n *NameIdentifier) 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", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NameIdentifierCollection. +func (n NameIdentifierCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", n.NextLink) + populate(objectMap, "value", n.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NameIdentifierCollection. +func (n *NameIdentifierCollection) 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", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &n.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &n.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NameValuePair. +func (n NameValuePair) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "name", n.Name) + populate(objectMap, "value", n.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NameValuePair. +func (n *NameValuePair) 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", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &n.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkFeatures. +func (n NetworkFeatures) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", n.ID) + populate(objectMap, "kind", n.Kind) + populate(objectMap, "name", n.Name) + populate(objectMap, "properties", n.Properties) + populate(objectMap, "type", n.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkFeatures. +func (n *NetworkFeatures) 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", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &n.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &n.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &n.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &n.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkFeaturesProperties. +func (n NetworkFeaturesProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "hybridConnections", n.HybridConnections) + populate(objectMap, "hybridConnectionsV2", n.HybridConnectionsV2) + populate(objectMap, "virtualNetworkConnection", n.VirtualNetworkConnection) + populate(objectMap, "virtualNetworkName", n.VirtualNetworkName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkFeaturesProperties. +func (n *NetworkFeaturesProperties) 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", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hybridConnections": + err = unpopulate(val, "HybridConnections", &n.HybridConnections) + delete(rawMsg, key) + case "hybridConnectionsV2": + err = unpopulate(val, "HybridConnectionsV2", &n.HybridConnectionsV2) + delete(rawMsg, key) + case "virtualNetworkConnection": + err = unpopulate(val, "VirtualNetworkConnection", &n.VirtualNetworkConnection) + delete(rawMsg, key) + case "virtualNetworkName": + err = unpopulate(val, "VirtualNetworkName", &n.VirtualNetworkName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkTrace. +func (n NetworkTrace) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "message", n.Message) + populate(objectMap, "path", n.Path) + populate(objectMap, "status", n.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkTrace. +func (n *NetworkTrace) 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", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "message": + err = unpopulate(val, "Message", &n.Message) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &n.Path) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &n.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Nonce. +func (n Nonce) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nonceExpirationInterval", n.NonceExpirationInterval) + populate(objectMap, "validateNonce", n.ValidateNonce) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Nonce. +func (n *Nonce) 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", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nonceExpirationInterval": + err = unpopulate(val, "NonceExpirationInterval", &n.NonceExpirationInterval) + delete(rawMsg, key) + case "validateNonce": + err = unpopulate(val, "ValidateNonce", &n.ValidateNonce) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OpenAuthenticationAccessPolicies. +func (o OpenAuthenticationAccessPolicies) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "policies", o.Policies) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OpenAuthenticationAccessPolicies. +func (o *OpenAuthenticationAccessPolicies) 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", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "policies": + err = unpopulate(val, "Policies", &o.Policies) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OpenAuthenticationAccessPolicy. +func (o OpenAuthenticationAccessPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "claims", o.Claims) + populate(objectMap, "type", o.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OpenAuthenticationAccessPolicy. +func (o *OpenAuthenticationAccessPolicy) 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", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "claims": + err = unpopulate(val, "Claims", &o.Claims) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &o.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OpenAuthenticationPolicyClaim. +func (o OpenAuthenticationPolicyClaim) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "name", o.Name) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OpenAuthenticationPolicyClaim. +func (o *OpenAuthenticationPolicyClaim) 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", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OpenIDConnectClientCredential. +func (o OpenIDConnectClientCredential) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "clientSecretSettingName", o.ClientSecretSettingName) + objectMap["method"] = "ClientSecretPost" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OpenIDConnectClientCredential. +func (o *OpenIDConnectClientCredential) 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", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientSecretSettingName": + err = unpopulate(val, "ClientSecretSettingName", &o.ClientSecretSettingName) + delete(rawMsg, key) + case "method": + err = unpopulate(val, "Method", &o.Method) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OpenIDConnectConfig. +func (o OpenIDConnectConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "authorizationEndpoint", o.AuthorizationEndpoint) + populate(objectMap, "certificationUri", o.CertificationURI) + populate(objectMap, "issuer", o.Issuer) + populate(objectMap, "tokenEndpoint", o.TokenEndpoint) + populate(objectMap, "wellKnownOpenIdConfiguration", o.WellKnownOpenIDConfiguration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OpenIDConnectConfig. +func (o *OpenIDConnectConfig) 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", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authorizationEndpoint": + err = unpopulate(val, "AuthorizationEndpoint", &o.AuthorizationEndpoint) + delete(rawMsg, key) + case "certificationUri": + err = unpopulate(val, "CertificationURI", &o.CertificationURI) + delete(rawMsg, key) + case "issuer": + err = unpopulate(val, "Issuer", &o.Issuer) + delete(rawMsg, key) + case "tokenEndpoint": + err = unpopulate(val, "TokenEndpoint", &o.TokenEndpoint) + delete(rawMsg, key) + case "wellKnownOpenIdConfiguration": + err = unpopulate(val, "WellKnownOpenIDConfiguration", &o.WellKnownOpenIDConfiguration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OpenIDConnectLogin. +func (o OpenIDConnectLogin) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nameClaimType", o.NameClaimType) + populate(objectMap, "scopes", o.Scopes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OpenIDConnectLogin. +func (o *OpenIDConnectLogin) 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", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nameClaimType": + err = unpopulate(val, "NameClaimType", &o.NameClaimType) + delete(rawMsg, key) + case "scopes": + err = unpopulate(val, "Scopes", &o.Scopes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OpenIDConnectRegistration. +func (o OpenIDConnectRegistration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "clientCredential", o.ClientCredential) + populate(objectMap, "clientId", o.ClientID) + populate(objectMap, "openIdConnectConfiguration", o.OpenIDConnectConfiguration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OpenIDConnectRegistration. +func (o *OpenIDConnectRegistration) 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", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientCredential": + err = unpopulate(val, "ClientCredential", &o.ClientCredential) + delete(rawMsg, key) + case "clientId": + err = unpopulate(val, "ClientID", &o.ClientID) + delete(rawMsg, key) + case "openIdConnectConfiguration": + err = unpopulate(val, "OpenIDConnectConfiguration", &o.OpenIDConnectConfiguration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Operation. +func (o Operation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populateTimeRFC3339(objectMap, "createdTime", o.CreatedTime) + populate(objectMap, "errors", o.Errors) + populateTimeRFC3339(objectMap, "expirationTime", o.ExpirationTime) + populate(objectMap, "geoMasterOperationId", o.GeoMasterOperationID) + populate(objectMap, "id", o.ID) + populateTimeRFC3339(objectMap, "modifiedTime", o.ModifiedTime) + populate(objectMap, "name", o.Name) + populate(objectMap, "status", o.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. +func (o *Operation) 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", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdTime": + err = unpopulateTimeRFC3339(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) + delete(rawMsg, key) + case "geoMasterOperationId": + err = unpopulate(val, "GeoMasterOperationID", &o.GeoMasterOperationID) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &o.ID) + delete(rawMsg, key) + case "modifiedTime": + err = unpopulateTimeRFC3339(val, "ModifiedTime", &o.ModifiedTime) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &o.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationResult. +func (o OperationResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", o.Code) + populate(objectMap, "correlation", o.Correlation) + populateTimeRFC3339(objectMap, "endTime", o.EndTime) + populate(objectMap, "error", &o.Error) + populate(objectMap, "inputs", &o.Inputs) + populate(objectMap, "inputsLink", o.InputsLink) + populate(objectMap, "iterationCount", o.IterationCount) + populate(objectMap, "outputs", &o.Outputs) + populate(objectMap, "outputsLink", o.OutputsLink) + populate(objectMap, "retryHistory", o.RetryHistory) + populateTimeRFC3339(objectMap, "startTime", o.StartTime) + populate(objectMap, "status", o.Status) + populate(objectMap, "trackedProperties", &o.TrackedProperties) + populate(objectMap, "trackingId", o.TrackingID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResult. +func (o *OperationResult) 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", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &o.Code) + delete(rawMsg, key) + case "correlation": + err = unpopulate(val, "Correlation", &o.Correlation) + delete(rawMsg, key) + case "endTime": + err = unpopulateTimeRFC3339(val, "EndTime", &o.EndTime) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &o.Error) + delete(rawMsg, key) + case "inputs": + err = unpopulate(val, "Inputs", &o.Inputs) + delete(rawMsg, key) + case "inputsLink": + err = unpopulate(val, "InputsLink", &o.InputsLink) + delete(rawMsg, key) + case "iterationCount": + err = unpopulate(val, "IterationCount", &o.IterationCount) + delete(rawMsg, key) + case "outputs": + err = unpopulate(val, "Outputs", &o.Outputs) + delete(rawMsg, key) + case "outputsLink": + err = unpopulate(val, "OutputsLink", &o.OutputsLink) + delete(rawMsg, key) + case "retryHistory": + err = unpopulate(val, "RetryHistory", &o.RetryHistory) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, "StartTime", &o.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &o.Status) + delete(rawMsg, key) + case "trackedProperties": + err = unpopulate(val, "TrackedProperties", &o.TrackedProperties) + delete(rawMsg, key) + case "trackingId": + err = unpopulate(val, "TrackingID", &o.TrackingID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationResultProperties. +func (o OperationResultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", o.Code) + populate(objectMap, "correlation", o.Correlation) + populateTimeRFC3339(objectMap, "endTime", o.EndTime) + populate(objectMap, "error", &o.Error) + populateTimeRFC3339(objectMap, "startTime", o.StartTime) + populate(objectMap, "status", o.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResultProperties. +func (o *OperationResultProperties) 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", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &o.Code) + delete(rawMsg, key) + case "correlation": + err = unpopulate(val, "Correlation", &o.Correlation) + delete(rawMsg, key) + case "endTime": + err = unpopulateTimeRFC3339(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) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &o.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OutboundEnvironmentEndpoint. +func (o OutboundEnvironmentEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "category", o.Category) + populate(objectMap, "endpoints", o.Endpoints) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEnvironmentEndpoint. +func (o *OutboundEnvironmentEndpoint) 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", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "category": + err = unpopulate(val, "Category", &o.Category) + delete(rawMsg, key) + case "endpoints": + err = unpopulate(val, "Endpoints", &o.Endpoints) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OutboundEnvironmentEndpointCollection. +func (o OutboundEnvironmentEndpointCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEnvironmentEndpointCollection. +func (o *OutboundEnvironmentEndpointCollection) 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", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PerfMonCounterCollection. +func (p PerfMonCounterCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PerfMonCounterCollection. +func (p *PerfMonCounterCollection) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PerfMonResponse. +func (p PerfMonResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", p.Code) + populate(objectMap, "data", p.Data) + populate(objectMap, "message", p.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PerfMonResponse. +func (p *PerfMonResponse) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &p.Code) + delete(rawMsg, key) + case "data": + err = unpopulate(val, "Data", &p.Data) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &p.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PerfMonSample. +func (p PerfMonSample) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "instanceName", p.InstanceName) + populateTimeRFC3339(objectMap, "time", p.Time) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PerfMonSample. +func (p *PerfMonSample) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceName": + err = unpopulate(val, "InstanceName", &p.InstanceName) + delete(rawMsg, key) + case "time": + err = unpopulateTimeRFC3339(val, "Time", &p.Time) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PerfMonSet. +func (p PerfMonSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populateTimeRFC3339(objectMap, "endTime", p.EndTime) + populate(objectMap, "name", p.Name) + populateTimeRFC3339(objectMap, "startTime", p.StartTime) + populate(objectMap, "timeGrain", p.TimeGrain) + populate(objectMap, "values", p.Values) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PerfMonSet. +func (p *PerfMonSet) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulateTimeRFC3339(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) + delete(rawMsg, key) + case "timeGrain": + err = unpopulate(val, "TimeGrain", &p.TimeGrain) + delete(rawMsg, key) + case "values": + err = unpopulate(val, "Values", &p.Values) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Plan. +func (p Plan) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "extendedLocation", p.ExtendedLocation) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Plan. +func (p *Plan) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &p.ExtendedLocation) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &p.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PlanCollection. +func (p PlanCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PlanCollection. +func (p *PlanCollection) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PlanPatchResource. +func (p PlanPatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PlanPatchResource. +func (p *PlanPatchResource) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PlanPatchResourceProperties. +func (p PlanPatchResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "elasticScaleEnabled", p.ElasticScaleEnabled) + populateTimeRFC3339(objectMap, "freeOfferExpirationTime", p.FreeOfferExpirationTime) + populate(objectMap, "geoRegion", p.GeoRegion) + populate(objectMap, "hostingEnvironmentProfile", p.HostingEnvironmentProfile) + populate(objectMap, "hyperV", p.HyperV) + populate(objectMap, "isSpot", p.IsSpot) + populate(objectMap, "isXenon", p.IsXenon) + populate(objectMap, "kubeEnvironmentProfile", p.KubeEnvironmentProfile) + populate(objectMap, "maximumElasticWorkerCount", p.MaximumElasticWorkerCount) + populate(objectMap, "maximumNumberOfWorkers", p.MaximumNumberOfWorkers) + populate(objectMap, "numberOfSites", p.NumberOfSites) + populate(objectMap, "numberOfWorkers", p.NumberOfWorkers) + populate(objectMap, "perSiteScaling", p.PerSiteScaling) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "reserved", p.Reserved) + populate(objectMap, "resourceGroup", p.ResourceGroup) + populateTimeRFC3339(objectMap, "spotExpirationTime", p.SpotExpirationTime) + populate(objectMap, "status", p.Status) + populate(objectMap, "subscription", p.Subscription) + populate(objectMap, "targetWorkerCount", p.TargetWorkerCount) + populate(objectMap, "targetWorkerSizeId", p.TargetWorkerSizeID) + populate(objectMap, "workerTierName", p.WorkerTierName) + populate(objectMap, "zoneRedundant", p.ZoneRedundant) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PlanPatchResourceProperties. +func (p *PlanPatchResourceProperties) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "elasticScaleEnabled": + err = unpopulate(val, "ElasticScaleEnabled", &p.ElasticScaleEnabled) + delete(rawMsg, key) + case "freeOfferExpirationTime": + err = unpopulateTimeRFC3339(val, "FreeOfferExpirationTime", &p.FreeOfferExpirationTime) + delete(rawMsg, key) + case "geoRegion": + err = unpopulate(val, "GeoRegion", &p.GeoRegion) + delete(rawMsg, key) + case "hostingEnvironmentProfile": + err = unpopulate(val, "HostingEnvironmentProfile", &p.HostingEnvironmentProfile) + delete(rawMsg, key) + case "hyperV": + err = unpopulate(val, "HyperV", &p.HyperV) + delete(rawMsg, key) + case "isSpot": + err = unpopulate(val, "IsSpot", &p.IsSpot) + delete(rawMsg, key) + case "isXenon": + err = unpopulate(val, "IsXenon", &p.IsXenon) + delete(rawMsg, key) + case "kubeEnvironmentProfile": + err = unpopulate(val, "KubeEnvironmentProfile", &p.KubeEnvironmentProfile) + delete(rawMsg, key) + case "maximumElasticWorkerCount": + err = unpopulate(val, "MaximumElasticWorkerCount", &p.MaximumElasticWorkerCount) + delete(rawMsg, key) + case "maximumNumberOfWorkers": + err = unpopulate(val, "MaximumNumberOfWorkers", &p.MaximumNumberOfWorkers) + delete(rawMsg, key) + case "numberOfSites": + err = unpopulate(val, "NumberOfSites", &p.NumberOfSites) + delete(rawMsg, key) + case "numberOfWorkers": + err = unpopulate(val, "NumberOfWorkers", &p.NumberOfWorkers) + delete(rawMsg, key) + case "perSiteScaling": + err = unpopulate(val, "PerSiteScaling", &p.PerSiteScaling) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "reserved": + err = unpopulate(val, "Reserved", &p.Reserved) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &p.ResourceGroup) + delete(rawMsg, key) + case "spotExpirationTime": + err = unpopulateTimeRFC3339(val, "SpotExpirationTime", &p.SpotExpirationTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + case "subscription": + err = unpopulate(val, "Subscription", &p.Subscription) + delete(rawMsg, key) + case "targetWorkerCount": + err = unpopulate(val, "TargetWorkerCount", &p.TargetWorkerCount) + delete(rawMsg, key) + case "targetWorkerSizeId": + err = unpopulate(val, "TargetWorkerSizeID", &p.TargetWorkerSizeID) + delete(rawMsg, key) + case "workerTierName": + err = unpopulate(val, "WorkerTierName", &p.WorkerTierName) + delete(rawMsg, key) + case "zoneRedundant": + err = unpopulate(val, "ZoneRedundant", &p.ZoneRedundant) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PlanProperties. +func (p PlanProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "elasticScaleEnabled", p.ElasticScaleEnabled) + populateTimeRFC3339(objectMap, "freeOfferExpirationTime", p.FreeOfferExpirationTime) + populate(objectMap, "geoRegion", p.GeoRegion) + populate(objectMap, "hostingEnvironmentProfile", p.HostingEnvironmentProfile) + populate(objectMap, "hyperV", p.HyperV) + populate(objectMap, "isSpot", p.IsSpot) + populate(objectMap, "isXenon", p.IsXenon) + populate(objectMap, "kubeEnvironmentProfile", p.KubeEnvironmentProfile) + populate(objectMap, "maximumElasticWorkerCount", p.MaximumElasticWorkerCount) + populate(objectMap, "maximumNumberOfWorkers", p.MaximumNumberOfWorkers) + populate(objectMap, "numberOfSites", p.NumberOfSites) + populate(objectMap, "numberOfWorkers", p.NumberOfWorkers) + populate(objectMap, "perSiteScaling", p.PerSiteScaling) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "reserved", p.Reserved) + populate(objectMap, "resourceGroup", p.ResourceGroup) + populateTimeRFC3339(objectMap, "spotExpirationTime", p.SpotExpirationTime) + populate(objectMap, "status", p.Status) + populate(objectMap, "subscription", p.Subscription) + populate(objectMap, "targetWorkerCount", p.TargetWorkerCount) + populate(objectMap, "targetWorkerSizeId", p.TargetWorkerSizeID) + populate(objectMap, "workerTierName", p.WorkerTierName) + populate(objectMap, "zoneRedundant", p.ZoneRedundant) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PlanProperties. +func (p *PlanProperties) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "elasticScaleEnabled": + err = unpopulate(val, "ElasticScaleEnabled", &p.ElasticScaleEnabled) + delete(rawMsg, key) + case "freeOfferExpirationTime": + err = unpopulateTimeRFC3339(val, "FreeOfferExpirationTime", &p.FreeOfferExpirationTime) + delete(rawMsg, key) + case "geoRegion": + err = unpopulate(val, "GeoRegion", &p.GeoRegion) + delete(rawMsg, key) + case "hostingEnvironmentProfile": + err = unpopulate(val, "HostingEnvironmentProfile", &p.HostingEnvironmentProfile) + delete(rawMsg, key) + case "hyperV": + err = unpopulate(val, "HyperV", &p.HyperV) + delete(rawMsg, key) + case "isSpot": + err = unpopulate(val, "IsSpot", &p.IsSpot) + delete(rawMsg, key) + case "isXenon": + err = unpopulate(val, "IsXenon", &p.IsXenon) + delete(rawMsg, key) + case "kubeEnvironmentProfile": + err = unpopulate(val, "KubeEnvironmentProfile", &p.KubeEnvironmentProfile) + delete(rawMsg, key) + case "maximumElasticWorkerCount": + err = unpopulate(val, "MaximumElasticWorkerCount", &p.MaximumElasticWorkerCount) + delete(rawMsg, key) + case "maximumNumberOfWorkers": + err = unpopulate(val, "MaximumNumberOfWorkers", &p.MaximumNumberOfWorkers) + delete(rawMsg, key) + case "numberOfSites": + err = unpopulate(val, "NumberOfSites", &p.NumberOfSites) + delete(rawMsg, key) + case "numberOfWorkers": + err = unpopulate(val, "NumberOfWorkers", &p.NumberOfWorkers) + delete(rawMsg, key) + case "perSiteScaling": + err = unpopulate(val, "PerSiteScaling", &p.PerSiteScaling) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "reserved": + err = unpopulate(val, "Reserved", &p.Reserved) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &p.ResourceGroup) + delete(rawMsg, key) + case "spotExpirationTime": + err = unpopulateTimeRFC3339(val, "SpotExpirationTime", &p.SpotExpirationTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + case "subscription": + err = unpopulate(val, "Subscription", &p.Subscription) + delete(rawMsg, key) + case "targetWorkerCount": + err = unpopulate(val, "TargetWorkerCount", &p.TargetWorkerCount) + delete(rawMsg, key) + case "targetWorkerSizeId": + err = unpopulate(val, "TargetWorkerSizeID", &p.TargetWorkerSizeID) + delete(rawMsg, key) + case "workerTierName": + err = unpopulate(val, "WorkerTierName", &p.WorkerTierName) + delete(rawMsg, key) + case "zoneRedundant": + err = unpopulate(val, "ZoneRedundant", &p.ZoneRedundant) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PremierAddOn. +func (p PremierAddOn) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PremierAddOn. +func (p *PremierAddOn) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PremierAddOnOffer. +func (p PremierAddOnOffer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PremierAddOnOffer. +func (p *PremierAddOnOffer) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PremierAddOnOfferCollection. +func (p PremierAddOnOfferCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PremierAddOnOfferCollection. +func (p *PremierAddOnOfferCollection) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PremierAddOnOfferProperties. +func (p PremierAddOnOfferProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "legalTermsUrl", p.LegalTermsURL) + populate(objectMap, "marketplaceOffer", p.MarketplaceOffer) + populate(objectMap, "marketplacePublisher", p.MarketplacePublisher) + populate(objectMap, "privacyPolicyUrl", p.PrivacyPolicyURL) + populate(objectMap, "product", p.Product) + populate(objectMap, "promoCodeRequired", p.PromoCodeRequired) + populate(objectMap, "quota", p.Quota) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "vendor", p.Vendor) + populate(objectMap, "webHostingPlanRestrictions", p.WebHostingPlanRestrictions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PremierAddOnOfferProperties. +func (p *PremierAddOnOfferProperties) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "legalTermsUrl": + err = unpopulate(val, "LegalTermsURL", &p.LegalTermsURL) + delete(rawMsg, key) + case "marketplaceOffer": + err = unpopulate(val, "MarketplaceOffer", &p.MarketplaceOffer) + delete(rawMsg, key) + case "marketplacePublisher": + err = unpopulate(val, "MarketplacePublisher", &p.MarketplacePublisher) + delete(rawMsg, key) + case "privacyPolicyUrl": + err = unpopulate(val, "PrivacyPolicyURL", &p.PrivacyPolicyURL) + delete(rawMsg, key) + case "product": + err = unpopulate(val, "Product", &p.Product) + delete(rawMsg, key) + case "promoCodeRequired": + err = unpopulate(val, "PromoCodeRequired", &p.PromoCodeRequired) + delete(rawMsg, key) + case "quota": + err = unpopulate(val, "Quota", &p.Quota) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &p.SKU) + delete(rawMsg, key) + case "vendor": + err = unpopulate(val, "Vendor", &p.Vendor) + delete(rawMsg, key) + case "webHostingPlanRestrictions": + err = unpopulate(val, "WebHostingPlanRestrictions", &p.WebHostingPlanRestrictions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PremierAddOnPatchResource. +func (p PremierAddOnPatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PremierAddOnPatchResource. +func (p *PremierAddOnPatchResource) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PremierAddOnPatchResourceProperties. +func (p PremierAddOnPatchResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "marketplaceOffer", p.MarketplaceOffer) + populate(objectMap, "marketplacePublisher", p.MarketplacePublisher) + populate(objectMap, "product", p.Product) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "vendor", p.Vendor) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PremierAddOnPatchResourceProperties. +func (p *PremierAddOnPatchResourceProperties) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "marketplaceOffer": + err = unpopulate(val, "MarketplaceOffer", &p.MarketplaceOffer) + delete(rawMsg, key) + case "marketplacePublisher": + err = unpopulate(val, "MarketplacePublisher", &p.MarketplacePublisher) + delete(rawMsg, key) + case "product": + err = unpopulate(val, "Product", &p.Product) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &p.SKU) + delete(rawMsg, key) + case "vendor": + err = unpopulate(val, "Vendor", &p.Vendor) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PremierAddOnProperties. +func (p PremierAddOnProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "marketplaceOffer", p.MarketplaceOffer) + populate(objectMap, "marketplacePublisher", p.MarketplacePublisher) + populate(objectMap, "product", p.Product) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "vendor", p.Vendor) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PremierAddOnProperties. +func (p *PremierAddOnProperties) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "marketplaceOffer": + err = unpopulate(val, "MarketplaceOffer", &p.MarketplaceOffer) + delete(rawMsg, key) + case "marketplacePublisher": + err = unpopulate(val, "MarketplacePublisher", &p.MarketplacePublisher) + delete(rawMsg, key) + case "product": + err = unpopulate(val, "Product", &p.Product) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &p.SKU) + delete(rawMsg, key) + case "vendor": + err = unpopulate(val, "Vendor", &p.Vendor) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateAccess. +func (p PrivateAccess) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateAccess. +func (p *PrivateAccess) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateAccessProperties. +func (p PrivateAccessProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "enabled", p.Enabled) + populate(objectMap, "virtualNetworks", p.VirtualNetworks) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateAccessProperties. +func (p *PrivateAccessProperties) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &p.Enabled) + delete(rawMsg, key) + case "virtualNetworks": + err = unpopulate(val, "VirtualNetworks", &p.VirtualNetworks) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateAccessSubnet. +func (p PrivateAccessSubnet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "key", p.Key) + populate(objectMap, "name", p.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateAccessSubnet. +func (p *PrivateAccessSubnet) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "key": + err = unpopulate(val, "Key", &p.Key) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateAccessVirtualNetwork. +func (p PrivateAccessVirtualNetwork) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "key", p.Key) + populate(objectMap, "name", p.Name) + populate(objectMap, "resourceId", p.ResourceID) + populate(objectMap, "subnets", p.Subnets) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateAccessVirtualNetwork. +func (p *PrivateAccessVirtualNetwork) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "key": + err = unpopulate(val, "Key", &p.Key) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &p.ResourceID) + delete(rawMsg, key) + case "subnets": + err = unpopulate(val, "Subnets", &p.Subnets) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionCollection. +func (p PrivateEndpointConnectionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionCollection. +func (p *PrivateEndpointConnectionCollection) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkConnectionApprovalRequest. +func (p PrivateLinkConnectionApprovalRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkConnectionApprovalRequest. +func (p *PrivateLinkConnectionApprovalRequest) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkConnectionApprovalRequestResource. +func (p PrivateLinkConnectionApprovalRequestResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkConnectionApprovalRequestResource. +func (p *PrivateLinkConnectionApprovalRequestResource) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkConnectionState. +func (p PrivateLinkConnectionState) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "actionsRequired", p.ActionsRequired) + populate(objectMap, "description", p.Description) + populate(objectMap, "status", p.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkConnectionState. +func (p *PrivateLinkConnectionState) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionsRequired": + err = unpopulate(val, "ActionsRequired", &p.ActionsRequired) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource. +func (p PrivateLinkResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource. +func (p *PrivateLinkResource) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. +func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "groupId", p.GroupID) + populate(objectMap, "requiredMembers", p.RequiredMembers) + populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties. +func (p *PrivateLinkResourceProperties) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupId": + err = unpopulate(val, "GroupID", &p.GroupID) + delete(rawMsg, key) + case "requiredMembers": + err = unpopulate(val, "RequiredMembers", &p.RequiredMembers) + delete(rawMsg, key) + case "requiredZoneNames": + err = unpopulate(val, "RequiredZoneNames", &p.RequiredZoneNames) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourcesWrapper. +func (p PrivateLinkResourcesWrapper) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourcesWrapper. +func (p *PrivateLinkResourcesWrapper) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProcessInfo. +func (p ProcessInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessInfo. +func (p *ProcessInfo) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProcessInfoCollection. +func (p ProcessInfoCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessInfoCollection. +func (p *ProcessInfoCollection) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProcessInfoProperties. +func (p ProcessInfoProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "children", p.Children) + populate(objectMap, "command_line", p.CommandLine) + populate(objectMap, "deployment_name", p.DeploymentName) + populate(objectMap, "description", p.Description) + populate(objectMap, "environment_variables", p.EnvironmentVariables) + populate(objectMap, "file_name", p.FileName) + populate(objectMap, "handle_count", p.HandleCount) + populate(objectMap, "href", p.Href) + populate(objectMap, "identifier", p.Identifier) + populate(objectMap, "iis_profile_timeout_in_seconds", p.IisProfileTimeoutInSeconds) + populate(objectMap, "is_iis_profile_running", p.IsIisProfileRunning) + populate(objectMap, "is_profile_running", p.IsProfileRunning) + populate(objectMap, "is_scm_site", p.IsScmSite) + populate(objectMap, "is_webjob", p.IsWebjob) + populate(objectMap, "minidump", p.Minidump) + populate(objectMap, "module_count", p.ModuleCount) + populate(objectMap, "modules", p.Modules) + populate(objectMap, "non_paged_system_memory", p.NonPagedSystemMemory) + populate(objectMap, "open_file_handles", p.OpenFileHandles) + populate(objectMap, "paged_memory", p.PagedMemory) + populate(objectMap, "paged_system_memory", p.PagedSystemMemory) + populate(objectMap, "parent", p.Parent) + populate(objectMap, "peak_paged_memory", p.PeakPagedMemory) + populate(objectMap, "peak_virtual_memory", p.PeakVirtualMemory) + 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) + populate(objectMap, "thread_count", p.ThreadCount) + populate(objectMap, "threads", p.Threads) + populateTimeRFC3339(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) + populate(objectMap, "virtual_memory", p.VirtualMemory) + populate(objectMap, "working_set", p.WorkingSet) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessInfoProperties. +func (p *ProcessInfoProperties) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "children": + err = unpopulate(val, "Children", &p.Children) + delete(rawMsg, key) + case "command_line": + err = unpopulate(val, "CommandLine", &p.CommandLine) + delete(rawMsg, key) + case "deployment_name": + err = unpopulate(val, "DeploymentName", &p.DeploymentName) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "environment_variables": + err = unpopulate(val, "EnvironmentVariables", &p.EnvironmentVariables) + delete(rawMsg, key) + case "file_name": + err = unpopulate(val, "FileName", &p.FileName) + delete(rawMsg, key) + case "handle_count": + err = unpopulate(val, "HandleCount", &p.HandleCount) + delete(rawMsg, key) + case "href": + err = unpopulate(val, "Href", &p.Href) + delete(rawMsg, key) + case "identifier": + err = unpopulate(val, "Identifier", &p.Identifier) + delete(rawMsg, key) + case "iis_profile_timeout_in_seconds": + err = unpopulate(val, "IisProfileTimeoutInSeconds", &p.IisProfileTimeoutInSeconds) + delete(rawMsg, key) + case "is_iis_profile_running": + err = unpopulate(val, "IsIisProfileRunning", &p.IsIisProfileRunning) + delete(rawMsg, key) + case "is_profile_running": + err = unpopulate(val, "IsProfileRunning", &p.IsProfileRunning) + delete(rawMsg, key) + case "is_scm_site": + err = unpopulate(val, "IsScmSite", &p.IsScmSite) + delete(rawMsg, key) + case "is_webjob": + err = unpopulate(val, "IsWebjob", &p.IsWebjob) + delete(rawMsg, key) + case "minidump": + err = unpopulate(val, "Minidump", &p.Minidump) + delete(rawMsg, key) + case "module_count": + err = unpopulate(val, "ModuleCount", &p.ModuleCount) + delete(rawMsg, key) + case "modules": + err = unpopulate(val, "Modules", &p.Modules) + delete(rawMsg, key) + case "non_paged_system_memory": + err = unpopulate(val, "NonPagedSystemMemory", &p.NonPagedSystemMemory) + delete(rawMsg, key) + case "open_file_handles": + err = unpopulate(val, "OpenFileHandles", &p.OpenFileHandles) + delete(rawMsg, key) + case "paged_memory": + err = unpopulate(val, "PagedMemory", &p.PagedMemory) + delete(rawMsg, key) + case "paged_system_memory": + err = unpopulate(val, "PagedSystemMemory", &p.PagedSystemMemory) + delete(rawMsg, key) + case "parent": + err = unpopulate(val, "Parent", &p.Parent) + delete(rawMsg, key) + case "peak_paged_memory": + err = unpopulate(val, "PeakPagedMemory", &p.PeakPagedMemory) + delete(rawMsg, key) + case "peak_virtual_memory": + err = unpopulate(val, "PeakVirtualMemory", &p.PeakVirtualMemory) + delete(rawMsg, key) + case "peak_working_set": + err = unpopulate(val, "PeakWorkingSet", &p.PeakWorkingSet) + delete(rawMsg, key) + case "private_memory": + err = unpopulate(val, "PrivateMemory", &p.PrivateMemory) + delete(rawMsg, key) + case "privileged_cpu_time": + err = unpopulate(val, "PrivilegedCPUTime", &p.PrivilegedCPUTime) + delete(rawMsg, key) + case "start_time": + err = unpopulateTimeRFC3339(val, "StartTime", &p.StartTime) + delete(rawMsg, key) + case "thread_count": + err = unpopulate(val, "ThreadCount", &p.ThreadCount) + delete(rawMsg, key) + case "threads": + err = unpopulate(val, "Threads", &p.Threads) + delete(rawMsg, key) + case "time_stamp": + err = unpopulateTimeRFC3339(val, "TimeStamp", &p.TimeStamp) + delete(rawMsg, key) + case "total_cpu_time": + err = unpopulate(val, "TotalCPUTime", &p.TotalCPUTime) + delete(rawMsg, key) + case "user_cpu_time": + err = unpopulate(val, "UserCPUTime", &p.UserCPUTime) + delete(rawMsg, key) + case "user_name": + err = unpopulate(val, "UserName", &p.UserName) + delete(rawMsg, key) + case "virtual_memory": + err = unpopulate(val, "VirtualMemory", &p.VirtualMemory) + delete(rawMsg, key) + case "working_set": + err = unpopulate(val, "WorkingSet", &p.WorkingSet) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProcessModuleInfo. +func (p ProcessModuleInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessModuleInfo. +func (p *ProcessModuleInfo) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProcessModuleInfoCollection. +func (p ProcessModuleInfoCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessModuleInfoCollection. +func (p *ProcessModuleInfoCollection) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProcessModuleInfoProperties. +func (p ProcessModuleInfoProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "base_address", p.BaseAddress) + populate(objectMap, "file_description", p.FileDescription) + populate(objectMap, "file_name", p.FileName) + populate(objectMap, "file_path", p.FilePath) + populate(objectMap, "file_version", p.FileVersion) + populate(objectMap, "href", p.Href) + populate(objectMap, "is_debug", p.IsDebug) + populate(objectMap, "language", p.Language) + populate(objectMap, "module_memory_size", p.ModuleMemorySize) + populate(objectMap, "product", p.Product) + populate(objectMap, "product_version", p.ProductVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessModuleInfoProperties. +func (p *ProcessModuleInfoProperties) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "base_address": + err = unpopulate(val, "BaseAddress", &p.BaseAddress) + delete(rawMsg, key) + case "file_description": + err = unpopulate(val, "FileDescription", &p.FileDescription) + delete(rawMsg, key) + case "file_name": + err = unpopulate(val, "FileName", &p.FileName) + delete(rawMsg, key) + case "file_path": + err = unpopulate(val, "FilePath", &p.FilePath) + delete(rawMsg, key) + case "file_version": + err = unpopulate(val, "FileVersion", &p.FileVersion) + delete(rawMsg, key) + case "href": + err = unpopulate(val, "Href", &p.Href) + delete(rawMsg, key) + case "is_debug": + err = unpopulate(val, "IsDebug", &p.IsDebug) + delete(rawMsg, key) + case "language": + err = unpopulate(val, "Language", &p.Language) + delete(rawMsg, key) + case "module_memory_size": + err = unpopulate(val, "ModuleMemorySize", &p.ModuleMemorySize) + delete(rawMsg, key) + case "product": + err = unpopulate(val, "Product", &p.Product) + delete(rawMsg, key) + case "product_version": + err = unpopulate(val, "ProductVersion", &p.ProductVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProcessThreadInfo. +func (p ProcessThreadInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessThreadInfo. +func (p *ProcessThreadInfo) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProcessThreadInfoCollection. +func (p ProcessThreadInfoCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessThreadInfoCollection. +func (p *ProcessThreadInfoCollection) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProcessThreadInfoProperties. +func (p ProcessThreadInfoProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "base_priority", p.BasePriority) + populate(objectMap, "current_priority", p.CurrentPriority) + populate(objectMap, "href", p.Href) + populate(objectMap, "identifier", p.Identifier) + populate(objectMap, "priority_level", p.PriorityLevel) + populate(objectMap, "process", p.Process) + populate(objectMap, "start_address", p.StartAddress) + populateTimeRFC3339(objectMap, "start_time", p.StartTime) + populate(objectMap, "state", p.State) + populate(objectMap, "total_processor_time", p.TotalProcessorTime) + populate(objectMap, "user_processor_time", p.UserProcessorTime) + populate(objectMap, "wait_reason", p.WaitReason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessThreadInfoProperties. +func (p *ProcessThreadInfoProperties) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "base_priority": + err = unpopulate(val, "BasePriority", &p.BasePriority) + delete(rawMsg, key) + case "current_priority": + err = unpopulate(val, "CurrentPriority", &p.CurrentPriority) + delete(rawMsg, key) + case "href": + err = unpopulate(val, "Href", &p.Href) + delete(rawMsg, key) + case "identifier": + err = unpopulate(val, "Identifier", &p.Identifier) + delete(rawMsg, key) + case "priority_level": + err = unpopulate(val, "PriorityLevel", &p.PriorityLevel) + delete(rawMsg, key) + case "process": + err = unpopulate(val, "Process", &p.Process) + delete(rawMsg, key) + case "start_address": + err = unpopulate(val, "StartAddress", &p.StartAddress) + delete(rawMsg, key) + case "start_time": + err = unpopulateTimeRFC3339(val, "StartTime", &p.StartTime) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &p.State) + delete(rawMsg, key) + case "total_processor_time": + err = unpopulate(val, "TotalProcessorTime", &p.TotalProcessorTime) + delete(rawMsg, key) + case "user_processor_time": + err = unpopulate(val, "UserProcessorTime", &p.UserProcessorTime) + delete(rawMsg, key) + case "wait_reason": + err = unpopulate(val, "WaitReason", &p.WaitReason) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProxyOnlyResource. +func (p ProxyOnlyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "name", p.Name) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyOnlyResource. +func (p *ProxyOnlyResource) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PublicCertificate. +func (p PublicCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PublicCertificate. +func (p *PublicCertificate) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PublicCertificateCollection. +func (p PublicCertificateCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PublicCertificateCollection. +func (p *PublicCertificateCollection) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PublicCertificateProperties. +func (p PublicCertificateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populateByteArray(objectMap, "blob", p.Blob, runtime.Base64StdFormat) + populate(objectMap, "publicCertificateLocation", p.PublicCertificateLocation) + populate(objectMap, "thumbprint", p.Thumbprint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PublicCertificateProperties. +func (p *PublicCertificateProperties) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blob": + err = runtime.DecodeByteArray(string(val), &p.Blob, runtime.Base64StdFormat) + delete(rawMsg, key) + case "publicCertificateLocation": + err = unpopulate(val, "PublicCertificateLocation", &p.PublicCertificateLocation) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &p.Thumbprint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PublishingCredentialsPoliciesCollection. +func (p PublishingCredentialsPoliciesCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PublishingCredentialsPoliciesCollection. +func (p *PublishingCredentialsPoliciesCollection) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PushSettings. +func (p PushSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PushSettings. +func (p *PushSettings) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PushSettingsProperties. +func (p PushSettingsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "dynamicTagsJson", p.DynamicTagsJSON) + populate(objectMap, "isPushEnabled", p.IsPushEnabled) + populate(objectMap, "tagWhitelistJson", p.TagWhitelistJSON) + populate(objectMap, "tagsRequiringAuth", p.TagsRequiringAuth) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PushSettingsProperties. +func (p *PushSettingsProperties) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dynamicTagsJson": + err = unpopulate(val, "DynamicTagsJSON", &p.DynamicTagsJSON) + delete(rawMsg, key) + case "isPushEnabled": + err = unpopulate(val, "IsPushEnabled", &p.IsPushEnabled) + delete(rawMsg, key) + case "tagWhitelistJson": + err = unpopulate(val, "TagWhitelistJSON", &p.TagWhitelistJSON) + delete(rawMsg, key) + case "tagsRequiringAuth": + err = unpopulate(val, "TagsRequiringAuth", &p.TagsRequiringAuth) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QueryUtterancesResult. +func (q QueryUtterancesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "sampleUtterance", q.SampleUtterance) + populate(objectMap, "score", q.Score) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueryUtterancesResult. +func (q *QueryUtterancesResult) 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", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sampleUtterance": + err = unpopulate(val, "SampleUtterance", &q.SampleUtterance) + delete(rawMsg, key) + case "score": + err = unpopulate(val, "Score", &q.Score) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QueryUtterancesResults. +func (q QueryUtterancesResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "query", q.Query) + populate(objectMap, "results", q.Results) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueryUtterancesResults. +func (q *QueryUtterancesResults) 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", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "query": + err = unpopulate(val, "Query", &q.Query) + delete(rawMsg, key) + case "results": + err = unpopulate(val, "Results", &q.Results) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QueueScaleRule. +func (q QueueScaleRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "auth", q.Auth) + populate(objectMap, "queueLength", q.QueueLength) + populate(objectMap, "queueName", q.QueueName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueueScaleRule. +func (q *QueueScaleRule) 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", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "auth": + err = unpopulate(val, "Auth", &q.Auth) + delete(rawMsg, key) + case "queueLength": + err = unpopulate(val, "QueueLength", &q.QueueLength) + delete(rawMsg, key) + case "queueName": + err = unpopulate(val, "QueueName", &q.QueueName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RampUpRule. +func (r RampUpRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "actionHostName", r.ActionHostName) + populate(objectMap, "changeDecisionCallbackUrl", r.ChangeDecisionCallbackURL) + populate(objectMap, "changeIntervalInMinutes", r.ChangeIntervalInMinutes) + populate(objectMap, "changeStep", r.ChangeStep) + populate(objectMap, "maxReroutePercentage", r.MaxReroutePercentage) + populate(objectMap, "minReroutePercentage", r.MinReroutePercentage) + populate(objectMap, "name", r.Name) + populate(objectMap, "reroutePercentage", r.ReroutePercentage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RampUpRule. +func (r *RampUpRule) 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 "actionHostName": + err = unpopulate(val, "ActionHostName", &r.ActionHostName) + delete(rawMsg, key) + case "changeDecisionCallbackUrl": + err = unpopulate(val, "ChangeDecisionCallbackURL", &r.ChangeDecisionCallbackURL) + delete(rawMsg, key) + case "changeIntervalInMinutes": + err = unpopulate(val, "ChangeIntervalInMinutes", &r.ChangeIntervalInMinutes) + delete(rawMsg, key) + case "changeStep": + err = unpopulate(val, "ChangeStep", &r.ChangeStep) + delete(rawMsg, key) + case "maxReroutePercentage": + err = unpopulate(val, "MaxReroutePercentage", &r.MaxReroutePercentage) + delete(rawMsg, key) + case "minReroutePercentage": + err = unpopulate(val, "MinReroutePercentage", &r.MinReroutePercentage) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "reroutePercentage": + err = unpopulate(val, "ReroutePercentage", &r.ReroutePercentage) + 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 Recommendation. +func (r Recommendation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Recommendation. +func (r *Recommendation) 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 "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + 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 RecommendationCollection. +func (r RecommendationCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendationCollection. +func (r *RecommendationCollection) 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 "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + 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 RecommendationProperties. +func (r RecommendationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "actionName", r.ActionName) + populate(objectMap, "bladeName", r.BladeName) + populate(objectMap, "categoryTags", r.CategoryTags) + populate(objectMap, "channels", r.Channels) + populateTimeRFC3339(objectMap, "creationTime", r.CreationTime) + populate(objectMap, "displayName", r.DisplayName) + populate(objectMap, "enabled", r.Enabled) + populateTimeRFC3339(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) + 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) + populate(objectMap, "states", r.States) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendationProperties. +func (r *RecommendationProperties) 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 "actionName": + err = unpopulate(val, "ActionName", &r.ActionName) + delete(rawMsg, key) + case "bladeName": + err = unpopulate(val, "BladeName", &r.BladeName) + delete(rawMsg, key) + case "categoryTags": + err = unpopulate(val, "CategoryTags", &r.CategoryTags) + delete(rawMsg, key) + case "channels": + err = unpopulate(val, "Channels", &r.Channels) + delete(rawMsg, key) + case "creationTime": + err = unpopulateTimeRFC3339(val, "CreationTime", &r.CreationTime) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &r.DisplayName) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &r.Enabled) + delete(rawMsg, key) + case "endTime": + err = unpopulateTimeRFC3339(val, "EndTime", &r.EndTime) + delete(rawMsg, key) + case "extensionName": + err = unpopulate(val, "ExtensionName", &r.ExtensionName) + delete(rawMsg, key) + case "forwardLink": + err = unpopulate(val, "ForwardLink", &r.ForwardLink) + delete(rawMsg, key) + case "isDynamic": + err = unpopulate(val, "IsDynamic", &r.IsDynamic) + delete(rawMsg, key) + case "level": + err = unpopulate(val, "Level", &r.Level) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &r.Message) + delete(rawMsg, key) + case "nextNotificationTime": + err = unpopulateTimeRFC3339(val, "NextNotificationTime", &r.NextNotificationTime) + delete(rawMsg, key) + case "notificationExpirationTime": + err = unpopulateTimeRFC3339(val, "NotificationExpirationTime", &r.NotificationExpirationTime) + delete(rawMsg, key) + case "notifiedTime": + err = unpopulateTimeRFC3339(val, "NotifiedTime", &r.NotifiedTime) + delete(rawMsg, key) + case "recommendationId": + err = unpopulate(val, "RecommendationID", &r.RecommendationID) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &r.ResourceID) + delete(rawMsg, key) + case "resourceScope": + err = unpopulate(val, "ResourceScope", &r.ResourceScope) + delete(rawMsg, key) + case "ruleName": + err = unpopulate(val, "RuleName", &r.RuleName) + delete(rawMsg, key) + case "score": + err = unpopulate(val, "Score", &r.Score) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, "StartTime", &r.StartTime) + delete(rawMsg, key) + case "states": + err = unpopulate(val, "States", &r.States) + 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 RecommendationRule. +func (r RecommendationRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendationRule. +func (r *RecommendationRule) 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 "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + 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 RecommendationRuleProperties. +func (r RecommendationRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "actionName", r.ActionName) + populate(objectMap, "bladeName", r.BladeName) + populate(objectMap, "categoryTags", r.CategoryTags) + populate(objectMap, "channels", r.Channels) + populate(objectMap, "description", r.Description) + populate(objectMap, "displayName", r.DisplayName) + 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) + populate(objectMap, "recommendationId", r.RecommendationID) + populate(objectMap, "recommendationName", r.RecommendationName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendationRuleProperties. +func (r *RecommendationRuleProperties) 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 "actionName": + err = unpopulate(val, "ActionName", &r.ActionName) + delete(rawMsg, key) + case "bladeName": + err = unpopulate(val, "BladeName", &r.BladeName) + delete(rawMsg, key) + case "categoryTags": + err = unpopulate(val, "CategoryTags", &r.CategoryTags) + delete(rawMsg, key) + case "channels": + err = unpopulate(val, "Channels", &r.Channels) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &r.DisplayName) + delete(rawMsg, key) + case "extensionName": + err = unpopulate(val, "ExtensionName", &r.ExtensionName) + delete(rawMsg, key) + case "forwardLink": + err = unpopulate(val, "ForwardLink", &r.ForwardLink) + delete(rawMsg, key) + case "isDynamic": + err = unpopulate(val, "IsDynamic", &r.IsDynamic) + delete(rawMsg, key) + case "level": + err = unpopulate(val, "Level", &r.Level) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &r.Message) + delete(rawMsg, key) + case "recommendationId": + err = unpopulate(val, "RecommendationID", &r.RecommendationID) + delete(rawMsg, key) + case "recommendationName": + err = unpopulate(val, "RecommendationName", &r.RecommendationName) + 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 RecurrenceSchedule. +func (r RecurrenceSchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "hours", r.Hours) + populate(objectMap, "minutes", r.Minutes) + populate(objectMap, "monthDays", r.MonthDays) + populate(objectMap, "monthlyOccurrences", r.MonthlyOccurrences) + populate(objectMap, "weekDays", r.WeekDays) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecurrenceSchedule. +func (r *RecurrenceSchedule) 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 "hours": + err = unpopulate(val, "Hours", &r.Hours) + delete(rawMsg, key) + case "minutes": + err = unpopulate(val, "Minutes", &r.Minutes) + delete(rawMsg, key) + case "monthDays": + err = unpopulate(val, "MonthDays", &r.MonthDays) + delete(rawMsg, key) + case "monthlyOccurrences": + err = unpopulate(val, "MonthlyOccurrences", &r.MonthlyOccurrences) + delete(rawMsg, key) + case "weekDays": + err = unpopulate(val, "WeekDays", &r.WeekDays) + 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 RecurrenceScheduleOccurrence. +func (r RecurrenceScheduleOccurrence) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "day", r.Day) + populate(objectMap, "occurrence", r.Occurrence) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecurrenceScheduleOccurrence. +func (r *RecurrenceScheduleOccurrence) 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 "day": + err = unpopulate(val, "Day", &r.Day) + delete(rawMsg, key) + case "occurrence": + err = unpopulate(val, "Occurrence", &r.Occurrence) + 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 RegenerateActionParameter. +func (r RegenerateActionParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "keyType", r.KeyType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegenerateActionParameter. +func (r *RegenerateActionParameter) 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 "keyType": + err = unpopulate(val, "KeyType", &r.KeyType) + 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 RegistryCredentials. +func (r RegistryCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "passwordSecretRef", r.PasswordSecretRef) + populate(objectMap, "server", r.Server) + populate(objectMap, "username", r.Username) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegistryCredentials. +func (r *RegistryCredentials) 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 "passwordSecretRef": + err = unpopulate(val, "PasswordSecretRef", &r.PasswordSecretRef) + delete(rawMsg, key) + case "server": + err = unpopulate(val, "Server", &r.Server) + delete(rawMsg, key) + case "username": + err = unpopulate(val, "Username", &r.Username) + 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 ReissueCertificateOrderRequest. +func (r ReissueCertificateOrderRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReissueCertificateOrderRequest. +func (r *ReissueCertificateOrderRequest) 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 "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + 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 ReissueCertificateOrderRequestProperties. +func (r ReissueCertificateOrderRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "csr", r.Csr) + populate(objectMap, "delayExistingRevokeInHours", r.DelayExistingRevokeInHours) + populate(objectMap, "isPrivateKeyExternal", r.IsPrivateKeyExternal) + populate(objectMap, "keySize", r.KeySize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReissueCertificateOrderRequestProperties. +func (r *ReissueCertificateOrderRequestProperties) 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 "csr": + err = unpopulate(val, "Csr", &r.Csr) + delete(rawMsg, key) + case "delayExistingRevokeInHours": + err = unpopulate(val, "DelayExistingRevokeInHours", &r.DelayExistingRevokeInHours) + delete(rawMsg, key) + case "isPrivateKeyExternal": + err = unpopulate(val, "IsPrivateKeyExternal", &r.IsPrivateKeyExternal) + delete(rawMsg, key) + case "keySize": + err = unpopulate(val, "KeySize", &r.KeySize) + 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 RelayServiceConnectionEntity. +func (r RelayServiceConnectionEntity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RelayServiceConnectionEntity. +func (r *RelayServiceConnectionEntity) 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 "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + 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 RelayServiceConnectionEntityProperties. +func (r RelayServiceConnectionEntityProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "biztalkUri", r.BiztalkURI) + populate(objectMap, "entityConnectionString", r.EntityConnectionString) + populate(objectMap, "entityName", r.EntityName) + populate(objectMap, "hostname", r.Hostname) + populate(objectMap, "port", r.Port) + populate(objectMap, "resourceConnectionString", r.ResourceConnectionString) + populate(objectMap, "resourceType", r.ResourceType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RelayServiceConnectionEntityProperties. +func (r *RelayServiceConnectionEntityProperties) 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 "biztalkUri": + err = unpopulate(val, "BiztalkURI", &r.BiztalkURI) + delete(rawMsg, key) + case "entityConnectionString": + err = unpopulate(val, "EntityConnectionString", &r.EntityConnectionString) + delete(rawMsg, key) + case "entityName": + err = unpopulate(val, "EntityName", &r.EntityName) + delete(rawMsg, key) + case "hostname": + err = unpopulate(val, "Hostname", &r.Hostname) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &r.Port) + delete(rawMsg, key) + case "resourceConnectionString": + err = unpopulate(val, "ResourceConnectionString", &r.ResourceConnectionString) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &r.ResourceType) + 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 RemotePrivateEndpointConnection. +func (r RemotePrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RemotePrivateEndpointConnection. +func (r *RemotePrivateEndpointConnection) 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 "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + 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 RemotePrivateEndpointConnectionARMResource. +func (r RemotePrivateEndpointConnectionARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RemotePrivateEndpointConnectionARMResource. +func (r *RemotePrivateEndpointConnectionARMResource) 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 "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + 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 RemotePrivateEndpointConnectionARMResourceProperties. +func (r RemotePrivateEndpointConnectionARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "ipAddresses", r.IPAddresses) + populate(objectMap, "privateEndpoint", r.PrivateEndpoint) + populate(objectMap, "privateLinkServiceConnectionState", r.PrivateLinkServiceConnectionState) + populate(objectMap, "provisioningState", r.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RemotePrivateEndpointConnectionARMResourceProperties. +func (r *RemotePrivateEndpointConnectionARMResourceProperties) 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 "ipAddresses": + err = unpopulate(val, "IPAddresses", &r.IPAddresses) + delete(rawMsg, key) + case "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &r.PrivateEndpoint) + delete(rawMsg, key) + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &r.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + 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 RemotePrivateEndpointConnectionProperties. +func (r RemotePrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "ipAddresses", r.IPAddresses) + populate(objectMap, "privateEndpoint", r.PrivateEndpoint) + populate(objectMap, "privateLinkServiceConnectionState", r.PrivateLinkServiceConnectionState) + populate(objectMap, "provisioningState", r.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RemotePrivateEndpointConnectionProperties. +func (r *RemotePrivateEndpointConnectionProperties) 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 "ipAddresses": + err = unpopulate(val, "IPAddresses", &r.IPAddresses) + delete(rawMsg, key) + case "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &r.PrivateEndpoint) + delete(rawMsg, key) + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &r.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + 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 Rendering. +func (r Rendering) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", r.Description) + populate(objectMap, "title", r.Title) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Rendering. +func (r *Rendering) 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 "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &r.Title) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + 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 RenewCertificateOrderRequest. +func (r RenewCertificateOrderRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RenewCertificateOrderRequest. +func (r *RenewCertificateOrderRequest) 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 "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + 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 RenewCertificateOrderRequestProperties. +func (r RenewCertificateOrderRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "csr", r.Csr) + populate(objectMap, "isPrivateKeyExternal", r.IsPrivateKeyExternal) + populate(objectMap, "keySize", r.KeySize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RenewCertificateOrderRequestProperties. +func (r *RenewCertificateOrderRequestProperties) 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 "csr": + err = unpopulate(val, "Csr", &r.Csr) + delete(rawMsg, key) + case "isPrivateKeyExternal": + err = unpopulate(val, "IsPrivateKeyExternal", &r.IsPrivateKeyExternal) + delete(rawMsg, key) + case "keySize": + err = unpopulate(val, "KeySize", &r.KeySize) + 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 RepetitionIndex. +func (r RepetitionIndex) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "itemIndex", r.ItemIndex) + populate(objectMap, "scopeName", r.ScopeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RepetitionIndex. +func (r *RepetitionIndex) 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 "itemIndex": + err = unpopulate(val, "ItemIndex", &r.ItemIndex) + delete(rawMsg, key) + case "scopeName": + err = unpopulate(val, "ScopeName", &r.ScopeName) + 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 Request. +func (r Request) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "headers", &r.Headers) + populate(objectMap, "method", r.Method) + populate(objectMap, "uri", r.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Request. +func (r *Request) 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 "headers": + err = unpopulate(val, "Headers", &r.Headers) + delete(rawMsg, key) + case "method": + err = unpopulate(val, "Method", &r.Method) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &r.URI) + 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 RequestHistory. +func (r RequestHistory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RequestHistory. +func (r *RequestHistory) 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 "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + 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 RequestHistoryListResult. +func (r RequestHistoryListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RequestHistoryListResult. +func (r *RequestHistoryListResult) 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 "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + 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 RequestHistoryProperties. +func (r RequestHistoryProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populateTimeRFC3339(objectMap, "endTime", r.EndTime) + populate(objectMap, "request", r.Request) + populate(objectMap, "response", r.Response) + populateTimeRFC3339(objectMap, "startTime", r.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RequestHistoryProperties. +func (r *RequestHistoryProperties) 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 "endTime": + err = unpopulateTimeRFC3339(val, "EndTime", &r.EndTime) + delete(rawMsg, key) + case "request": + err = unpopulate(val, "Request", &r.Request) + delete(rawMsg, key) + case "response": + err = unpopulate(val, "Response", &r.Response) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, "StartTime", &r.StartTime) + 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 RequestsBasedTrigger. +func (r RequestsBasedTrigger) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "count", r.Count) + populate(objectMap, "timeInterval", r.TimeInterval) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RequestsBasedTrigger. +func (r *RequestsBasedTrigger) 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 "count": + err = unpopulate(val, "Count", &r.Count) + delete(rawMsg, key) + case "timeInterval": + err = unpopulate(val, "TimeInterval", &r.TimeInterval) + 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 Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Resource. +func (r *Resource) 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 "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + 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 ResourceCollection. +func (r ResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceCollection. +func (r *ResourceCollection) 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 "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + 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]interface{}) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceHealthMetadata. +func (r *ResourceHealthMetadata) 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 "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + 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 ResourceHealthMetadataCollection. +func (r ResourceHealthMetadataCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceHealthMetadataCollection. +func (r *ResourceHealthMetadataCollection) 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 "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + 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 ResourceHealthMetadataProperties. +func (r ResourceHealthMetadataProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "category", r.Category) + populate(objectMap, "signalAvailability", r.SignalAvailability) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceHealthMetadataProperties. +func (r *ResourceHealthMetadataProperties) 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 "category": + err = unpopulate(val, "Category", &r.Category) + delete(rawMsg, key) + case "signalAvailability": + err = unpopulate(val, "SignalAvailability", &r.SignalAvailability) + 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 ResourceMetricAvailability. +func (r ResourceMetricAvailability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "retention", r.Retention) + populate(objectMap, "timeGrain", r.TimeGrain) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceMetricAvailability. +func (r *ResourceMetricAvailability) 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 "retention": + err = unpopulate(val, "Retention", &r.Retention) + delete(rawMsg, key) + case "timeGrain": + err = unpopulate(val, "TimeGrain", &r.TimeGrain) + 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 ResourceMetricDefinition. +func (r ResourceMetricDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceMetricDefinition. +func (r *ResourceMetricDefinition) 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 "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + 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 ResourceMetricDefinitionCollection. +func (r ResourceMetricDefinitionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceMetricDefinitionCollection. +func (r *ResourceMetricDefinitionCollection) 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 "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + 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 ResourceMetricDefinitionProperties. +func (r ResourceMetricDefinitionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "metricAvailabilities", r.MetricAvailabilities) + populate(objectMap, "primaryAggregationType", r.PrimaryAggregationType) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "resourceUri", r.ResourceURI) + populate(objectMap, "unit", r.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceMetricDefinitionProperties. +func (r *ResourceMetricDefinitionProperties) 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 "metricAvailabilities": + err = unpopulate(val, "MetricAvailabilities", &r.MetricAvailabilities) + delete(rawMsg, key) + case "primaryAggregationType": + err = unpopulate(val, "PrimaryAggregationType", &r.PrimaryAggregationType) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "resourceUri": + err = unpopulate(val, "ResourceURI", &r.ResourceURI) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &r.Unit) + 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 ResourceNameAvailability. +func (r ResourceNameAvailability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "message", r.Message) + populate(objectMap, "nameAvailable", r.NameAvailable) + populate(objectMap, "reason", r.Reason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceNameAvailability. +func (r *ResourceNameAvailability) 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 "message": + err = unpopulate(val, "Message", &r.Message) + delete(rawMsg, key) + case "nameAvailable": + err = unpopulate(val, "NameAvailable", &r.NameAvailable) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &r.Reason) + 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 ResourceNameAvailabilityRequest. +func (r ResourceNameAvailabilityRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "isFqdn", r.IsFqdn) + populate(objectMap, "name", r.Name) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceNameAvailabilityRequest. +func (r *ResourceNameAvailabilityRequest) 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 "isFqdn": + err = unpopulate(val, "IsFqdn", &r.IsFqdn) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + 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 ResourceReference. +func (r ResourceReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceReference. +func (r *ResourceReference) 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 "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + 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 Response. +func (r Response) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "bodyLink", r.BodyLink) + populate(objectMap, "headers", &r.Headers) + populate(objectMap, "statusCode", r.StatusCode) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Response. +func (r *Response) 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 "bodyLink": + err = unpopulate(val, "BodyLink", &r.BodyLink) + delete(rawMsg, key) + case "headers": + err = unpopulate(val, "Headers", &r.Headers) + delete(rawMsg, key) + case "statusCode": + err = unpopulate(val, "StatusCode", &r.StatusCode) + 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 ResponseMessageEnvelopeRemotePrivateEndpointConnection. +func (r ResponseMessageEnvelopeRemotePrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "error", r.Error) + populate(objectMap, "id", r.ID) + populate(objectMap, "identity", r.Identity) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "plan", r.Plan) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "sku", r.SKU) + populate(objectMap, "status", r.Status) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + populate(objectMap, "zones", r.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResponseMessageEnvelopeRemotePrivateEndpointConnection. +func (r *ResponseMessageEnvelopeRemotePrivateEndpointConnection) 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 "error": + err = unpopulate(val, "Error", &r.Error) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &r.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "plan": + err = unpopulate(val, "Plan", &r.Plan) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &r.SKU) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &r.Status) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &r.Zones) + 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 ResponseMetaData. +func (r ResponseMetaData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "dataSource", r.DataSource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResponseMetaData. +func (r *ResponseMetaData) 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 "dataSource": + err = unpopulate(val, "DataSource", &r.DataSource) + 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 RestoreRequest. +func (r RestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestoreRequest. +func (r *RestoreRequest) 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 "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + 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 RestoreRequestProperties. +func (r RestoreRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "adjustConnectionStrings", r.AdjustConnectionStrings) + populate(objectMap, "appServicePlan", r.AppServicePlan) + populate(objectMap, "blobName", r.BlobName) + populate(objectMap, "databases", r.Databases) + populate(objectMap, "hostingEnvironment", r.HostingEnvironment) + populate(objectMap, "ignoreConflictingHostNames", r.IgnoreConflictingHostNames) + populate(objectMap, "ignoreDatabases", r.IgnoreDatabases) + populate(objectMap, "operationType", r.OperationType) + populate(objectMap, "overwrite", r.Overwrite) + populate(objectMap, "siteName", r.SiteName) + populate(objectMap, "storageAccountUrl", r.StorageAccountURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestoreRequestProperties. +func (r *RestoreRequestProperties) 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 "adjustConnectionStrings": + err = unpopulate(val, "AdjustConnectionStrings", &r.AdjustConnectionStrings) + delete(rawMsg, key) + case "appServicePlan": + err = unpopulate(val, "AppServicePlan", &r.AppServicePlan) + delete(rawMsg, key) + case "blobName": + err = unpopulate(val, "BlobName", &r.BlobName) + delete(rawMsg, key) + case "databases": + err = unpopulate(val, "Databases", &r.Databases) + delete(rawMsg, key) + case "hostingEnvironment": + err = unpopulate(val, "HostingEnvironment", &r.HostingEnvironment) + delete(rawMsg, key) + case "ignoreConflictingHostNames": + err = unpopulate(val, "IgnoreConflictingHostNames", &r.IgnoreConflictingHostNames) + delete(rawMsg, key) + case "ignoreDatabases": + err = unpopulate(val, "IgnoreDatabases", &r.IgnoreDatabases) + delete(rawMsg, key) + case "operationType": + err = unpopulate(val, "OperationType", &r.OperationType) + delete(rawMsg, key) + case "overwrite": + err = unpopulate(val, "Overwrite", &r.Overwrite) + delete(rawMsg, key) + case "siteName": + err = unpopulate(val, "SiteName", &r.SiteName) + delete(rawMsg, key) + case "storageAccountUrl": + err = unpopulate(val, "StorageAccountURL", &r.StorageAccountURL) + 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 RetryHistory. +func (r RetryHistory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "clientRequestId", r.ClientRequestID) + populate(objectMap, "code", r.Code) + populateTimeRFC3339(objectMap, "endTime", r.EndTime) + populate(objectMap, "error", r.Error) + populate(objectMap, "serviceRequestId", r.ServiceRequestID) + populateTimeRFC3339(objectMap, "startTime", r.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RetryHistory. +func (r *RetryHistory) 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 "clientRequestId": + err = unpopulate(val, "ClientRequestID", &r.ClientRequestID) + delete(rawMsg, key) + case "code": + err = unpopulate(val, "Code", &r.Code) + delete(rawMsg, key) + case "endTime": + err = unpopulateTimeRFC3339(val, "EndTime", &r.EndTime) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &r.Error) + delete(rawMsg, key) + case "serviceRequestId": + err = unpopulate(val, "ServiceRequestID", &r.ServiceRequestID) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, "StartTime", &r.StartTime) + 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 Revision. +func (r Revision) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Revision. +func (r *Revision) 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 "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + 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 RevisionCollection. +func (r RevisionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RevisionCollection. +func (r *RevisionCollection) 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 "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + 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 RevisionProperties. +func (r RevisionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "active", r.Active) + populateTimeRFC3339(objectMap, "createdTime", r.CreatedTime) + populate(objectMap, "fqdn", r.Fqdn) + populate(objectMap, "healthState", r.HealthState) + populate(objectMap, "provisioningError", r.ProvisioningError) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "replicas", r.Replicas) + populate(objectMap, "template", r.Template) + populate(objectMap, "trafficWeight", r.TrafficWeight) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RevisionProperties. +func (r *RevisionProperties) 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 "active": + err = unpopulate(val, "Active", &r.Active) + delete(rawMsg, key) + case "createdTime": + err = unpopulateTimeRFC3339(val, "CreatedTime", &r.CreatedTime) + delete(rawMsg, key) + case "fqdn": + err = unpopulate(val, "Fqdn", &r.Fqdn) + delete(rawMsg, key) + case "healthState": + err = unpopulate(val, "HealthState", &r.HealthState) + delete(rawMsg, key) + case "provisioningError": + err = unpopulate(val, "ProvisioningError", &r.ProvisioningError) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + case "replicas": + err = unpopulate(val, "Replicas", &r.Replicas) + delete(rawMsg, key) + case "template": + err = unpopulate(val, "Template", &r.Template) + delete(rawMsg, key) + case "trafficWeight": + err = unpopulate(val, "TrafficWeight", &r.TrafficWeight) + 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 RunActionCorrelation. +func (r RunActionCorrelation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "actionTrackingId", r.ActionTrackingID) + populate(objectMap, "clientKeywords", r.ClientKeywords) + populate(objectMap, "clientTrackingId", r.ClientTrackingID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RunActionCorrelation. +func (r *RunActionCorrelation) 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 "actionTrackingId": + err = unpopulate(val, "ActionTrackingID", &r.ActionTrackingID) + delete(rawMsg, key) + case "clientKeywords": + err = unpopulate(val, "ClientKeywords", &r.ClientKeywords) + delete(rawMsg, key) + case "clientTrackingId": + err = unpopulate(val, "ClientTrackingID", &r.ClientTrackingID) + 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 RunCorrelation. +func (r RunCorrelation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "clientKeywords", r.ClientKeywords) + populate(objectMap, "clientTrackingId", r.ClientTrackingID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RunCorrelation. +func (r *RunCorrelation) 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 "clientKeywords": + err = unpopulate(val, "ClientKeywords", &r.ClientKeywords) + delete(rawMsg, key) + case "clientTrackingId": + err = unpopulate(val, "ClientTrackingID", &r.ClientTrackingID) + 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 SKUCapacity. +func (s SKUCapacity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "default", s.Default) + populate(objectMap, "elasticMaximum", s.ElasticMaximum) + populate(objectMap, "maximum", s.Maximum) + populate(objectMap, "minimum", s.Minimum) + populate(objectMap, "scaleType", s.ScaleType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapacity. +func (s *SKUCapacity) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "default": + err = unpopulate(val, "Default", &s.Default) + delete(rawMsg, key) + case "elasticMaximum": + err = unpopulate(val, "ElasticMaximum", &s.ElasticMaximum) + delete(rawMsg, key) + case "maximum": + err = unpopulate(val, "Maximum", &s.Maximum) + delete(rawMsg, key) + case "minimum": + err = unpopulate(val, "Minimum", &s.Minimum) + delete(rawMsg, key) + case "scaleType": + err = unpopulate(val, "ScaleType", &s.ScaleType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUDescription. +func (s SKUDescription) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "capabilities", s.Capabilities) + populate(objectMap, "capacity", s.Capacity) + populate(objectMap, "family", s.Family) + populate(objectMap, "locations", s.Locations) + populate(objectMap, "name", s.Name) + populate(objectMap, "skuCapacity", s.SKUCapacity) + populate(objectMap, "size", s.Size) + populate(objectMap, "tier", s.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUDescription. +func (s *SKUDescription) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capabilities": + err = unpopulate(val, "Capabilities", &s.Capabilities) + delete(rawMsg, key) + case "capacity": + err = unpopulate(val, "Capacity", &s.Capacity) + delete(rawMsg, key) + case "family": + err = unpopulate(val, "Family", &s.Family) + delete(rawMsg, key) + case "locations": + err = unpopulate(val, "Locations", &s.Locations) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "skuCapacity": + err = unpopulate(val, "SKUCapacity", &s.SKUCapacity) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &s.Size) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &s.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUInfo. +func (s SKUInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "capacity", s.Capacity) + populate(objectMap, "resourceType", s.ResourceType) + populate(objectMap, "sku", s.SKU) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUInfo. +func (s *SKUInfo) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &s.Capacity) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &s.ResourceType) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &s.SKU) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUInfoCollection. +func (s SKUInfoCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUInfoCollection. +func (s *SKUInfoCollection) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUInfos. +func (s SKUInfos) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "resourceType", s.ResourceType) + populate(objectMap, "skus", s.SKUs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUInfos. +func (s *SKUInfos) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceType": + err = unpopulate(val, "ResourceType", &s.ResourceType) + delete(rawMsg, key) + case "skus": + err = unpopulate(val, "SKUs", &s.SKUs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SampleUtterance. +func (s SampleUtterance) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "links", s.Links) + populate(objectMap, "qid", s.Qid) + populate(objectMap, "text", s.Text) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SampleUtterance. +func (s *SampleUtterance) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "links": + err = unpopulate(val, "Links", &s.Links) + delete(rawMsg, key) + case "qid": + err = unpopulate(val, "Qid", &s.Qid) + delete(rawMsg, key) + case "text": + err = unpopulate(val, "Text", &s.Text) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Scale. +func (s Scale) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "maxReplicas", s.MaxReplicas) + populate(objectMap, "minReplicas", s.MinReplicas) + populate(objectMap, "rules", s.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Scale. +func (s *Scale) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxReplicas": + err = unpopulate(val, "MaxReplicas", &s.MaxReplicas) + delete(rawMsg, key) + case "minReplicas": + err = unpopulate(val, "MinReplicas", &s.MinReplicas) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &s.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScaleRule. +func (s ScaleRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "azureQueue", s.AzureQueue) + populate(objectMap, "custom", s.Custom) + populate(objectMap, "http", s.HTTP) + populate(objectMap, "name", s.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScaleRule. +func (s *ScaleRule) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureQueue": + err = unpopulate(val, "AzureQueue", &s.AzureQueue) + delete(rawMsg, key) + case "custom": + err = unpopulate(val, "Custom", &s.Custom) + delete(rawMsg, key) + case "http": + err = unpopulate(val, "HTTP", &s.HTTP) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScaleRuleAuth. +func (s ScaleRuleAuth) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "secretRef", s.SecretRef) + populate(objectMap, "triggerParameter", s.TriggerParameter) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScaleRuleAuth. +func (s *ScaleRuleAuth) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "secretRef": + err = unpopulate(val, "SecretRef", &s.SecretRef) + delete(rawMsg, key) + case "triggerParameter": + err = unpopulate(val, "TriggerParameter", &s.TriggerParameter) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Secret. +func (s Secret) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "name", s.Name) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Secret. +func (s *Secret) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecretsCollection. +func (s SecretsCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecretsCollection. +func (s *SecretsCollection) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceSpecification. +func (s ServiceSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "logSpecifications", s.LogSpecifications) + populate(objectMap, "metricSpecifications", s.MetricSpecifications) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification. +func (s *ServiceSpecification) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logSpecifications": + err = unpopulate(val, "LogSpecifications", &s.LogSpecifications) + delete(rawMsg, key) + case "metricSpecifications": + err = unpopulate(val, "MetricSpecifications", &s.MetricSpecifications) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Site. +func (s Site) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "extendedLocation", s.ExtendedLocation) + populate(objectMap, "id", s.ID) + populate(objectMap, "identity", s.Identity) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Site. +func (s *Site) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &s.ExtendedLocation) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &s.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteAuthSettings. +func (s SiteAuthSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteAuthSettings. +func (s *SiteAuthSettings) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteAuthSettingsProperties. +func (s SiteAuthSettingsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "aadClaimsAuthorization", s.AADClaimsAuthorization) + populate(objectMap, "additionalLoginParams", s.AdditionalLoginParams) + populate(objectMap, "allowedAudiences", s.AllowedAudiences) + populate(objectMap, "allowedExternalRedirectUrls", s.AllowedExternalRedirectUrls) + populate(objectMap, "authFilePath", s.AuthFilePath) + populate(objectMap, "clientId", s.ClientID) + populate(objectMap, "clientSecret", s.ClientSecret) + populate(objectMap, "clientSecretCertificateThumbprint", s.ClientSecretCertificateThumbprint) + populate(objectMap, "clientSecretSettingName", s.ClientSecretSettingName) + populate(objectMap, "configVersion", s.ConfigVersion) + populate(objectMap, "defaultProvider", s.DefaultProvider) + populate(objectMap, "enabled", s.Enabled) + populate(objectMap, "facebookAppId", s.FacebookAppID) + populate(objectMap, "facebookAppSecret", s.FacebookAppSecret) + populate(objectMap, "facebookAppSecretSettingName", s.FacebookAppSecretSettingName) + populate(objectMap, "facebookOAuthScopes", s.FacebookOAuthScopes) + populate(objectMap, "gitHubClientId", s.GitHubClientID) + populate(objectMap, "gitHubClientSecret", s.GitHubClientSecret) + populate(objectMap, "gitHubClientSecretSettingName", s.GitHubClientSecretSettingName) + populate(objectMap, "gitHubOAuthScopes", s.GitHubOAuthScopes) + populate(objectMap, "googleClientId", s.GoogleClientID) + populate(objectMap, "googleClientSecret", s.GoogleClientSecret) + populate(objectMap, "googleClientSecretSettingName", s.GoogleClientSecretSettingName) + populate(objectMap, "googleOAuthScopes", s.GoogleOAuthScopes) + populate(objectMap, "isAuthFromFile", s.IsAuthFromFile) + populate(objectMap, "issuer", s.Issuer) + populate(objectMap, "microsoftAccountClientId", s.MicrosoftAccountClientID) + populate(objectMap, "microsoftAccountClientSecret", s.MicrosoftAccountClientSecret) + populate(objectMap, "microsoftAccountClientSecretSettingName", s.MicrosoftAccountClientSecretSettingName) + populate(objectMap, "microsoftAccountOAuthScopes", s.MicrosoftAccountOAuthScopes) + populate(objectMap, "runtimeVersion", s.RuntimeVersion) + populate(objectMap, "tokenRefreshExtensionHours", s.TokenRefreshExtensionHours) + populate(objectMap, "tokenStoreEnabled", s.TokenStoreEnabled) + populate(objectMap, "twitterConsumerKey", s.TwitterConsumerKey) + populate(objectMap, "twitterConsumerSecret", s.TwitterConsumerSecret) + populate(objectMap, "twitterConsumerSecretSettingName", s.TwitterConsumerSecretSettingName) + populate(objectMap, "unauthenticatedClientAction", s.UnauthenticatedClientAction) + populate(objectMap, "validateIssuer", s.ValidateIssuer) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteAuthSettingsProperties. +func (s *SiteAuthSettingsProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aadClaimsAuthorization": + err = unpopulate(val, "AADClaimsAuthorization", &s.AADClaimsAuthorization) + delete(rawMsg, key) + case "additionalLoginParams": + err = unpopulate(val, "AdditionalLoginParams", &s.AdditionalLoginParams) + delete(rawMsg, key) + case "allowedAudiences": + err = unpopulate(val, "AllowedAudiences", &s.AllowedAudiences) + delete(rawMsg, key) + case "allowedExternalRedirectUrls": + err = unpopulate(val, "AllowedExternalRedirectUrls", &s.AllowedExternalRedirectUrls) + delete(rawMsg, key) + case "authFilePath": + err = unpopulate(val, "AuthFilePath", &s.AuthFilePath) + delete(rawMsg, key) + case "clientId": + err = unpopulate(val, "ClientID", &s.ClientID) + delete(rawMsg, key) + case "clientSecret": + err = unpopulate(val, "ClientSecret", &s.ClientSecret) + delete(rawMsg, key) + case "clientSecretCertificateThumbprint": + err = unpopulate(val, "ClientSecretCertificateThumbprint", &s.ClientSecretCertificateThumbprint) + delete(rawMsg, key) + case "clientSecretSettingName": + err = unpopulate(val, "ClientSecretSettingName", &s.ClientSecretSettingName) + delete(rawMsg, key) + case "configVersion": + err = unpopulate(val, "ConfigVersion", &s.ConfigVersion) + delete(rawMsg, key) + case "defaultProvider": + err = unpopulate(val, "DefaultProvider", &s.DefaultProvider) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &s.Enabled) + delete(rawMsg, key) + case "facebookAppId": + err = unpopulate(val, "FacebookAppID", &s.FacebookAppID) + delete(rawMsg, key) + case "facebookAppSecret": + err = unpopulate(val, "FacebookAppSecret", &s.FacebookAppSecret) + delete(rawMsg, key) + case "facebookAppSecretSettingName": + err = unpopulate(val, "FacebookAppSecretSettingName", &s.FacebookAppSecretSettingName) + delete(rawMsg, key) + case "facebookOAuthScopes": + err = unpopulate(val, "FacebookOAuthScopes", &s.FacebookOAuthScopes) + delete(rawMsg, key) + case "gitHubClientId": + err = unpopulate(val, "GitHubClientID", &s.GitHubClientID) + delete(rawMsg, key) + case "gitHubClientSecret": + err = unpopulate(val, "GitHubClientSecret", &s.GitHubClientSecret) + delete(rawMsg, key) + case "gitHubClientSecretSettingName": + err = unpopulate(val, "GitHubClientSecretSettingName", &s.GitHubClientSecretSettingName) + delete(rawMsg, key) + case "gitHubOAuthScopes": + err = unpopulate(val, "GitHubOAuthScopes", &s.GitHubOAuthScopes) + delete(rawMsg, key) + case "googleClientId": + err = unpopulate(val, "GoogleClientID", &s.GoogleClientID) + delete(rawMsg, key) + case "googleClientSecret": + err = unpopulate(val, "GoogleClientSecret", &s.GoogleClientSecret) + delete(rawMsg, key) + case "googleClientSecretSettingName": + err = unpopulate(val, "GoogleClientSecretSettingName", &s.GoogleClientSecretSettingName) + delete(rawMsg, key) + case "googleOAuthScopes": + err = unpopulate(val, "GoogleOAuthScopes", &s.GoogleOAuthScopes) + delete(rawMsg, key) + case "isAuthFromFile": + err = unpopulate(val, "IsAuthFromFile", &s.IsAuthFromFile) + delete(rawMsg, key) + case "issuer": + err = unpopulate(val, "Issuer", &s.Issuer) + delete(rawMsg, key) + case "microsoftAccountClientId": + err = unpopulate(val, "MicrosoftAccountClientID", &s.MicrosoftAccountClientID) + delete(rawMsg, key) + case "microsoftAccountClientSecret": + err = unpopulate(val, "MicrosoftAccountClientSecret", &s.MicrosoftAccountClientSecret) + delete(rawMsg, key) + case "microsoftAccountClientSecretSettingName": + err = unpopulate(val, "MicrosoftAccountClientSecretSettingName", &s.MicrosoftAccountClientSecretSettingName) + delete(rawMsg, key) + case "microsoftAccountOAuthScopes": + err = unpopulate(val, "MicrosoftAccountOAuthScopes", &s.MicrosoftAccountOAuthScopes) + delete(rawMsg, key) + case "runtimeVersion": + err = unpopulate(val, "RuntimeVersion", &s.RuntimeVersion) + delete(rawMsg, key) + case "tokenRefreshExtensionHours": + err = unpopulate(val, "TokenRefreshExtensionHours", &s.TokenRefreshExtensionHours) + delete(rawMsg, key) + case "tokenStoreEnabled": + err = unpopulate(val, "TokenStoreEnabled", &s.TokenStoreEnabled) + delete(rawMsg, key) + case "twitterConsumerKey": + err = unpopulate(val, "TwitterConsumerKey", &s.TwitterConsumerKey) + delete(rawMsg, key) + case "twitterConsumerSecret": + err = unpopulate(val, "TwitterConsumerSecret", &s.TwitterConsumerSecret) + delete(rawMsg, key) + case "twitterConsumerSecretSettingName": + err = unpopulate(val, "TwitterConsumerSecretSettingName", &s.TwitterConsumerSecretSettingName) + delete(rawMsg, key) + case "unauthenticatedClientAction": + err = unpopulate(val, "UnauthenticatedClientAction", &s.UnauthenticatedClientAction) + delete(rawMsg, key) + case "validateIssuer": + err = unpopulate(val, "ValidateIssuer", &s.ValidateIssuer) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteAuthSettingsV2. +func (s SiteAuthSettingsV2) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteAuthSettingsV2. +func (s *SiteAuthSettingsV2) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteAuthSettingsV2Properties. +func (s SiteAuthSettingsV2Properties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "globalValidation", s.GlobalValidation) + populate(objectMap, "httpSettings", s.HTTPSettings) + populate(objectMap, "identityProviders", s.IdentityProviders) + populate(objectMap, "login", s.Login) + populate(objectMap, "platform", s.Platform) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteAuthSettingsV2Properties. +func (s *SiteAuthSettingsV2Properties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "globalValidation": + err = unpopulate(val, "GlobalValidation", &s.GlobalValidation) + delete(rawMsg, key) + case "httpSettings": + err = unpopulate(val, "HTTPSettings", &s.HTTPSettings) + delete(rawMsg, key) + case "identityProviders": + err = unpopulate(val, "IdentityProviders", &s.IdentityProviders) + delete(rawMsg, key) + case "login": + err = unpopulate(val, "Login", &s.Login) + delete(rawMsg, key) + case "platform": + err = unpopulate(val, "Platform", &s.Platform) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteCloneability. +func (s SiteCloneability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "blockingCharacteristics", s.BlockingCharacteristics) + populate(objectMap, "blockingFeatures", s.BlockingFeatures) + populate(objectMap, "result", s.Result) + populate(objectMap, "unsupportedFeatures", s.UnsupportedFeatures) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteCloneability. +func (s *SiteCloneability) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blockingCharacteristics": + err = unpopulate(val, "BlockingCharacteristics", &s.BlockingCharacteristics) + delete(rawMsg, key) + case "blockingFeatures": + err = unpopulate(val, "BlockingFeatures", &s.BlockingFeatures) + delete(rawMsg, key) + case "result": + err = unpopulate(val, "Result", &s.Result) + delete(rawMsg, key) + case "unsupportedFeatures": + err = unpopulate(val, "UnsupportedFeatures", &s.UnsupportedFeatures) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteCloneabilityCriterion. +func (s SiteCloneabilityCriterion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", s.Description) + populate(objectMap, "name", s.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteCloneabilityCriterion. +func (s *SiteCloneabilityCriterion) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteConfig. +func (s SiteConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "apiDefinition", s.APIDefinition) + populate(objectMap, "apiManagementConfig", s.APIManagementConfig) + populate(objectMap, "acrUseManagedIdentityCreds", s.AcrUseManagedIdentityCreds) + populate(objectMap, "acrUserManagedIdentityID", s.AcrUserManagedIdentityID) + populate(objectMap, "alwaysOn", s.AlwaysOn) + populate(objectMap, "appCommandLine", s.AppCommandLine) + populate(objectMap, "appSettings", s.AppSettings) + populate(objectMap, "autoHealEnabled", s.AutoHealEnabled) + populate(objectMap, "autoHealRules", s.AutoHealRules) + populate(objectMap, "autoSwapSlotName", s.AutoSwapSlotName) + populate(objectMap, "azureStorageAccounts", s.AzureStorageAccounts) + populate(objectMap, "connectionStrings", s.ConnectionStrings) + populate(objectMap, "cors", s.Cors) + populate(objectMap, "defaultDocuments", s.DefaultDocuments) + populate(objectMap, "detailedErrorLoggingEnabled", s.DetailedErrorLoggingEnabled) + populate(objectMap, "documentRoot", s.DocumentRoot) + populate(objectMap, "experiments", s.Experiments) + populate(objectMap, "ftpsState", s.FtpsState) + populate(objectMap, "functionAppScaleLimit", s.FunctionAppScaleLimit) + populate(objectMap, "functionsRuntimeScaleMonitoringEnabled", s.FunctionsRuntimeScaleMonitoringEnabled) + populate(objectMap, "httpLoggingEnabled", s.HTTPLoggingEnabled) + populate(objectMap, "handlerMappings", s.HandlerMappings) + populate(objectMap, "healthCheckPath", s.HealthCheckPath) + populate(objectMap, "http20Enabled", s.Http20Enabled) + populate(objectMap, "ipSecurityRestrictions", s.IPSecurityRestrictions) + populate(objectMap, "javaContainer", s.JavaContainer) + populate(objectMap, "javaContainerVersion", s.JavaContainerVersion) + populate(objectMap, "javaVersion", s.JavaVersion) + populate(objectMap, "keyVaultReferenceIdentity", s.KeyVaultReferenceIdentity) + populate(objectMap, "limits", s.Limits) + populate(objectMap, "linuxFxVersion", s.LinuxFxVersion) + populate(objectMap, "loadBalancing", s.LoadBalancing) + populate(objectMap, "localMySqlEnabled", s.LocalMySQLEnabled) + populate(objectMap, "logsDirectorySizeLimit", s.LogsDirectorySizeLimit) + populate(objectMap, "machineKey", s.MachineKey) + populate(objectMap, "managedPipelineMode", s.ManagedPipelineMode) + populate(objectMap, "managedServiceIdentityId", s.ManagedServiceIdentityID) + populate(objectMap, "minTlsVersion", s.MinTLSVersion) + populate(objectMap, "minimumElasticInstanceCount", s.MinimumElasticInstanceCount) + populate(objectMap, "netFrameworkVersion", s.NetFrameworkVersion) + populate(objectMap, "nodeVersion", s.NodeVersion) + populate(objectMap, "numberOfWorkers", s.NumberOfWorkers) + populate(objectMap, "phpVersion", s.PhpVersion) + populate(objectMap, "powerShellVersion", s.PowerShellVersion) + populate(objectMap, "preWarmedInstanceCount", s.PreWarmedInstanceCount) + populate(objectMap, "publicNetworkAccess", s.PublicNetworkAccess) + populate(objectMap, "publishingUsername", s.PublishingUsername) + populate(objectMap, "push", s.Push) + populate(objectMap, "pythonVersion", s.PythonVersion) + populate(objectMap, "remoteDebuggingEnabled", s.RemoteDebuggingEnabled) + populate(objectMap, "remoteDebuggingVersion", s.RemoteDebuggingVersion) + populate(objectMap, "requestTracingEnabled", s.RequestTracingEnabled) + populateTimeRFC3339(objectMap, "requestTracingExpirationTime", s.RequestTracingExpirationTime) + populate(objectMap, "scmIpSecurityRestrictions", s.ScmIPSecurityRestrictions) + populate(objectMap, "scmIpSecurityRestrictionsUseMain", s.ScmIPSecurityRestrictionsUseMain) + populate(objectMap, "scmMinTlsVersion", s.ScmMinTLSVersion) + populate(objectMap, "scmType", s.ScmType) + populate(objectMap, "tracingOptions", s.TracingOptions) + populate(objectMap, "use32BitWorkerProcess", s.Use32BitWorkerProcess) + populate(objectMap, "virtualApplications", s.VirtualApplications) + populate(objectMap, "vnetName", s.VnetName) + populate(objectMap, "vnetPrivatePortsCount", s.VnetPrivatePortsCount) + populate(objectMap, "vnetRouteAllEnabled", s.VnetRouteAllEnabled) + populate(objectMap, "webSocketsEnabled", s.WebSocketsEnabled) + populate(objectMap, "websiteTimeZone", s.WebsiteTimeZone) + populate(objectMap, "windowsFxVersion", s.WindowsFxVersion) + populate(objectMap, "xManagedServiceIdentityId", s.XManagedServiceIdentityID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteConfig. +func (s *SiteConfig) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiDefinition": + err = unpopulate(val, "APIDefinition", &s.APIDefinition) + delete(rawMsg, key) + case "apiManagementConfig": + err = unpopulate(val, "APIManagementConfig", &s.APIManagementConfig) + delete(rawMsg, key) + case "acrUseManagedIdentityCreds": + err = unpopulate(val, "AcrUseManagedIdentityCreds", &s.AcrUseManagedIdentityCreds) + delete(rawMsg, key) + case "acrUserManagedIdentityID": + err = unpopulate(val, "AcrUserManagedIdentityID", &s.AcrUserManagedIdentityID) + delete(rawMsg, key) + case "alwaysOn": + err = unpopulate(val, "AlwaysOn", &s.AlwaysOn) + delete(rawMsg, key) + case "appCommandLine": + err = unpopulate(val, "AppCommandLine", &s.AppCommandLine) + delete(rawMsg, key) + case "appSettings": + err = unpopulate(val, "AppSettings", &s.AppSettings) + delete(rawMsg, key) + case "autoHealEnabled": + err = unpopulate(val, "AutoHealEnabled", &s.AutoHealEnabled) + delete(rawMsg, key) + case "autoHealRules": + err = unpopulate(val, "AutoHealRules", &s.AutoHealRules) + delete(rawMsg, key) + case "autoSwapSlotName": + err = unpopulate(val, "AutoSwapSlotName", &s.AutoSwapSlotName) + delete(rawMsg, key) + case "azureStorageAccounts": + err = unpopulate(val, "AzureStorageAccounts", &s.AzureStorageAccounts) + delete(rawMsg, key) + case "connectionStrings": + err = unpopulate(val, "ConnectionStrings", &s.ConnectionStrings) + delete(rawMsg, key) + case "cors": + err = unpopulate(val, "Cors", &s.Cors) + delete(rawMsg, key) + case "defaultDocuments": + err = unpopulate(val, "DefaultDocuments", &s.DefaultDocuments) + delete(rawMsg, key) + case "detailedErrorLoggingEnabled": + err = unpopulate(val, "DetailedErrorLoggingEnabled", &s.DetailedErrorLoggingEnabled) + delete(rawMsg, key) + case "documentRoot": + err = unpopulate(val, "DocumentRoot", &s.DocumentRoot) + delete(rawMsg, key) + case "experiments": + err = unpopulate(val, "Experiments", &s.Experiments) + delete(rawMsg, key) + case "ftpsState": + err = unpopulate(val, "FtpsState", &s.FtpsState) + delete(rawMsg, key) + case "functionAppScaleLimit": + err = unpopulate(val, "FunctionAppScaleLimit", &s.FunctionAppScaleLimit) + delete(rawMsg, key) + case "functionsRuntimeScaleMonitoringEnabled": + err = unpopulate(val, "FunctionsRuntimeScaleMonitoringEnabled", &s.FunctionsRuntimeScaleMonitoringEnabled) + delete(rawMsg, key) + case "httpLoggingEnabled": + err = unpopulate(val, "HTTPLoggingEnabled", &s.HTTPLoggingEnabled) + delete(rawMsg, key) + case "handlerMappings": + err = unpopulate(val, "HandlerMappings", &s.HandlerMappings) + delete(rawMsg, key) + case "healthCheckPath": + err = unpopulate(val, "HealthCheckPath", &s.HealthCheckPath) + delete(rawMsg, key) + case "http20Enabled": + err = unpopulate(val, "Http20Enabled", &s.Http20Enabled) + delete(rawMsg, key) + case "ipSecurityRestrictions": + err = unpopulate(val, "IPSecurityRestrictions", &s.IPSecurityRestrictions) + delete(rawMsg, key) + case "javaContainer": + err = unpopulate(val, "JavaContainer", &s.JavaContainer) + delete(rawMsg, key) + case "javaContainerVersion": + err = unpopulate(val, "JavaContainerVersion", &s.JavaContainerVersion) + delete(rawMsg, key) + case "javaVersion": + err = unpopulate(val, "JavaVersion", &s.JavaVersion) + delete(rawMsg, key) + case "keyVaultReferenceIdentity": + err = unpopulate(val, "KeyVaultReferenceIdentity", &s.KeyVaultReferenceIdentity) + delete(rawMsg, key) + case "limits": + err = unpopulate(val, "Limits", &s.Limits) + delete(rawMsg, key) + case "linuxFxVersion": + err = unpopulate(val, "LinuxFxVersion", &s.LinuxFxVersion) + delete(rawMsg, key) + case "loadBalancing": + err = unpopulate(val, "LoadBalancing", &s.LoadBalancing) + delete(rawMsg, key) + case "localMySqlEnabled": + err = unpopulate(val, "LocalMySQLEnabled", &s.LocalMySQLEnabled) + delete(rawMsg, key) + case "logsDirectorySizeLimit": + err = unpopulate(val, "LogsDirectorySizeLimit", &s.LogsDirectorySizeLimit) + delete(rawMsg, key) + case "machineKey": + err = unpopulate(val, "MachineKey", &s.MachineKey) + delete(rawMsg, key) + case "managedPipelineMode": + err = unpopulate(val, "ManagedPipelineMode", &s.ManagedPipelineMode) + delete(rawMsg, key) + case "managedServiceIdentityId": + err = unpopulate(val, "ManagedServiceIdentityID", &s.ManagedServiceIdentityID) + delete(rawMsg, key) + case "minTlsVersion": + err = unpopulate(val, "MinTLSVersion", &s.MinTLSVersion) + delete(rawMsg, key) + case "minimumElasticInstanceCount": + err = unpopulate(val, "MinimumElasticInstanceCount", &s.MinimumElasticInstanceCount) + delete(rawMsg, key) + case "netFrameworkVersion": + err = unpopulate(val, "NetFrameworkVersion", &s.NetFrameworkVersion) + delete(rawMsg, key) + case "nodeVersion": + err = unpopulate(val, "NodeVersion", &s.NodeVersion) + delete(rawMsg, key) + case "numberOfWorkers": + err = unpopulate(val, "NumberOfWorkers", &s.NumberOfWorkers) + delete(rawMsg, key) + case "phpVersion": + err = unpopulate(val, "PhpVersion", &s.PhpVersion) + delete(rawMsg, key) + case "powerShellVersion": + err = unpopulate(val, "PowerShellVersion", &s.PowerShellVersion) + delete(rawMsg, key) + case "preWarmedInstanceCount": + err = unpopulate(val, "PreWarmedInstanceCount", &s.PreWarmedInstanceCount) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess) + delete(rawMsg, key) + case "publishingUsername": + err = unpopulate(val, "PublishingUsername", &s.PublishingUsername) + delete(rawMsg, key) + case "push": + err = unpopulate(val, "Push", &s.Push) + delete(rawMsg, key) + case "pythonVersion": + err = unpopulate(val, "PythonVersion", &s.PythonVersion) + delete(rawMsg, key) + case "remoteDebuggingEnabled": + err = unpopulate(val, "RemoteDebuggingEnabled", &s.RemoteDebuggingEnabled) + delete(rawMsg, key) + case "remoteDebuggingVersion": + err = unpopulate(val, "RemoteDebuggingVersion", &s.RemoteDebuggingVersion) + delete(rawMsg, key) + case "requestTracingEnabled": + err = unpopulate(val, "RequestTracingEnabled", &s.RequestTracingEnabled) + delete(rawMsg, key) + case "requestTracingExpirationTime": + err = unpopulateTimeRFC3339(val, "RequestTracingExpirationTime", &s.RequestTracingExpirationTime) + delete(rawMsg, key) + case "scmIpSecurityRestrictions": + err = unpopulate(val, "ScmIPSecurityRestrictions", &s.ScmIPSecurityRestrictions) + delete(rawMsg, key) + case "scmIpSecurityRestrictionsUseMain": + err = unpopulate(val, "ScmIPSecurityRestrictionsUseMain", &s.ScmIPSecurityRestrictionsUseMain) + delete(rawMsg, key) + case "scmMinTlsVersion": + err = unpopulate(val, "ScmMinTLSVersion", &s.ScmMinTLSVersion) + delete(rawMsg, key) + case "scmType": + err = unpopulate(val, "ScmType", &s.ScmType) + delete(rawMsg, key) + case "tracingOptions": + err = unpopulate(val, "TracingOptions", &s.TracingOptions) + delete(rawMsg, key) + case "use32BitWorkerProcess": + err = unpopulate(val, "Use32BitWorkerProcess", &s.Use32BitWorkerProcess) + delete(rawMsg, key) + case "virtualApplications": + err = unpopulate(val, "VirtualApplications", &s.VirtualApplications) + delete(rawMsg, key) + case "vnetName": + err = unpopulate(val, "VnetName", &s.VnetName) + delete(rawMsg, key) + case "vnetPrivatePortsCount": + err = unpopulate(val, "VnetPrivatePortsCount", &s.VnetPrivatePortsCount) + delete(rawMsg, key) + case "vnetRouteAllEnabled": + err = unpopulate(val, "VnetRouteAllEnabled", &s.VnetRouteAllEnabled) + delete(rawMsg, key) + case "webSocketsEnabled": + err = unpopulate(val, "WebSocketsEnabled", &s.WebSocketsEnabled) + delete(rawMsg, key) + case "websiteTimeZone": + err = unpopulate(val, "WebsiteTimeZone", &s.WebsiteTimeZone) + delete(rawMsg, key) + case "windowsFxVersion": + err = unpopulate(val, "WindowsFxVersion", &s.WindowsFxVersion) + delete(rawMsg, key) + case "xManagedServiceIdentityId": + err = unpopulate(val, "XManagedServiceIdentityID", &s.XManagedServiceIdentityID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteConfigPropertiesDictionary. +func (s SiteConfigPropertiesDictionary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "javaVersion", s.JavaVersion) + populate(objectMap, "linuxFxVersion", s.LinuxFxVersion) + populate(objectMap, "powerShellVersion", s.PowerShellVersion) + populate(objectMap, "use32BitWorkerProcess", s.Use32BitWorkerProcess) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteConfigPropertiesDictionary. +func (s *SiteConfigPropertiesDictionary) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "javaVersion": + err = unpopulate(val, "JavaVersion", &s.JavaVersion) + delete(rawMsg, key) + case "linuxFxVersion": + err = unpopulate(val, "LinuxFxVersion", &s.LinuxFxVersion) + delete(rawMsg, key) + case "powerShellVersion": + err = unpopulate(val, "PowerShellVersion", &s.PowerShellVersion) + delete(rawMsg, key) + case "use32BitWorkerProcess": + err = unpopulate(val, "Use32BitWorkerProcess", &s.Use32BitWorkerProcess) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteConfigResource. +func (s SiteConfigResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteConfigResource. +func (s *SiteConfigResource) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteConfigResourceCollection. +func (s SiteConfigResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteConfigResourceCollection. +func (s *SiteConfigResourceCollection) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteConfigurationSnapshotInfo. +func (s SiteConfigurationSnapshotInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteConfigurationSnapshotInfo. +func (s *SiteConfigurationSnapshotInfo) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteConfigurationSnapshotInfoCollection. +func (s SiteConfigurationSnapshotInfoCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteConfigurationSnapshotInfoCollection. +func (s *SiteConfigurationSnapshotInfoCollection) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteConfigurationSnapshotInfoProperties. +func (s SiteConfigurationSnapshotInfoProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "snapshotId", s.SnapshotID) + populateTimeRFC3339(objectMap, "time", s.Time) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteConfigurationSnapshotInfoProperties. +func (s *SiteConfigurationSnapshotInfoProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "snapshotId": + err = unpopulate(val, "SnapshotID", &s.SnapshotID) + delete(rawMsg, key) + case "time": + err = unpopulateTimeRFC3339(val, "Time", &s.Time) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteExtensionInfo. +func (s SiteExtensionInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteExtensionInfo. +func (s *SiteExtensionInfo) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteExtensionInfoCollection. +func (s SiteExtensionInfoCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteExtensionInfoCollection. +func (s *SiteExtensionInfoCollection) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteExtensionInfoProperties. +func (s SiteExtensionInfoProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "authors", s.Authors) + populate(objectMap, "comment", s.Comment) + populate(objectMap, "description", s.Description) + populate(objectMap, "download_count", s.DownloadCount) + populate(objectMap, "extension_id", s.ExtensionID) + populate(objectMap, "extension_type", s.ExtensionType) + 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) + 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) + populate(objectMap, "summary", s.Summary) + populate(objectMap, "title", s.Title) + populate(objectMap, "version", s.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteExtensionInfoProperties. +func (s *SiteExtensionInfoProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authors": + err = unpopulate(val, "Authors", &s.Authors) + delete(rawMsg, key) + case "comment": + err = unpopulate(val, "Comment", &s.Comment) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "download_count": + err = unpopulate(val, "DownloadCount", &s.DownloadCount) + delete(rawMsg, key) + case "extension_id": + err = unpopulate(val, "ExtensionID", &s.ExtensionID) + delete(rawMsg, key) + case "extension_type": + err = unpopulate(val, "ExtensionType", &s.ExtensionType) + delete(rawMsg, key) + case "extension_url": + err = unpopulate(val, "ExtensionURL", &s.ExtensionURL) + delete(rawMsg, key) + case "feed_url": + err = unpopulate(val, "FeedURL", &s.FeedURL) + delete(rawMsg, key) + case "icon_url": + err = unpopulate(val, "IconURL", &s.IconURL) + delete(rawMsg, key) + case "installed_date_time": + err = unpopulateTimeRFC3339(val, "InstalledDateTime", &s.InstalledDateTime) + delete(rawMsg, key) + case "installer_command_line_params": + err = unpopulate(val, "InstallerCommandLineParams", &s.InstallerCommandLineParams) + delete(rawMsg, key) + case "license_url": + err = unpopulate(val, "LicenseURL", &s.LicenseURL) + delete(rawMsg, key) + case "local_is_latest_version": + err = unpopulate(val, "LocalIsLatestVersion", &s.LocalIsLatestVersion) + delete(rawMsg, key) + case "local_path": + err = unpopulate(val, "LocalPath", &s.LocalPath) + delete(rawMsg, key) + case "project_url": + err = unpopulate(val, "ProjectURL", &s.ProjectURL) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "published_date_time": + err = unpopulateTimeRFC3339(val, "PublishedDateTime", &s.PublishedDateTime) + delete(rawMsg, key) + case "summary": + err = unpopulate(val, "Summary", &s.Summary) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &s.Title) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &s.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteLimits. +func (s SiteLimits) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "maxDiskSizeInMb", s.MaxDiskSizeInMb) + populate(objectMap, "maxMemoryInMb", s.MaxMemoryInMb) + populate(objectMap, "maxPercentageCpu", s.MaxPercentageCPU) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteLimits. +func (s *SiteLimits) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxDiskSizeInMb": + err = unpopulate(val, "MaxDiskSizeInMb", &s.MaxDiskSizeInMb) + delete(rawMsg, key) + case "maxMemoryInMb": + err = unpopulate(val, "MaxMemoryInMb", &s.MaxMemoryInMb) + delete(rawMsg, key) + case "maxPercentageCpu": + err = unpopulate(val, "MaxPercentageCPU", &s.MaxPercentageCPU) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteLogsConfig. +func (s SiteLogsConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteLogsConfig. +func (s *SiteLogsConfig) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteLogsConfigProperties. +func (s SiteLogsConfigProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "applicationLogs", s.ApplicationLogs) + populate(objectMap, "detailedErrorMessages", s.DetailedErrorMessages) + populate(objectMap, "failedRequestsTracing", s.FailedRequestsTracing) + populate(objectMap, "httpLogs", s.HTTPLogs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteLogsConfigProperties. +func (s *SiteLogsConfigProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applicationLogs": + err = unpopulate(val, "ApplicationLogs", &s.ApplicationLogs) + delete(rawMsg, key) + case "detailedErrorMessages": + err = unpopulate(val, "DetailedErrorMessages", &s.DetailedErrorMessages) + delete(rawMsg, key) + case "failedRequestsTracing": + err = unpopulate(val, "FailedRequestsTracing", &s.FailedRequestsTracing) + delete(rawMsg, key) + case "httpLogs": + err = unpopulate(val, "HTTPLogs", &s.HTTPLogs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteMachineKey. +func (s SiteMachineKey) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "decryption", s.Decryption) + populate(objectMap, "decryptionKey", s.DecryptionKey) + populate(objectMap, "validation", s.Validation) + populate(objectMap, "validationKey", s.ValidationKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteMachineKey. +func (s *SiteMachineKey) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "decryption": + err = unpopulate(val, "Decryption", &s.Decryption) + delete(rawMsg, key) + case "decryptionKey": + err = unpopulate(val, "DecryptionKey", &s.DecryptionKey) + delete(rawMsg, key) + case "validation": + err = unpopulate(val, "Validation", &s.Validation) + delete(rawMsg, key) + case "validationKey": + err = unpopulate(val, "ValidationKey", &s.ValidationKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SitePatchResource. +func (s SitePatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "identity", s.Identity) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SitePatchResource. +func (s *SitePatchResource) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &s.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SitePatchResourceProperties. +func (s SitePatchResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "availabilityState", s.AvailabilityState) + populate(objectMap, "clientAffinityEnabled", s.ClientAffinityEnabled) + populate(objectMap, "clientCertEnabled", s.ClientCertEnabled) + populate(objectMap, "clientCertExclusionPaths", s.ClientCertExclusionPaths) + populate(objectMap, "clientCertMode", s.ClientCertMode) + populate(objectMap, "cloningInfo", s.CloningInfo) + populate(objectMap, "containerSize", s.ContainerSize) + populate(objectMap, "customDomainVerificationId", s.CustomDomainVerificationID) + populate(objectMap, "dailyMemoryTimeQuota", s.DailyMemoryTimeQuota) + populate(objectMap, "defaultHostName", s.DefaultHostName) + populate(objectMap, "enabled", s.Enabled) + populate(objectMap, "enabledHostNames", s.EnabledHostNames) + populate(objectMap, "httpsOnly", s.HTTPSOnly) + populate(objectMap, "hostNameSslStates", s.HostNameSSLStates) + populate(objectMap, "hostNames", s.HostNames) + populate(objectMap, "hostNamesDisabled", s.HostNamesDisabled) + populate(objectMap, "hostingEnvironmentProfile", s.HostingEnvironmentProfile) + populate(objectMap, "hyperV", s.HyperV) + populate(objectMap, "inProgressOperationId", s.InProgressOperationID) + populate(objectMap, "isDefaultContainer", s.IsDefaultContainer) + populate(objectMap, "isXenon", s.IsXenon) + populate(objectMap, "keyVaultReferenceIdentity", s.KeyVaultReferenceIdentity) + populateTimeRFC3339(objectMap, "lastModifiedTimeUtc", s.LastModifiedTimeUTC) + populate(objectMap, "maxNumberOfWorkers", s.MaxNumberOfWorkers) + populate(objectMap, "outboundIpAddresses", s.OutboundIPAddresses) + populate(objectMap, "possibleOutboundIpAddresses", s.PossibleOutboundIPAddresses) + populate(objectMap, "redundancyMode", s.RedundancyMode) + populate(objectMap, "repositorySiteName", s.RepositorySiteName) + populate(objectMap, "reserved", s.Reserved) + populate(objectMap, "resourceGroup", s.ResourceGroup) + populate(objectMap, "scmSiteAlsoStopped", s.ScmSiteAlsoStopped) + populate(objectMap, "serverFarmId", s.ServerFarmID) + populate(objectMap, "siteConfig", s.SiteConfig) + populate(objectMap, "slotSwapStatus", s.SlotSwapStatus) + populate(objectMap, "state", s.State) + populate(objectMap, "storageAccountRequired", s.StorageAccountRequired) + populateTimeRFC3339(objectMap, "suspendedTill", s.SuspendedTill) + populate(objectMap, "targetSwapSlot", s.TargetSwapSlot) + populate(objectMap, "trafficManagerHostNames", s.TrafficManagerHostNames) + populate(objectMap, "usageState", s.UsageState) + populate(objectMap, "virtualNetworkSubnetId", s.VirtualNetworkSubnetID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SitePatchResourceProperties. +func (s *SitePatchResourceProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "availabilityState": + err = unpopulate(val, "AvailabilityState", &s.AvailabilityState) + delete(rawMsg, key) + case "clientAffinityEnabled": + err = unpopulate(val, "ClientAffinityEnabled", &s.ClientAffinityEnabled) + delete(rawMsg, key) + case "clientCertEnabled": + err = unpopulate(val, "ClientCertEnabled", &s.ClientCertEnabled) + delete(rawMsg, key) + case "clientCertExclusionPaths": + err = unpopulate(val, "ClientCertExclusionPaths", &s.ClientCertExclusionPaths) + delete(rawMsg, key) + case "clientCertMode": + err = unpopulate(val, "ClientCertMode", &s.ClientCertMode) + delete(rawMsg, key) + case "cloningInfo": + err = unpopulate(val, "CloningInfo", &s.CloningInfo) + delete(rawMsg, key) + case "containerSize": + err = unpopulate(val, "ContainerSize", &s.ContainerSize) + delete(rawMsg, key) + case "customDomainVerificationId": + err = unpopulate(val, "CustomDomainVerificationID", &s.CustomDomainVerificationID) + delete(rawMsg, key) + case "dailyMemoryTimeQuota": + err = unpopulate(val, "DailyMemoryTimeQuota", &s.DailyMemoryTimeQuota) + delete(rawMsg, key) + case "defaultHostName": + err = unpopulate(val, "DefaultHostName", &s.DefaultHostName) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &s.Enabled) + delete(rawMsg, key) + case "enabledHostNames": + err = unpopulate(val, "EnabledHostNames", &s.EnabledHostNames) + delete(rawMsg, key) + case "httpsOnly": + err = unpopulate(val, "HTTPSOnly", &s.HTTPSOnly) + delete(rawMsg, key) + case "hostNameSslStates": + err = unpopulate(val, "HostNameSSLStates", &s.HostNameSSLStates) + delete(rawMsg, key) + case "hostNames": + err = unpopulate(val, "HostNames", &s.HostNames) + delete(rawMsg, key) + case "hostNamesDisabled": + err = unpopulate(val, "HostNamesDisabled", &s.HostNamesDisabled) + delete(rawMsg, key) + case "hostingEnvironmentProfile": + err = unpopulate(val, "HostingEnvironmentProfile", &s.HostingEnvironmentProfile) + delete(rawMsg, key) + case "hyperV": + err = unpopulate(val, "HyperV", &s.HyperV) + delete(rawMsg, key) + case "inProgressOperationId": + err = unpopulate(val, "InProgressOperationID", &s.InProgressOperationID) + delete(rawMsg, key) + case "isDefaultContainer": + err = unpopulate(val, "IsDefaultContainer", &s.IsDefaultContainer) + delete(rawMsg, key) + case "isXenon": + err = unpopulate(val, "IsXenon", &s.IsXenon) + delete(rawMsg, key) + case "keyVaultReferenceIdentity": + err = unpopulate(val, "KeyVaultReferenceIdentity", &s.KeyVaultReferenceIdentity) + delete(rawMsg, key) + case "lastModifiedTimeUtc": + err = unpopulateTimeRFC3339(val, "LastModifiedTimeUTC", &s.LastModifiedTimeUTC) + delete(rawMsg, key) + case "maxNumberOfWorkers": + err = unpopulate(val, "MaxNumberOfWorkers", &s.MaxNumberOfWorkers) + delete(rawMsg, key) + case "outboundIpAddresses": + err = unpopulate(val, "OutboundIPAddresses", &s.OutboundIPAddresses) + delete(rawMsg, key) + case "possibleOutboundIpAddresses": + err = unpopulate(val, "PossibleOutboundIPAddresses", &s.PossibleOutboundIPAddresses) + delete(rawMsg, key) + case "redundancyMode": + err = unpopulate(val, "RedundancyMode", &s.RedundancyMode) + delete(rawMsg, key) + case "repositorySiteName": + err = unpopulate(val, "RepositorySiteName", &s.RepositorySiteName) + delete(rawMsg, key) + case "reserved": + err = unpopulate(val, "Reserved", &s.Reserved) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &s.ResourceGroup) + delete(rawMsg, key) + case "scmSiteAlsoStopped": + err = unpopulate(val, "ScmSiteAlsoStopped", &s.ScmSiteAlsoStopped) + delete(rawMsg, key) + case "serverFarmId": + err = unpopulate(val, "ServerFarmID", &s.ServerFarmID) + delete(rawMsg, key) + case "siteConfig": + err = unpopulate(val, "SiteConfig", &s.SiteConfig) + delete(rawMsg, key) + case "slotSwapStatus": + err = unpopulate(val, "SlotSwapStatus", &s.SlotSwapStatus) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + case "storageAccountRequired": + err = unpopulate(val, "StorageAccountRequired", &s.StorageAccountRequired) + delete(rawMsg, key) + case "suspendedTill": + err = unpopulateTimeRFC3339(val, "SuspendedTill", &s.SuspendedTill) + delete(rawMsg, key) + case "targetSwapSlot": + err = unpopulate(val, "TargetSwapSlot", &s.TargetSwapSlot) + delete(rawMsg, key) + case "trafficManagerHostNames": + err = unpopulate(val, "TrafficManagerHostNames", &s.TrafficManagerHostNames) + delete(rawMsg, key) + case "usageState": + err = unpopulate(val, "UsageState", &s.UsageState) + delete(rawMsg, key) + case "virtualNetworkSubnetId": + err = unpopulate(val, "VirtualNetworkSubnetID", &s.VirtualNetworkSubnetID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SitePhpErrorLogFlag. +func (s SitePhpErrorLogFlag) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SitePhpErrorLogFlag. +func (s *SitePhpErrorLogFlag) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SitePhpErrorLogFlagProperties. +func (s SitePhpErrorLogFlagProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "localLogErrors", s.LocalLogErrors) + populate(objectMap, "localLogErrorsMaxLength", s.LocalLogErrorsMaxLength) + populate(objectMap, "masterLogErrors", s.MasterLogErrors) + populate(objectMap, "masterLogErrorsMaxLength", s.MasterLogErrorsMaxLength) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SitePhpErrorLogFlagProperties. +func (s *SitePhpErrorLogFlagProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "localLogErrors": + err = unpopulate(val, "LocalLogErrors", &s.LocalLogErrors) + delete(rawMsg, key) + case "localLogErrorsMaxLength": + err = unpopulate(val, "LocalLogErrorsMaxLength", &s.LocalLogErrorsMaxLength) + delete(rawMsg, key) + case "masterLogErrors": + err = unpopulate(val, "MasterLogErrors", &s.MasterLogErrors) + delete(rawMsg, key) + case "masterLogErrorsMaxLength": + err = unpopulate(val, "MasterLogErrorsMaxLength", &s.MasterLogErrorsMaxLength) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteProperties. +func (s SiteProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "availabilityState", s.AvailabilityState) + populate(objectMap, "clientAffinityEnabled", s.ClientAffinityEnabled) + populate(objectMap, "clientCertEnabled", s.ClientCertEnabled) + populate(objectMap, "clientCertExclusionPaths", s.ClientCertExclusionPaths) + populate(objectMap, "clientCertMode", s.ClientCertMode) + populate(objectMap, "cloningInfo", s.CloningInfo) + populate(objectMap, "containerSize", s.ContainerSize) + populate(objectMap, "customDomainVerificationId", s.CustomDomainVerificationID) + populate(objectMap, "dailyMemoryTimeQuota", s.DailyMemoryTimeQuota) + populate(objectMap, "defaultHostName", s.DefaultHostName) + populate(objectMap, "enabled", s.Enabled) + populate(objectMap, "enabledHostNames", s.EnabledHostNames) + populate(objectMap, "httpsOnly", s.HTTPSOnly) + populate(objectMap, "hostNameSslStates", s.HostNameSSLStates) + populate(objectMap, "hostNames", s.HostNames) + populate(objectMap, "hostNamesDisabled", s.HostNamesDisabled) + populate(objectMap, "hostingEnvironmentProfile", s.HostingEnvironmentProfile) + populate(objectMap, "hyperV", s.HyperV) + populate(objectMap, "inProgressOperationId", s.InProgressOperationID) + populate(objectMap, "isDefaultContainer", s.IsDefaultContainer) + populate(objectMap, "isXenon", s.IsXenon) + populate(objectMap, "keyVaultReferenceIdentity", s.KeyVaultReferenceIdentity) + populateTimeRFC3339(objectMap, "lastModifiedTimeUtc", s.LastModifiedTimeUTC) + populate(objectMap, "maxNumberOfWorkers", s.MaxNumberOfWorkers) + populate(objectMap, "outboundIpAddresses", s.OutboundIPAddresses) + populate(objectMap, "possibleOutboundIpAddresses", s.PossibleOutboundIPAddresses) + populate(objectMap, "publicNetworkAccess", s.PublicNetworkAccess) + populate(objectMap, "redundancyMode", s.RedundancyMode) + populate(objectMap, "repositorySiteName", s.RepositorySiteName) + populate(objectMap, "reserved", s.Reserved) + populate(objectMap, "resourceGroup", s.ResourceGroup) + populate(objectMap, "scmSiteAlsoStopped", s.ScmSiteAlsoStopped) + populate(objectMap, "serverFarmId", s.ServerFarmID) + populate(objectMap, "siteConfig", s.SiteConfig) + populate(objectMap, "slotSwapStatus", s.SlotSwapStatus) + populate(objectMap, "state", s.State) + populate(objectMap, "storageAccountRequired", s.StorageAccountRequired) + populateTimeRFC3339(objectMap, "suspendedTill", s.SuspendedTill) + populate(objectMap, "targetSwapSlot", s.TargetSwapSlot) + populate(objectMap, "trafficManagerHostNames", s.TrafficManagerHostNames) + populate(objectMap, "usageState", s.UsageState) + populate(objectMap, "virtualNetworkSubnetId", s.VirtualNetworkSubnetID) + populate(objectMap, "vnetContentShareEnabled", s.VnetContentShareEnabled) + populate(objectMap, "vnetImagePullEnabled", s.VnetImagePullEnabled) + populate(objectMap, "vnetRouteAllEnabled", s.VnetRouteAllEnabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteProperties. +func (s *SiteProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "availabilityState": + err = unpopulate(val, "AvailabilityState", &s.AvailabilityState) + delete(rawMsg, key) + case "clientAffinityEnabled": + err = unpopulate(val, "ClientAffinityEnabled", &s.ClientAffinityEnabled) + delete(rawMsg, key) + case "clientCertEnabled": + err = unpopulate(val, "ClientCertEnabled", &s.ClientCertEnabled) + delete(rawMsg, key) + case "clientCertExclusionPaths": + err = unpopulate(val, "ClientCertExclusionPaths", &s.ClientCertExclusionPaths) + delete(rawMsg, key) + case "clientCertMode": + err = unpopulate(val, "ClientCertMode", &s.ClientCertMode) + delete(rawMsg, key) + case "cloningInfo": + err = unpopulate(val, "CloningInfo", &s.CloningInfo) + delete(rawMsg, key) + case "containerSize": + err = unpopulate(val, "ContainerSize", &s.ContainerSize) + delete(rawMsg, key) + case "customDomainVerificationId": + err = unpopulate(val, "CustomDomainVerificationID", &s.CustomDomainVerificationID) + delete(rawMsg, key) + case "dailyMemoryTimeQuota": + err = unpopulate(val, "DailyMemoryTimeQuota", &s.DailyMemoryTimeQuota) + delete(rawMsg, key) + case "defaultHostName": + err = unpopulate(val, "DefaultHostName", &s.DefaultHostName) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &s.Enabled) + delete(rawMsg, key) + case "enabledHostNames": + err = unpopulate(val, "EnabledHostNames", &s.EnabledHostNames) + delete(rawMsg, key) + case "httpsOnly": + err = unpopulate(val, "HTTPSOnly", &s.HTTPSOnly) + delete(rawMsg, key) + case "hostNameSslStates": + err = unpopulate(val, "HostNameSSLStates", &s.HostNameSSLStates) + delete(rawMsg, key) + case "hostNames": + err = unpopulate(val, "HostNames", &s.HostNames) + delete(rawMsg, key) + case "hostNamesDisabled": + err = unpopulate(val, "HostNamesDisabled", &s.HostNamesDisabled) + delete(rawMsg, key) + case "hostingEnvironmentProfile": + err = unpopulate(val, "HostingEnvironmentProfile", &s.HostingEnvironmentProfile) + delete(rawMsg, key) + case "hyperV": + err = unpopulate(val, "HyperV", &s.HyperV) + delete(rawMsg, key) + case "inProgressOperationId": + err = unpopulate(val, "InProgressOperationID", &s.InProgressOperationID) + delete(rawMsg, key) + case "isDefaultContainer": + err = unpopulate(val, "IsDefaultContainer", &s.IsDefaultContainer) + delete(rawMsg, key) + case "isXenon": + err = unpopulate(val, "IsXenon", &s.IsXenon) + delete(rawMsg, key) + case "keyVaultReferenceIdentity": + err = unpopulate(val, "KeyVaultReferenceIdentity", &s.KeyVaultReferenceIdentity) + delete(rawMsg, key) + case "lastModifiedTimeUtc": + err = unpopulateTimeRFC3339(val, "LastModifiedTimeUTC", &s.LastModifiedTimeUTC) + delete(rawMsg, key) + case "maxNumberOfWorkers": + err = unpopulate(val, "MaxNumberOfWorkers", &s.MaxNumberOfWorkers) + delete(rawMsg, key) + case "outboundIpAddresses": + err = unpopulate(val, "OutboundIPAddresses", &s.OutboundIPAddresses) + delete(rawMsg, key) + case "possibleOutboundIpAddresses": + err = unpopulate(val, "PossibleOutboundIPAddresses", &s.PossibleOutboundIPAddresses) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess) + delete(rawMsg, key) + case "redundancyMode": + err = unpopulate(val, "RedundancyMode", &s.RedundancyMode) + delete(rawMsg, key) + case "repositorySiteName": + err = unpopulate(val, "RepositorySiteName", &s.RepositorySiteName) + delete(rawMsg, key) + case "reserved": + err = unpopulate(val, "Reserved", &s.Reserved) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &s.ResourceGroup) + delete(rawMsg, key) + case "scmSiteAlsoStopped": + err = unpopulate(val, "ScmSiteAlsoStopped", &s.ScmSiteAlsoStopped) + delete(rawMsg, key) + case "serverFarmId": + err = unpopulate(val, "ServerFarmID", &s.ServerFarmID) + delete(rawMsg, key) + case "siteConfig": + err = unpopulate(val, "SiteConfig", &s.SiteConfig) + delete(rawMsg, key) + case "slotSwapStatus": + err = unpopulate(val, "SlotSwapStatus", &s.SlotSwapStatus) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + case "storageAccountRequired": + err = unpopulate(val, "StorageAccountRequired", &s.StorageAccountRequired) + delete(rawMsg, key) + case "suspendedTill": + err = unpopulateTimeRFC3339(val, "SuspendedTill", &s.SuspendedTill) + delete(rawMsg, key) + case "targetSwapSlot": + err = unpopulate(val, "TargetSwapSlot", &s.TargetSwapSlot) + delete(rawMsg, key) + case "trafficManagerHostNames": + err = unpopulate(val, "TrafficManagerHostNames", &s.TrafficManagerHostNames) + delete(rawMsg, key) + case "usageState": + err = unpopulate(val, "UsageState", &s.UsageState) + delete(rawMsg, key) + case "virtualNetworkSubnetId": + err = unpopulate(val, "VirtualNetworkSubnetID", &s.VirtualNetworkSubnetID) + delete(rawMsg, key) + case "vnetContentShareEnabled": + err = unpopulate(val, "VnetContentShareEnabled", &s.VnetContentShareEnabled) + delete(rawMsg, key) + case "vnetImagePullEnabled": + err = unpopulate(val, "VnetImagePullEnabled", &s.VnetImagePullEnabled) + delete(rawMsg, key) + case "vnetRouteAllEnabled": + err = unpopulate(val, "VnetRouteAllEnabled", &s.VnetRouteAllEnabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteSeal. +func (s SiteSeal) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "html", s.HTML) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteSeal. +func (s *SiteSeal) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "html": + err = unpopulate(val, "HTML", &s.HTML) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteSealRequest. +func (s SiteSealRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "lightTheme", s.LightTheme) + populate(objectMap, "locale", s.Locale) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteSealRequest. +func (s *SiteSealRequest) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "lightTheme": + err = unpopulate(val, "LightTheme", &s.LightTheme) + delete(rawMsg, key) + case "locale": + err = unpopulate(val, "Locale", &s.Locale) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteSourceControl. +func (s SiteSourceControl) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteSourceControl. +func (s *SiteSourceControl) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteSourceControlProperties. +func (s SiteSourceControlProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "branch", s.Branch) + populate(objectMap, "deploymentRollbackEnabled", s.DeploymentRollbackEnabled) + populate(objectMap, "gitHubActionConfiguration", s.GitHubActionConfiguration) + populate(objectMap, "isGitHubAction", s.IsGitHubAction) + populate(objectMap, "isManualIntegration", s.IsManualIntegration) + populate(objectMap, "isMercurial", s.IsMercurial) + populate(objectMap, "repoUrl", s.RepoURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteSourceControlProperties. +func (s *SiteSourceControlProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "branch": + err = unpopulate(val, "Branch", &s.Branch) + delete(rawMsg, key) + case "deploymentRollbackEnabled": + err = unpopulate(val, "DeploymentRollbackEnabled", &s.DeploymentRollbackEnabled) + delete(rawMsg, key) + case "gitHubActionConfiguration": + err = unpopulate(val, "GitHubActionConfiguration", &s.GitHubActionConfiguration) + delete(rawMsg, key) + case "isGitHubAction": + err = unpopulate(val, "IsGitHubAction", &s.IsGitHubAction) + delete(rawMsg, key) + case "isManualIntegration": + err = unpopulate(val, "IsManualIntegration", &s.IsManualIntegration) + delete(rawMsg, key) + case "isMercurial": + err = unpopulate(val, "IsMercurial", &s.IsMercurial) + delete(rawMsg, key) + case "repoUrl": + err = unpopulate(val, "RepoURL", &s.RepoURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SlotConfigNames. +func (s SlotConfigNames) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "appSettingNames", s.AppSettingNames) + populate(objectMap, "azureStorageConfigNames", s.AzureStorageConfigNames) + populate(objectMap, "connectionStringNames", s.ConnectionStringNames) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SlotConfigNames. +func (s *SlotConfigNames) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appSettingNames": + err = unpopulate(val, "AppSettingNames", &s.AppSettingNames) + delete(rawMsg, key) + case "azureStorageConfigNames": + err = unpopulate(val, "AzureStorageConfigNames", &s.AzureStorageConfigNames) + delete(rawMsg, key) + case "connectionStringNames": + err = unpopulate(val, "ConnectionStringNames", &s.ConnectionStringNames) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SlotConfigNamesResource. +func (s SlotConfigNamesResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SlotConfigNamesResource. +func (s *SlotConfigNamesResource) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SlotDifference. +func (s SlotDifference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SlotDifference. +func (s *SlotDifference) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SlotDifferenceCollection. +func (s SlotDifferenceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SlotDifferenceCollection. +func (s *SlotDifferenceCollection) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SlotDifferenceProperties. +func (s SlotDifferenceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", s.Description) + populate(objectMap, "diffRule", s.DiffRule) + populate(objectMap, "level", s.Level) + populate(objectMap, "settingName", s.SettingName) + populate(objectMap, "settingType", s.SettingType) + populate(objectMap, "valueInCurrentSlot", s.ValueInCurrentSlot) + populate(objectMap, "valueInTargetSlot", s.ValueInTargetSlot) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SlotDifferenceProperties. +func (s *SlotDifferenceProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "diffRule": + err = unpopulate(val, "DiffRule", &s.DiffRule) + delete(rawMsg, key) + case "level": + err = unpopulate(val, "Level", &s.Level) + delete(rawMsg, key) + case "settingName": + err = unpopulate(val, "SettingName", &s.SettingName) + delete(rawMsg, key) + case "settingType": + err = unpopulate(val, "SettingType", &s.SettingType) + delete(rawMsg, key) + case "valueInCurrentSlot": + err = unpopulate(val, "ValueInCurrentSlot", &s.ValueInCurrentSlot) + delete(rawMsg, key) + case "valueInTargetSlot": + err = unpopulate(val, "ValueInTargetSlot", &s.ValueInTargetSlot) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SlotSwapStatus. +func (s SlotSwapStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "destinationSlotName", s.DestinationSlotName) + populate(objectMap, "sourceSlotName", s.SourceSlotName) + populateTimeRFC3339(objectMap, "timestampUtc", s.TimestampUTC) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SlotSwapStatus. +func (s *SlotSwapStatus) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destinationSlotName": + err = unpopulate(val, "DestinationSlotName", &s.DestinationSlotName) + delete(rawMsg, key) + case "sourceSlotName": + err = unpopulate(val, "SourceSlotName", &s.SourceSlotName) + delete(rawMsg, key) + case "timestampUtc": + err = unpopulateTimeRFC3339(val, "TimestampUTC", &s.TimestampUTC) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SlowRequestsBasedTrigger. +func (s SlowRequestsBasedTrigger) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "count", s.Count) + populate(objectMap, "path", s.Path) + populate(objectMap, "timeInterval", s.TimeInterval) + populate(objectMap, "timeTaken", s.TimeTaken) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SlowRequestsBasedTrigger. +func (s *SlowRequestsBasedTrigger) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &s.Count) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &s.Path) + delete(rawMsg, key) + case "timeInterval": + err = unpopulate(val, "TimeInterval", &s.TimeInterval) + delete(rawMsg, key) + case "timeTaken": + err = unpopulate(val, "TimeTaken", &s.TimeTaken) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Snapshot. +func (s Snapshot) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Snapshot. +func (s *Snapshot) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SnapshotCollection. +func (s SnapshotCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotCollection. +func (s *SnapshotCollection) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SnapshotProperties. +func (s SnapshotProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "time", s.Time) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotProperties. +func (s *SnapshotProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "time": + err = unpopulate(val, "Time", &s.Time) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SnapshotRecoverySource. +func (s SnapshotRecoverySource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "location", s.Location) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotRecoverySource. +func (s *SnapshotRecoverySource) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SnapshotRestoreRequest. +func (s SnapshotRestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotRestoreRequest. +func (s *SnapshotRestoreRequest) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SnapshotRestoreRequestProperties. +func (s SnapshotRestoreRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "ignoreConflictingHostNames", s.IgnoreConflictingHostNames) + populate(objectMap, "overwrite", s.Overwrite) + populate(objectMap, "recoverConfiguration", s.RecoverConfiguration) + populate(objectMap, "recoverySource", s.RecoverySource) + populate(objectMap, "snapshotTime", s.SnapshotTime) + populate(objectMap, "useDRSecondary", s.UseDRSecondary) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotRestoreRequestProperties. +func (s *SnapshotRestoreRequestProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ignoreConflictingHostNames": + err = unpopulate(val, "IgnoreConflictingHostNames", &s.IgnoreConflictingHostNames) + delete(rawMsg, key) + case "overwrite": + err = unpopulate(val, "Overwrite", &s.Overwrite) + delete(rawMsg, key) + case "recoverConfiguration": + err = unpopulate(val, "RecoverConfiguration", &s.RecoverConfiguration) + delete(rawMsg, key) + case "recoverySource": + err = unpopulate(val, "RecoverySource", &s.RecoverySource) + delete(rawMsg, key) + case "snapshotTime": + err = unpopulate(val, "SnapshotTime", &s.SnapshotTime) + delete(rawMsg, key) + case "useDRSecondary": + err = unpopulate(val, "UseDRSecondary", &s.UseDRSecondary) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Solution. +func (s Solution) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "data", s.Data) + populate(objectMap, "description", s.Description) + populate(objectMap, "displayName", s.DisplayName) + populate(objectMap, "id", s.ID) + populate(objectMap, "metadata", s.Metadata) + populate(objectMap, "order", s.Order) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Solution. +func (s *Solution) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "data": + err = unpopulate(val, "Data", &s.Data) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &s.DisplayName) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &s.Metadata) + delete(rawMsg, key) + case "order": + err = unpopulate(val, "Order", &s.Order) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SourceControl. +func (s SourceControl) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SourceControl. +func (s *SourceControl) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SourceControlCollection. +func (s SourceControlCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SourceControlCollection. +func (s *SourceControlCollection) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SourceControlProperties. +func (s SourceControlProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populateTimeRFC3339(objectMap, "expirationTime", s.ExpirationTime) + populate(objectMap, "refreshToken", s.RefreshToken) + populate(objectMap, "token", s.Token) + populate(objectMap, "tokenSecret", s.TokenSecret) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SourceControlProperties. +func (s *SourceControlProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expirationTime": + err = unpopulateTimeRFC3339(val, "ExpirationTime", &s.ExpirationTime) + delete(rawMsg, key) + case "refreshToken": + err = unpopulate(val, "RefreshToken", &s.RefreshToken) + delete(rawMsg, key) + case "token": + err = unpopulate(val, "Token", &s.Token) + delete(rawMsg, key) + case "tokenSecret": + err = unpopulate(val, "TokenSecret", &s.TokenSecret) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StackMajorVersion. +func (s StackMajorVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "appSettingsDictionary", s.AppSettingsDictionary) + populate(objectMap, "applicationInsights", s.ApplicationInsights) + populate(objectMap, "displayVersion", s.DisplayVersion) + populate(objectMap, "isDefault", s.IsDefault) + populate(objectMap, "isDeprecated", s.IsDeprecated) + populate(objectMap, "isHidden", s.IsHidden) + populate(objectMap, "isPreview", s.IsPreview) + populate(objectMap, "minorVersions", s.MinorVersions) + populate(objectMap, "runtimeVersion", s.RuntimeVersion) + populate(objectMap, "siteConfigPropertiesDictionary", s.SiteConfigPropertiesDictionary) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StackMajorVersion. +func (s *StackMajorVersion) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appSettingsDictionary": + err = unpopulate(val, "AppSettingsDictionary", &s.AppSettingsDictionary) + delete(rawMsg, key) + case "applicationInsights": + err = unpopulate(val, "ApplicationInsights", &s.ApplicationInsights) + delete(rawMsg, key) + case "displayVersion": + err = unpopulate(val, "DisplayVersion", &s.DisplayVersion) + delete(rawMsg, key) + case "isDefault": + err = unpopulate(val, "IsDefault", &s.IsDefault) + delete(rawMsg, key) + case "isDeprecated": + err = unpopulate(val, "IsDeprecated", &s.IsDeprecated) + delete(rawMsg, key) + case "isHidden": + err = unpopulate(val, "IsHidden", &s.IsHidden) + delete(rawMsg, key) + case "isPreview": + err = unpopulate(val, "IsPreview", &s.IsPreview) + delete(rawMsg, key) + case "minorVersions": + err = unpopulate(val, "MinorVersions", &s.MinorVersions) + delete(rawMsg, key) + case "runtimeVersion": + err = unpopulate(val, "RuntimeVersion", &s.RuntimeVersion) + delete(rawMsg, key) + case "siteConfigPropertiesDictionary": + err = unpopulate(val, "SiteConfigPropertiesDictionary", &s.SiteConfigPropertiesDictionary) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StackMinorVersion. +func (s StackMinorVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "displayVersion", s.DisplayVersion) + populate(objectMap, "isDefault", s.IsDefault) + populate(objectMap, "isRemoteDebuggingEnabled", s.IsRemoteDebuggingEnabled) + populate(objectMap, "runtimeVersion", s.RuntimeVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StackMinorVersion. +func (s *StackMinorVersion) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayVersion": + err = unpopulate(val, "DisplayVersion", &s.DisplayVersion) + delete(rawMsg, key) + case "isDefault": + err = unpopulate(val, "IsDefault", &s.IsDefault) + delete(rawMsg, key) + case "isRemoteDebuggingEnabled": + err = unpopulate(val, "IsRemoteDebuggingEnabled", &s.IsRemoteDebuggingEnabled) + delete(rawMsg, key) + case "runtimeVersion": + err = unpopulate(val, "RuntimeVersion", &s.RuntimeVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StampCapacity. +func (s StampCapacity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "availableCapacity", s.AvailableCapacity) + populate(objectMap, "computeMode", s.ComputeMode) + populate(objectMap, "excludeFromCapacityAllocation", s.ExcludeFromCapacityAllocation) + populate(objectMap, "isApplicableForAllComputeModes", s.IsApplicableForAllComputeModes) + populate(objectMap, "isLinux", s.IsLinux) + populate(objectMap, "name", s.Name) + populate(objectMap, "siteMode", s.SiteMode) + populate(objectMap, "totalCapacity", s.TotalCapacity) + populate(objectMap, "unit", s.Unit) + populate(objectMap, "workerSize", s.WorkerSize) + populate(objectMap, "workerSizeId", s.WorkerSizeID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StampCapacity. +func (s *StampCapacity) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "availableCapacity": + err = unpopulate(val, "AvailableCapacity", &s.AvailableCapacity) + delete(rawMsg, key) + case "computeMode": + err = unpopulate(val, "ComputeMode", &s.ComputeMode) + delete(rawMsg, key) + case "excludeFromCapacityAllocation": + err = unpopulate(val, "ExcludeFromCapacityAllocation", &s.ExcludeFromCapacityAllocation) + delete(rawMsg, key) + case "isApplicableForAllComputeModes": + err = unpopulate(val, "IsApplicableForAllComputeModes", &s.IsApplicableForAllComputeModes) + delete(rawMsg, key) + case "isLinux": + err = unpopulate(val, "IsLinux", &s.IsLinux) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "siteMode": + err = unpopulate(val, "SiteMode", &s.SiteMode) + delete(rawMsg, key) + case "totalCapacity": + err = unpopulate(val, "TotalCapacity", &s.TotalCapacity) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &s.Unit) + delete(rawMsg, key) + case "workerSize": + err = unpopulate(val, "WorkerSize", &s.WorkerSize) + delete(rawMsg, key) + case "workerSizeId": + err = unpopulate(val, "WorkerSizeID", &s.WorkerSizeID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StampCapacityCollection. +func (s StampCapacityCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StampCapacityCollection. +func (s *StampCapacityCollection) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSite. +func (s StaticSite) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allowConfigFileUpdates", s.AllowConfigFileUpdates) + populate(objectMap, "branch", s.Branch) + populate(objectMap, "buildProperties", s.BuildProperties) + populate(objectMap, "contentDistributionEndpoint", s.ContentDistributionEndpoint) + populate(objectMap, "customDomains", s.CustomDomains) + populate(objectMap, "defaultHostname", s.DefaultHostname) + populate(objectMap, "enterpriseGradeCdnStatus", s.EnterpriseGradeCdnStatus) + populate(objectMap, "keyVaultReferenceIdentity", s.KeyVaultReferenceIdentity) + populate(objectMap, "linkedBackends", s.LinkedBackends) + populate(objectMap, "privateEndpointConnections", s.PrivateEndpointConnections) + populate(objectMap, "provider", s.Provider) + populate(objectMap, "publicNetworkAccess", s.PublicNetworkAccess) + populate(objectMap, "repositoryToken", s.RepositoryToken) + populate(objectMap, "repositoryUrl", s.RepositoryURL) + populate(objectMap, "stagingEnvironmentPolicy", s.StagingEnvironmentPolicy) + populate(objectMap, "templateProperties", s.TemplateProperties) + populate(objectMap, "userProvidedFunctionApps", s.UserProvidedFunctionApps) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSite. +func (s *StaticSite) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowConfigFileUpdates": + err = unpopulate(val, "AllowConfigFileUpdates", &s.AllowConfigFileUpdates) + delete(rawMsg, key) + case "branch": + err = unpopulate(val, "Branch", &s.Branch) + delete(rawMsg, key) + case "buildProperties": + err = unpopulate(val, "BuildProperties", &s.BuildProperties) + delete(rawMsg, key) + case "contentDistributionEndpoint": + err = unpopulate(val, "ContentDistributionEndpoint", &s.ContentDistributionEndpoint) + delete(rawMsg, key) + case "customDomains": + err = unpopulate(val, "CustomDomains", &s.CustomDomains) + delete(rawMsg, key) + case "defaultHostname": + err = unpopulate(val, "DefaultHostname", &s.DefaultHostname) + delete(rawMsg, key) + case "enterpriseGradeCdnStatus": + err = unpopulate(val, "EnterpriseGradeCdnStatus", &s.EnterpriseGradeCdnStatus) + delete(rawMsg, key) + case "keyVaultReferenceIdentity": + err = unpopulate(val, "KeyVaultReferenceIdentity", &s.KeyVaultReferenceIdentity) + delete(rawMsg, key) + case "linkedBackends": + err = unpopulate(val, "LinkedBackends", &s.LinkedBackends) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &s.PrivateEndpointConnections) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &s.Provider) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess) + delete(rawMsg, key) + case "repositoryToken": + err = unpopulate(val, "RepositoryToken", &s.RepositoryToken) + delete(rawMsg, key) + case "repositoryUrl": + err = unpopulate(val, "RepositoryURL", &s.RepositoryURL) + delete(rawMsg, key) + case "stagingEnvironmentPolicy": + err = unpopulate(val, "StagingEnvironmentPolicy", &s.StagingEnvironmentPolicy) + delete(rawMsg, key) + case "templateProperties": + err = unpopulate(val, "TemplateProperties", &s.TemplateProperties) + delete(rawMsg, key) + case "userProvidedFunctionApps": + err = unpopulate(val, "UserProvidedFunctionApps", &s.UserProvidedFunctionApps) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteARMResource. +func (s StaticSiteARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "identity", s.Identity) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "sku", s.SKU) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteARMResource. +func (s *StaticSiteARMResource) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &s.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &s.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteBuildARMResource. +func (s StaticSiteBuildARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteBuildARMResource. +func (s *StaticSiteBuildARMResource) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteBuildARMResourceProperties. +func (s StaticSiteBuildARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "buildId", s.BuildID) + populateTimeRFC3339(objectMap, "createdTimeUtc", s.CreatedTimeUTC) + populate(objectMap, "hostname", s.Hostname) + populateTimeRFC3339(objectMap, "lastUpdatedOn", s.LastUpdatedOn) + populate(objectMap, "linkedBackends", s.LinkedBackends) + populate(objectMap, "pullRequestTitle", s.PullRequestTitle) + populate(objectMap, "sourceBranch", s.SourceBranch) + populate(objectMap, "status", s.Status) + populate(objectMap, "userProvidedFunctionApps", s.UserProvidedFunctionApps) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteBuildARMResourceProperties. +func (s *StaticSiteBuildARMResourceProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "buildId": + err = unpopulate(val, "BuildID", &s.BuildID) + delete(rawMsg, key) + case "createdTimeUtc": + err = unpopulateTimeRFC3339(val, "CreatedTimeUTC", &s.CreatedTimeUTC) + delete(rawMsg, key) + case "hostname": + err = unpopulate(val, "Hostname", &s.Hostname) + delete(rawMsg, key) + case "lastUpdatedOn": + err = unpopulateTimeRFC3339(val, "LastUpdatedOn", &s.LastUpdatedOn) + delete(rawMsg, key) + case "linkedBackends": + err = unpopulate(val, "LinkedBackends", &s.LinkedBackends) + delete(rawMsg, key) + case "pullRequestTitle": + err = unpopulate(val, "PullRequestTitle", &s.PullRequestTitle) + delete(rawMsg, key) + case "sourceBranch": + err = unpopulate(val, "SourceBranch", &s.SourceBranch) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) + case "userProvidedFunctionApps": + err = unpopulate(val, "UserProvidedFunctionApps", &s.UserProvidedFunctionApps) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteBuildCollection. +func (s StaticSiteBuildCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteBuildCollection. +func (s *StaticSiteBuildCollection) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteBuildProperties. +func (s StaticSiteBuildProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "apiBuildCommand", s.APIBuildCommand) + populate(objectMap, "apiLocation", s.APILocation) + populate(objectMap, "appArtifactLocation", s.AppArtifactLocation) + populate(objectMap, "appBuildCommand", s.AppBuildCommand) + populate(objectMap, "appLocation", s.AppLocation) + populate(objectMap, "githubActionSecretNameOverride", s.GithubActionSecretNameOverride) + populate(objectMap, "outputLocation", s.OutputLocation) + populate(objectMap, "skipGithubActionWorkflowGeneration", s.SkipGithubActionWorkflowGeneration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteBuildProperties. +func (s *StaticSiteBuildProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiBuildCommand": + err = unpopulate(val, "APIBuildCommand", &s.APIBuildCommand) + delete(rawMsg, key) + case "apiLocation": + err = unpopulate(val, "APILocation", &s.APILocation) + delete(rawMsg, key) + case "appArtifactLocation": + err = unpopulate(val, "AppArtifactLocation", &s.AppArtifactLocation) + delete(rawMsg, key) + case "appBuildCommand": + err = unpopulate(val, "AppBuildCommand", &s.AppBuildCommand) + delete(rawMsg, key) + case "appLocation": + err = unpopulate(val, "AppLocation", &s.AppLocation) + delete(rawMsg, key) + case "githubActionSecretNameOverride": + err = unpopulate(val, "GithubActionSecretNameOverride", &s.GithubActionSecretNameOverride) + delete(rawMsg, key) + case "outputLocation": + err = unpopulate(val, "OutputLocation", &s.OutputLocation) + delete(rawMsg, key) + case "skipGithubActionWorkflowGeneration": + err = unpopulate(val, "SkipGithubActionWorkflowGeneration", &s.SkipGithubActionWorkflowGeneration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteCollection. +func (s StaticSiteCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteCollection. +func (s *StaticSiteCollection) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteCustomDomainOverviewARMResource. +func (s StaticSiteCustomDomainOverviewARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteCustomDomainOverviewARMResource. +func (s *StaticSiteCustomDomainOverviewARMResource) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteCustomDomainOverviewARMResourceProperties. +func (s StaticSiteCustomDomainOverviewARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) + populate(objectMap, "domainName", s.DomainName) + populate(objectMap, "errorMessage", s.ErrorMessage) + populate(objectMap, "status", s.Status) + populate(objectMap, "validationToken", s.ValidationToken) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteCustomDomainOverviewARMResourceProperties. +func (s *StaticSiteCustomDomainOverviewARMResourceProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdOn": + err = unpopulateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) + delete(rawMsg, key) + case "domainName": + err = unpopulate(val, "DomainName", &s.DomainName) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &s.ErrorMessage) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) + case "validationToken": + err = unpopulate(val, "ValidationToken", &s.ValidationToken) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteCustomDomainOverviewCollection. +func (s StaticSiteCustomDomainOverviewCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteCustomDomainOverviewCollection. +func (s *StaticSiteCustomDomainOverviewCollection) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteCustomDomainRequestPropertiesARMResource. +func (s StaticSiteCustomDomainRequestPropertiesARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteCustomDomainRequestPropertiesARMResource. +func (s *StaticSiteCustomDomainRequestPropertiesARMResource) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteCustomDomainRequestPropertiesARMResourceProperties. +func (s StaticSiteCustomDomainRequestPropertiesARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "validationMethod", s.ValidationMethod) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteCustomDomainRequestPropertiesARMResourceProperties. +func (s *StaticSiteCustomDomainRequestPropertiesARMResourceProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "validationMethod": + err = unpopulate(val, "ValidationMethod", &s.ValidationMethod) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteFunctionOverviewARMResource. +func (s StaticSiteFunctionOverviewARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteFunctionOverviewARMResource. +func (s *StaticSiteFunctionOverviewARMResource) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteFunctionOverviewARMResourceProperties. +func (s StaticSiteFunctionOverviewARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "functionName", s.FunctionName) + populate(objectMap, "triggerType", s.TriggerType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteFunctionOverviewARMResourceProperties. +func (s *StaticSiteFunctionOverviewARMResourceProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "functionName": + err = unpopulate(val, "FunctionName", &s.FunctionName) + delete(rawMsg, key) + case "triggerType": + err = unpopulate(val, "TriggerType", &s.TriggerType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteFunctionOverviewCollection. +func (s StaticSiteFunctionOverviewCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteFunctionOverviewCollection. +func (s *StaticSiteFunctionOverviewCollection) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteLinkedBackend. +func (s StaticSiteLinkedBackend) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "backendResourceId", s.BackendResourceID) + populateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "region", s.Region) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteLinkedBackend. +func (s *StaticSiteLinkedBackend) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backendResourceId": + err = unpopulate(val, "BackendResourceID", &s.BackendResourceID) + delete(rawMsg, key) + case "createdOn": + err = unpopulateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "region": + err = unpopulate(val, "Region", &s.Region) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteLinkedBackendARMResource. +func (s StaticSiteLinkedBackendARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteLinkedBackendARMResource. +func (s *StaticSiteLinkedBackendARMResource) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteLinkedBackendARMResourceProperties. +func (s StaticSiteLinkedBackendARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "backendResourceId", s.BackendResourceID) + populateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "region", s.Region) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteLinkedBackendARMResourceProperties. +func (s *StaticSiteLinkedBackendARMResourceProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backendResourceId": + err = unpopulate(val, "BackendResourceID", &s.BackendResourceID) + delete(rawMsg, key) + case "createdOn": + err = unpopulateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "region": + err = unpopulate(val, "Region", &s.Region) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteLinkedBackendsCollection. +func (s StaticSiteLinkedBackendsCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteLinkedBackendsCollection. +func (s *StaticSiteLinkedBackendsCollection) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSitePatchResource. +func (s StaticSitePatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSitePatchResource. +func (s *StaticSitePatchResource) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteResetPropertiesARMResource. +func (s StaticSiteResetPropertiesARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteResetPropertiesARMResource. +func (s *StaticSiteResetPropertiesARMResource) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteResetPropertiesARMResourceProperties. +func (s StaticSiteResetPropertiesARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "repositoryToken", s.RepositoryToken) + populate(objectMap, "shouldUpdateRepository", s.ShouldUpdateRepository) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteResetPropertiesARMResourceProperties. +func (s *StaticSiteResetPropertiesARMResourceProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "repositoryToken": + err = unpopulate(val, "RepositoryToken", &s.RepositoryToken) + delete(rawMsg, key) + case "shouldUpdateRepository": + err = unpopulate(val, "ShouldUpdateRepository", &s.ShouldUpdateRepository) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteTemplateOptions. +func (s StaticSiteTemplateOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", s.Description) + populate(objectMap, "isPrivate", s.IsPrivate) + populate(objectMap, "owner", s.Owner) + populate(objectMap, "repositoryName", s.RepositoryName) + populate(objectMap, "templateRepositoryUrl", s.TemplateRepositoryURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteTemplateOptions. +func (s *StaticSiteTemplateOptions) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "isPrivate": + err = unpopulate(val, "IsPrivate", &s.IsPrivate) + delete(rawMsg, key) + case "owner": + err = unpopulate(val, "Owner", &s.Owner) + delete(rawMsg, key) + case "repositoryName": + err = unpopulate(val, "RepositoryName", &s.RepositoryName) + delete(rawMsg, key) + case "templateRepositoryUrl": + err = unpopulate(val, "TemplateRepositoryURL", &s.TemplateRepositoryURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserARMResource. +func (s StaticSiteUserARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserARMResource. +func (s *StaticSiteUserARMResource) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserARMResourceProperties. +func (s StaticSiteUserARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "displayName", s.DisplayName) + populate(objectMap, "provider", s.Provider) + populate(objectMap, "roles", s.Roles) + populate(objectMap, "userId", s.UserID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserARMResourceProperties. +func (s *StaticSiteUserARMResourceProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &s.DisplayName) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &s.Provider) + delete(rawMsg, key) + case "roles": + err = unpopulate(val, "Roles", &s.Roles) + delete(rawMsg, key) + case "userId": + err = unpopulate(val, "UserID", &s.UserID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserCollection. +func (s StaticSiteUserCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserCollection. +func (s *StaticSiteUserCollection) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserInvitationRequestResource. +func (s StaticSiteUserInvitationRequestResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserInvitationRequestResource. +func (s *StaticSiteUserInvitationRequestResource) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserInvitationRequestResourceProperties. +func (s StaticSiteUserInvitationRequestResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "domain", s.Domain) + populate(objectMap, "numHoursToExpiration", s.NumHoursToExpiration) + populate(objectMap, "provider", s.Provider) + populate(objectMap, "roles", s.Roles) + populate(objectMap, "userDetails", s.UserDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserInvitationRequestResourceProperties. +func (s *StaticSiteUserInvitationRequestResourceProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "domain": + err = unpopulate(val, "Domain", &s.Domain) + delete(rawMsg, key) + case "numHoursToExpiration": + err = unpopulate(val, "NumHoursToExpiration", &s.NumHoursToExpiration) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &s.Provider) + delete(rawMsg, key) + case "roles": + err = unpopulate(val, "Roles", &s.Roles) + delete(rawMsg, key) + case "userDetails": + err = unpopulate(val, "UserDetails", &s.UserDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserInvitationResponseResource. +func (s StaticSiteUserInvitationResponseResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserInvitationResponseResource. +func (s *StaticSiteUserInvitationResponseResource) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserInvitationResponseResourceProperties. +func (s StaticSiteUserInvitationResponseResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populateTimeRFC3339(objectMap, "expiresOn", s.ExpiresOn) + populate(objectMap, "invitationUrl", s.InvitationURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserInvitationResponseResourceProperties. +func (s *StaticSiteUserInvitationResponseResourceProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expiresOn": + err = unpopulateTimeRFC3339(val, "ExpiresOn", &s.ExpiresOn) + delete(rawMsg, key) + case "invitationUrl": + err = unpopulate(val, "InvitationURL", &s.InvitationURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserProvidedFunctionApp. +func (s StaticSiteUserProvidedFunctionApp) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserProvidedFunctionApp. +func (s *StaticSiteUserProvidedFunctionApp) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserProvidedFunctionAppARMResource. +func (s StaticSiteUserProvidedFunctionAppARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserProvidedFunctionAppARMResource. +func (s *StaticSiteUserProvidedFunctionAppARMResource) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserProvidedFunctionAppARMResourceProperties. +func (s StaticSiteUserProvidedFunctionAppARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) + populate(objectMap, "functionAppRegion", s.FunctionAppRegion) + populate(objectMap, "functionAppResourceId", s.FunctionAppResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserProvidedFunctionAppARMResourceProperties. +func (s *StaticSiteUserProvidedFunctionAppARMResourceProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdOn": + err = unpopulateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) + delete(rawMsg, key) + case "functionAppRegion": + err = unpopulate(val, "FunctionAppRegion", &s.FunctionAppRegion) + delete(rawMsg, key) + case "functionAppResourceId": + err = unpopulate(val, "FunctionAppResourceID", &s.FunctionAppResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserProvidedFunctionAppProperties. +func (s StaticSiteUserProvidedFunctionAppProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) + populate(objectMap, "functionAppRegion", s.FunctionAppRegion) + populate(objectMap, "functionAppResourceId", s.FunctionAppResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserProvidedFunctionAppProperties. +func (s *StaticSiteUserProvidedFunctionAppProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdOn": + err = unpopulateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) + delete(rawMsg, key) + case "functionAppRegion": + err = unpopulate(val, "FunctionAppRegion", &s.FunctionAppRegion) + delete(rawMsg, key) + case "functionAppResourceId": + err = unpopulate(val, "FunctionAppResourceID", &s.FunctionAppResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserProvidedFunctionAppsCollection. +func (s StaticSiteUserProvidedFunctionAppsCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserProvidedFunctionAppsCollection. +func (s *StaticSiteUserProvidedFunctionAppsCollection) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteZipDeployment. +func (s StaticSiteZipDeployment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "apiZipUrl", s.APIZipURL) + populate(objectMap, "appZipUrl", s.AppZipURL) + populate(objectMap, "deploymentTitle", s.DeploymentTitle) + populate(objectMap, "functionLanguage", s.FunctionLanguage) + populate(objectMap, "provider", s.Provider) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteZipDeployment. +func (s *StaticSiteZipDeployment) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiZipUrl": + err = unpopulate(val, "APIZipURL", &s.APIZipURL) + delete(rawMsg, key) + case "appZipUrl": + err = unpopulate(val, "AppZipURL", &s.AppZipURL) + delete(rawMsg, key) + case "deploymentTitle": + err = unpopulate(val, "DeploymentTitle", &s.DeploymentTitle) + delete(rawMsg, key) + case "functionLanguage": + err = unpopulate(val, "FunctionLanguage", &s.FunctionLanguage) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &s.Provider) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteZipDeploymentARMResource. +func (s StaticSiteZipDeploymentARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteZipDeploymentARMResource. +func (s *StaticSiteZipDeploymentARMResource) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSitesWorkflowPreview. +func (s StaticSitesWorkflowPreview) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSitesWorkflowPreview. +func (s *StaticSitesWorkflowPreview) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSitesWorkflowPreviewProperties. +func (s StaticSitesWorkflowPreviewProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "contents", s.Contents) + populate(objectMap, "path", s.Path) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSitesWorkflowPreviewProperties. +func (s *StaticSitesWorkflowPreviewProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "contents": + err = unpopulate(val, "Contents", &s.Contents) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &s.Path) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSitesWorkflowPreviewRequest. +func (s StaticSitesWorkflowPreviewRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSitesWorkflowPreviewRequest. +func (s *StaticSitesWorkflowPreviewRequest) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSitesWorkflowPreviewRequestProperties. +func (s StaticSitesWorkflowPreviewRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "branch", s.Branch) + populate(objectMap, "buildProperties", s.BuildProperties) + populate(objectMap, "repositoryUrl", s.RepositoryURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSitesWorkflowPreviewRequestProperties. +func (s *StaticSitesWorkflowPreviewRequestProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "branch": + err = unpopulate(val, "Branch", &s.Branch) + delete(rawMsg, key) + case "buildProperties": + err = unpopulate(val, "BuildProperties", &s.BuildProperties) + delete(rawMsg, key) + case "repositoryUrl": + err = unpopulate(val, "RepositoryURL", &s.RepositoryURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Status. +func (s Status) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "message", s.Message) + populate(objectMap, "statusId", s.StatusID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Status. +func (s *Status) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "message": + err = unpopulate(val, "Message", &s.Message) + delete(rawMsg, key) + case "statusId": + err = unpopulate(val, "StatusID", &s.StatusID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StatusCodesBasedTrigger. +func (s StatusCodesBasedTrigger) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "count", s.Count) + populate(objectMap, "path", s.Path) + populate(objectMap, "status", s.Status) + populate(objectMap, "subStatus", s.SubStatus) + populate(objectMap, "timeInterval", s.TimeInterval) + populate(objectMap, "win32Status", s.Win32Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StatusCodesBasedTrigger. +func (s *StatusCodesBasedTrigger) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &s.Count) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &s.Path) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) + case "subStatus": + err = unpopulate(val, "SubStatus", &s.SubStatus) + delete(rawMsg, key) + case "timeInterval": + err = unpopulate(val, "TimeInterval", &s.TimeInterval) + delete(rawMsg, key) + case "win32Status": + err = unpopulate(val, "Win32Status", &s.Win32Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StatusCodesRangeBasedTrigger. +func (s StatusCodesRangeBasedTrigger) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "count", s.Count) + populate(objectMap, "path", s.Path) + populate(objectMap, "statusCodes", s.StatusCodes) + populate(objectMap, "timeInterval", s.TimeInterval) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StatusCodesRangeBasedTrigger. +func (s *StatusCodesRangeBasedTrigger) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &s.Count) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &s.Path) + delete(rawMsg, key) + case "statusCodes": + err = unpopulate(val, "StatusCodes", &s.StatusCodes) + delete(rawMsg, key) + case "timeInterval": + err = unpopulate(val, "TimeInterval", &s.TimeInterval) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageMigrationOptions. +func (s StorageMigrationOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageMigrationOptions. +func (s *StorageMigrationOptions) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageMigrationOptionsProperties. +func (s StorageMigrationOptionsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "azurefilesConnectionString", s.AzurefilesConnectionString) + populate(objectMap, "azurefilesShare", s.AzurefilesShare) + populate(objectMap, "blockWriteAccessToSite", s.BlockWriteAccessToSite) + populate(objectMap, "switchSiteAfterMigration", s.SwitchSiteAfterMigration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageMigrationOptionsProperties. +func (s *StorageMigrationOptionsProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azurefilesConnectionString": + err = unpopulate(val, "AzurefilesConnectionString", &s.AzurefilesConnectionString) + delete(rawMsg, key) + case "azurefilesShare": + err = unpopulate(val, "AzurefilesShare", &s.AzurefilesShare) + delete(rawMsg, key) + case "blockWriteAccessToSite": + err = unpopulate(val, "BlockWriteAccessToSite", &s.BlockWriteAccessToSite) + delete(rawMsg, key) + case "switchSiteAfterMigration": + err = unpopulate(val, "SwitchSiteAfterMigration", &s.SwitchSiteAfterMigration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageMigrationResponse. +func (s StorageMigrationResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageMigrationResponse. +func (s *StorageMigrationResponse) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageMigrationResponseProperties. +func (s StorageMigrationResponseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "operationId", s.OperationID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageMigrationResponseProperties. +func (s *StorageMigrationResponseProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "operationId": + err = unpopulate(val, "OperationID", &s.OperationID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StringDictionary. +func (s StringDictionary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StringDictionary. +func (s *StringDictionary) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StringList. +func (s StringList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StringList. +func (s *StringList) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubResource. +func (s SubResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubResource. +func (s *SubResource) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SupportTopic. +func (s SupportTopic) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "pesId", s.PesID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SupportTopic. +func (s *SupportTopic) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "pesId": + err = unpopulate(val, "PesID", &s.PesID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SwiftVirtualNetwork. +func (s SwiftVirtualNetwork) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SwiftVirtualNetwork. +func (s *SwiftVirtualNetwork) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SwiftVirtualNetworkProperties. +func (s SwiftVirtualNetworkProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "subnetResourceId", s.SubnetResourceID) + populate(objectMap, "swiftSupported", s.SwiftSupported) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SwiftVirtualNetworkProperties. +func (s *SwiftVirtualNetworkProperties) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "subnetResourceId": + err = unpopulate(val, "SubnetResourceID", &s.SubnetResourceID) + delete(rawMsg, key) + case "swiftSupported": + err = unpopulate(val, "SwiftSupported", &s.SwiftSupported) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Template. +func (t Template) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "containers", t.Containers) + populate(objectMap, "dapr", t.Dapr) + populate(objectMap, "revisionSuffix", t.RevisionSuffix) + populate(objectMap, "scale", t.Scale) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Template. +func (t *Template) 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", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containers": + err = unpopulate(val, "Containers", &t.Containers) + delete(rawMsg, key) + case "dapr": + err = unpopulate(val, "Dapr", &t.Dapr) + delete(rawMsg, key) + case "revisionSuffix": + err = unpopulate(val, "RevisionSuffix", &t.RevisionSuffix) + delete(rawMsg, key) + case "scale": + err = unpopulate(val, "Scale", &t.Scale) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TldLegalAgreement. +func (t TldLegalAgreement) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "agreementKey", t.AgreementKey) + populate(objectMap, "content", t.Content) + populate(objectMap, "title", t.Title) + populate(objectMap, "url", t.URL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TldLegalAgreement. +func (t *TldLegalAgreement) 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", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agreementKey": + err = unpopulate(val, "AgreementKey", &t.AgreementKey) + delete(rawMsg, key) + case "content": + err = unpopulate(val, "Content", &t.Content) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &t.Title) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &t.URL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TldLegalAgreementCollection. +func (t TldLegalAgreementCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TldLegalAgreementCollection. +func (t *TldLegalAgreementCollection) 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", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TokenStore. +func (t TokenStore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "azureBlobStorage", t.AzureBlobStorage) + populate(objectMap, "enabled", t.Enabled) + populate(objectMap, "fileSystem", t.FileSystem) + populate(objectMap, "tokenRefreshExtensionHours", t.TokenRefreshExtensionHours) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TokenStore. +func (t *TokenStore) 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", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureBlobStorage": + err = unpopulate(val, "AzureBlobStorage", &t.AzureBlobStorage) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &t.Enabled) + delete(rawMsg, key) + case "fileSystem": + err = unpopulate(val, "FileSystem", &t.FileSystem) + delete(rawMsg, key) + case "tokenRefreshExtensionHours": + err = unpopulate(val, "TokenRefreshExtensionHours", &t.TokenRefreshExtensionHours) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TopLevelDomain. +func (t TopLevelDomain) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", t.ID) + populate(objectMap, "kind", t.Kind) + populate(objectMap, "name", t.Name) + populate(objectMap, "properties", t.Properties) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TopLevelDomain. +func (t *TopLevelDomain) 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", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &t.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TopLevelDomainAgreementOption. +func (t TopLevelDomainAgreementOption) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "forTransfer", t.ForTransfer) + populate(objectMap, "includePrivacy", t.IncludePrivacy) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TopLevelDomainAgreementOption. +func (t *TopLevelDomainAgreementOption) 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", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "forTransfer": + err = unpopulate(val, "ForTransfer", &t.ForTransfer) + delete(rawMsg, key) + case "includePrivacy": + err = unpopulate(val, "IncludePrivacy", &t.IncludePrivacy) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TopLevelDomainCollection. +func (t TopLevelDomainCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TopLevelDomainCollection. +func (t *TopLevelDomainCollection) 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", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TopLevelDomainProperties. +func (t TopLevelDomainProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "privacy", t.Privacy) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TopLevelDomainProperties. +func (t *TopLevelDomainProperties) 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", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privacy": + err = unpopulate(val, "Privacy", &t.Privacy) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TrafficWeight. +func (t TrafficWeight) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "latestRevision", t.LatestRevision) + populate(objectMap, "revisionName", t.RevisionName) + populate(objectMap, "weight", t.Weight) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TrafficWeight. +func (t *TrafficWeight) 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", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "latestRevision": + err = unpopulate(val, "LatestRevision", &t.LatestRevision) + delete(rawMsg, key) + case "revisionName": + err = unpopulate(val, "RevisionName", &t.RevisionName) + delete(rawMsg, key) + case "weight": + err = unpopulate(val, "Weight", &t.Weight) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TriggeredJobHistory. +func (t TriggeredJobHistory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", t.ID) + populate(objectMap, "kind", t.Kind) + populate(objectMap, "name", t.Name) + populate(objectMap, "properties", t.Properties) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggeredJobHistory. +func (t *TriggeredJobHistory) 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", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &t.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TriggeredJobHistoryCollection. +func (t TriggeredJobHistoryCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggeredJobHistoryCollection. +func (t *TriggeredJobHistoryCollection) 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", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TriggeredJobHistoryProperties. +func (t TriggeredJobHistoryProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "runs", t.Runs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggeredJobHistoryProperties. +func (t *TriggeredJobHistoryProperties) 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", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "runs": + err = unpopulate(val, "Runs", &t.Runs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TriggeredJobRun. +func (t TriggeredJobRun) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "duration", t.Duration) + populateTimeRFC3339(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) + populate(objectMap, "status", t.Status) + populate(objectMap, "trigger", t.Trigger) + populate(objectMap, "url", t.URL) + populate(objectMap, "web_job_id", t.WebJobID) + populate(objectMap, "web_job_name", t.WebJobName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggeredJobRun. +func (t *TriggeredJobRun) 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", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "duration": + err = unpopulate(val, "Duration", &t.Duration) + delete(rawMsg, key) + case "end_time": + err = unpopulateTimeRFC3339(val, "EndTime", &t.EndTime) + delete(rawMsg, key) + case "error_url": + err = unpopulate(val, "ErrorURL", &t.ErrorURL) + delete(rawMsg, key) + case "job_name": + err = unpopulate(val, "JobName", &t.JobName) + delete(rawMsg, key) + case "output_url": + err = unpopulate(val, "OutputURL", &t.OutputURL) + delete(rawMsg, key) + case "start_time": + err = unpopulateTimeRFC3339(val, "StartTime", &t.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &t.Status) + delete(rawMsg, key) + case "trigger": + err = unpopulate(val, "Trigger", &t.Trigger) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &t.URL) + delete(rawMsg, key) + case "web_job_id": + err = unpopulate(val, "WebJobID", &t.WebJobID) + delete(rawMsg, key) + case "web_job_name": + err = unpopulate(val, "WebJobName", &t.WebJobName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TriggeredWebJob. +func (t TriggeredWebJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", t.ID) + populate(objectMap, "kind", t.Kind) + populate(objectMap, "name", t.Name) + populate(objectMap, "properties", t.Properties) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggeredWebJob. +func (t *TriggeredWebJob) 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", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &t.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TriggeredWebJobCollection. +func (t TriggeredWebJobCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggeredWebJobCollection. +func (t *TriggeredWebJobCollection) 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", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TriggeredWebJobProperties. +func (t TriggeredWebJobProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "error", t.Error) + populate(objectMap, "extra_info_url", t.ExtraInfoURL) + populate(objectMap, "history_url", t.HistoryURL) + populate(objectMap, "latest_run", t.LatestRun) + populate(objectMap, "publicNetworkAccess", t.PublicNetworkAccess) + populate(objectMap, "run_command", t.RunCommand) + populate(objectMap, "scheduler_logs_url", t.SchedulerLogsURL) + populate(objectMap, "settings", t.Settings) + populate(objectMap, "storageAccountRequired", t.StorageAccountRequired) + populate(objectMap, "url", t.URL) + populate(objectMap, "using_sdk", t.UsingSdk) + populate(objectMap, "web_job_type", t.WebJobType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggeredWebJobProperties. +func (t *TriggeredWebJobProperties) 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", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &t.Error) + delete(rawMsg, key) + case "extra_info_url": + err = unpopulate(val, "ExtraInfoURL", &t.ExtraInfoURL) + delete(rawMsg, key) + case "history_url": + err = unpopulate(val, "HistoryURL", &t.HistoryURL) + delete(rawMsg, key) + case "latest_run": + err = unpopulate(val, "LatestRun", &t.LatestRun) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &t.PublicNetworkAccess) + delete(rawMsg, key) + case "run_command": + err = unpopulate(val, "RunCommand", &t.RunCommand) + delete(rawMsg, key) + case "scheduler_logs_url": + err = unpopulate(val, "SchedulerLogsURL", &t.SchedulerLogsURL) + delete(rawMsg, key) + case "settings": + err = unpopulate(val, "Settings", &t.Settings) + delete(rawMsg, key) + case "storageAccountRequired": + err = unpopulate(val, "StorageAccountRequired", &t.StorageAccountRequired) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &t.URL) + delete(rawMsg, key) + case "using_sdk": + err = unpopulate(val, "UsingSdk", &t.UsingSdk) + delete(rawMsg, key) + case "web_job_type": + err = unpopulate(val, "WebJobType", &t.WebJobType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Twitter. +func (t Twitter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "enabled", t.Enabled) + populate(objectMap, "registration", t.Registration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Twitter. +func (t *Twitter) 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", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &t.Enabled) + delete(rawMsg, key) + case "registration": + err = unpopulate(val, "Registration", &t.Registration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TwitterRegistration. +func (t TwitterRegistration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "consumerKey", t.ConsumerKey) + populate(objectMap, "consumerSecretSettingName", t.ConsumerSecretSettingName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TwitterRegistration. +func (t *TwitterRegistration) 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", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "consumerKey": + err = unpopulate(val, "ConsumerKey", &t.ConsumerKey) + delete(rawMsg, key) + case "consumerSecretSettingName": + err = unpopulate(val, "ConsumerSecretSettingName", &t.ConsumerSecretSettingName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Usage. +func (u Usage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", u.ID) + populate(objectMap, "kind", u.Kind) + populate(objectMap, "name", u.Name) + populate(objectMap, "properties", u.Properties) + populate(objectMap, "type", u.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Usage. +func (u *Usage) 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", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &u.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &u.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &u.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &u.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UsageCollection. +func (u UsageCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", u.NextLink) + populate(objectMap, "value", u.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UsageCollection. +func (u *UsageCollection) 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", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &u.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &u.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UsageProperties. +func (u UsageProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "computeMode", u.ComputeMode) + populate(objectMap, "currentValue", u.CurrentValue) + populate(objectMap, "displayName", u.DisplayName) + populate(objectMap, "limit", u.Limit) + populateTimeRFC3339(objectMap, "nextResetTime", u.NextResetTime) + populate(objectMap, "resourceName", u.ResourceName) + populate(objectMap, "siteMode", u.SiteMode) + populate(objectMap, "unit", u.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UsageProperties. +func (u *UsageProperties) 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", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeMode": + err = unpopulate(val, "ComputeMode", &u.ComputeMode) + delete(rawMsg, key) + case "currentValue": + err = unpopulate(val, "CurrentValue", &u.CurrentValue) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &u.DisplayName) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &u.Limit) + delete(rawMsg, key) + case "nextResetTime": + err = unpopulateTimeRFC3339(val, "NextResetTime", &u.NextResetTime) + delete(rawMsg, key) + case "resourceName": + err = unpopulate(val, "ResourceName", &u.ResourceName) + delete(rawMsg, key) + case "siteMode": + err = unpopulate(val, "SiteMode", &u.SiteMode) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &u.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type User. +func (u User) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", u.ID) + populate(objectMap, "kind", u.Kind) + populate(objectMap, "name", u.Name) + populate(objectMap, "properties", u.Properties) + populate(objectMap, "type", u.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type User. +func (u *User) 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", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &u.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &u.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &u.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &u.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity. +func (u UserAssignedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "clientId", u.ClientID) + populate(objectMap, "principalId", u.PrincipalID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity. +func (u *UserAssignedIdentity) 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", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &u.ClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &u.PrincipalID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserProperties. +func (u UserProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "publishingPassword", u.PublishingPassword) + populate(objectMap, "publishingPasswordHash", u.PublishingPasswordHash) + populate(objectMap, "publishingPasswordHashSalt", u.PublishingPasswordHashSalt) + populate(objectMap, "publishingUserName", u.PublishingUserName) + populate(objectMap, "scmUri", u.ScmURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserProperties. +func (u *UserProperties) 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", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "publishingPassword": + err = unpopulate(val, "PublishingPassword", &u.PublishingPassword) + delete(rawMsg, key) + case "publishingPasswordHash": + err = unpopulate(val, "PublishingPasswordHash", &u.PublishingPasswordHash) + delete(rawMsg, key) + case "publishingPasswordHashSalt": + err = unpopulate(val, "PublishingPasswordHashSalt", &u.PublishingPasswordHashSalt) + delete(rawMsg, key) + case "publishingUserName": + err = unpopulate(val, "PublishingUserName", &u.PublishingUserName) + delete(rawMsg, key) + case "scmUri": + err = unpopulate(val, "ScmURI", &u.ScmURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateProperties. +func (v ValidateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "appServiceEnvironment", v.AppServiceEnvironment) + populate(objectMap, "capacity", v.Capacity) + populate(objectMap, "containerImagePlatform", v.ContainerImagePlatform) + populate(objectMap, "containerImageRepository", v.ContainerImageRepository) + populate(objectMap, "containerImageTag", v.ContainerImageTag) + populate(objectMap, "containerRegistryBaseUrl", v.ContainerRegistryBaseURL) + populate(objectMap, "containerRegistryPassword", v.ContainerRegistryPassword) + populate(objectMap, "containerRegistryUsername", v.ContainerRegistryUsername) + populate(objectMap, "hostingEnvironment", v.HostingEnvironment) + populate(objectMap, "isSpot", v.IsSpot) + populate(objectMap, "isXenon", v.IsXenon) + populate(objectMap, "needLinuxWorkers", v.NeedLinuxWorkers) + populate(objectMap, "skuName", v.SKUName) + populate(objectMap, "serverFarmId", v.ServerFarmID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateProperties. +func (v *ValidateProperties) 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", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appServiceEnvironment": + err = unpopulate(val, "AppServiceEnvironment", &v.AppServiceEnvironment) + delete(rawMsg, key) + case "capacity": + err = unpopulate(val, "Capacity", &v.Capacity) + delete(rawMsg, key) + case "containerImagePlatform": + err = unpopulate(val, "ContainerImagePlatform", &v.ContainerImagePlatform) + delete(rawMsg, key) + case "containerImageRepository": + err = unpopulate(val, "ContainerImageRepository", &v.ContainerImageRepository) + delete(rawMsg, key) + case "containerImageTag": + err = unpopulate(val, "ContainerImageTag", &v.ContainerImageTag) + delete(rawMsg, key) + case "containerRegistryBaseUrl": + err = unpopulate(val, "ContainerRegistryBaseURL", &v.ContainerRegistryBaseURL) + delete(rawMsg, key) + case "containerRegistryPassword": + err = unpopulate(val, "ContainerRegistryPassword", &v.ContainerRegistryPassword) + delete(rawMsg, key) + case "containerRegistryUsername": + err = unpopulate(val, "ContainerRegistryUsername", &v.ContainerRegistryUsername) + delete(rawMsg, key) + case "hostingEnvironment": + err = unpopulate(val, "HostingEnvironment", &v.HostingEnvironment) + delete(rawMsg, key) + case "isSpot": + err = unpopulate(val, "IsSpot", &v.IsSpot) + delete(rawMsg, key) + case "isXenon": + err = unpopulate(val, "IsXenon", &v.IsXenon) + delete(rawMsg, key) + case "needLinuxWorkers": + err = unpopulate(val, "NeedLinuxWorkers", &v.NeedLinuxWorkers) + delete(rawMsg, key) + case "skuName": + err = unpopulate(val, "SKUName", &v.SKUName) + delete(rawMsg, key) + case "serverFarmId": + err = unpopulate(val, "ServerFarmID", &v.ServerFarmID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateRequest. +func (v ValidateRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateRequest. +func (v *ValidateRequest) 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", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateResponse. +func (v ValidateResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "error", v.Error) + populate(objectMap, "status", v.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateResponse. +func (v *ValidateResponse) 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", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &v.Error) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &v.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateResponseError. +func (v ValidateResponseError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", v.Code) + populate(objectMap, "message", v.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateResponseError. +func (v *ValidateResponseError) 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", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &v.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &v.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplication. +func (v VirtualApplication) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "physicalPath", v.PhysicalPath) + populate(objectMap, "preloadEnabled", v.PreloadEnabled) + populate(objectMap, "virtualDirectories", v.VirtualDirectories) + populate(objectMap, "virtualPath", v.VirtualPath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplication. +func (v *VirtualApplication) 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", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "physicalPath": + err = unpopulate(val, "PhysicalPath", &v.PhysicalPath) + delete(rawMsg, key) + case "preloadEnabled": + err = unpopulate(val, "PreloadEnabled", &v.PreloadEnabled) + delete(rawMsg, key) + case "virtualDirectories": + err = unpopulate(val, "VirtualDirectories", &v.VirtualDirectories) + delete(rawMsg, key) + case "virtualPath": + err = unpopulate(val, "VirtualPath", &v.VirtualPath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualDirectory. +func (v VirtualDirectory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "physicalPath", v.PhysicalPath) + populate(objectMap, "virtualPath", v.VirtualPath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualDirectory. +func (v *VirtualDirectory) 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", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "physicalPath": + err = unpopulate(val, "PhysicalPath", &v.PhysicalPath) + delete(rawMsg, key) + case "virtualPath": + err = unpopulate(val, "VirtualPath", &v.VirtualPath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualIPMapping. +func (v VirtualIPMapping) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "inUse", v.InUse) + populate(objectMap, "internalHttpPort", v.InternalHTTPPort) + populate(objectMap, "internalHttpsPort", v.InternalHTTPSPort) + populate(objectMap, "serviceName", v.ServiceName) + populate(objectMap, "virtualIP", v.VirtualIP) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualIPMapping. +func (v *VirtualIPMapping) 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", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "inUse": + err = unpopulate(val, "InUse", &v.InUse) + delete(rawMsg, key) + case "internalHttpPort": + err = unpopulate(val, "InternalHTTPPort", &v.InternalHTTPPort) + delete(rawMsg, key) + case "internalHttpsPort": + err = unpopulate(val, "InternalHTTPSPort", &v.InternalHTTPSPort) + delete(rawMsg, key) + case "serviceName": + err = unpopulate(val, "ServiceName", &v.ServiceName) + delete(rawMsg, key) + case "virtualIP": + err = unpopulate(val, "VirtualIP", &v.VirtualIP) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkProfile. +func (v VirtualNetworkProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "subnet", v.Subnet) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkProfile. +func (v *VirtualNetworkProfile) 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", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &v.Subnet) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetGateway. +func (v VnetGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", v.ID) + populate(objectMap, "kind", v.Kind) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetGateway. +func (v *VnetGateway) 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", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &v.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetGatewayProperties. +func (v VnetGatewayProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "vpnPackageUri", v.VPNPackageURI) + populate(objectMap, "vnetName", v.VnetName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetGatewayProperties. +func (v *VnetGatewayProperties) 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", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "vpnPackageUri": + err = unpopulate(val, "VPNPackageURI", &v.VPNPackageURI) + delete(rawMsg, key) + case "vnetName": + err = unpopulate(val, "VnetName", &v.VnetName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetInfo. +func (v VnetInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "certBlob", v.CertBlob) + populate(objectMap, "certThumbprint", v.CertThumbprint) + populate(objectMap, "dnsServers", v.DNSServers) + populate(objectMap, "isSwift", v.IsSwift) + populate(objectMap, "resyncRequired", v.ResyncRequired) + populate(objectMap, "routes", v.Routes) + populate(objectMap, "vnetResourceId", v.VnetResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetInfo. +func (v *VnetInfo) 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", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certBlob": + err = unpopulate(val, "CertBlob", &v.CertBlob) + delete(rawMsg, key) + case "certThumbprint": + err = unpopulate(val, "CertThumbprint", &v.CertThumbprint) + delete(rawMsg, key) + case "dnsServers": + err = unpopulate(val, "DNSServers", &v.DNSServers) + delete(rawMsg, key) + case "isSwift": + err = unpopulate(val, "IsSwift", &v.IsSwift) + delete(rawMsg, key) + case "resyncRequired": + err = unpopulate(val, "ResyncRequired", &v.ResyncRequired) + delete(rawMsg, key) + case "routes": + err = unpopulate(val, "Routes", &v.Routes) + delete(rawMsg, key) + case "vnetResourceId": + err = unpopulate(val, "VnetResourceID", &v.VnetResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetInfoResource. +func (v VnetInfoResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", v.ID) + populate(objectMap, "kind", v.Kind) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetInfoResource. +func (v *VnetInfoResource) 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", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &v.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetParameters. +func (v VnetParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", v.ID) + populate(objectMap, "kind", v.Kind) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetParameters. +func (v *VnetParameters) 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", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &v.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetParametersProperties. +func (v VnetParametersProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "subnetResourceId", v.SubnetResourceID) + populate(objectMap, "vnetName", v.VnetName) + populate(objectMap, "vnetResourceGroup", v.VnetResourceGroup) + populate(objectMap, "vnetSubnetName", v.VnetSubnetName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetParametersProperties. +func (v *VnetParametersProperties) 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", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "subnetResourceId": + err = unpopulate(val, "SubnetResourceID", &v.SubnetResourceID) + delete(rawMsg, key) + case "vnetName": + err = unpopulate(val, "VnetName", &v.VnetName) + delete(rawMsg, key) + case "vnetResourceGroup": + err = unpopulate(val, "VnetResourceGroup", &v.VnetResourceGroup) + delete(rawMsg, key) + case "vnetSubnetName": + err = unpopulate(val, "VnetSubnetName", &v.VnetSubnetName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetRoute. +func (v VnetRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", v.ID) + populate(objectMap, "kind", v.Kind) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetRoute. +func (v *VnetRoute) 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", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &v.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetRouteProperties. +func (v VnetRouteProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "endAddress", v.EndAddress) + populate(objectMap, "routeType", v.RouteType) + populate(objectMap, "startAddress", v.StartAddress) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetRouteProperties. +func (v *VnetRouteProperties) 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", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endAddress": + err = unpopulate(val, "EndAddress", &v.EndAddress) + delete(rawMsg, key) + case "routeType": + err = unpopulate(val, "RouteType", &v.RouteType) + delete(rawMsg, key) + case "startAddress": + err = unpopulate(val, "StartAddress", &v.StartAddress) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetValidationFailureDetails. +func (v VnetValidationFailureDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", v.ID) + populate(objectMap, "kind", v.Kind) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetValidationFailureDetails. +func (v *VnetValidationFailureDetails) 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", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &v.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetValidationFailureDetailsProperties. +func (v VnetValidationFailureDetailsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "failed", v.Failed) + populate(objectMap, "failedTests", v.FailedTests) + populate(objectMap, "message", v.Message) + populate(objectMap, "warnings", v.Warnings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetValidationFailureDetailsProperties. +func (v *VnetValidationFailureDetailsProperties) 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", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "failed": + err = unpopulate(val, "Failed", &v.Failed) + delete(rawMsg, key) + case "failedTests": + err = unpopulate(val, "FailedTests", &v.FailedTests) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &v.Message) + delete(rawMsg, key) + case "warnings": + err = unpopulate(val, "Warnings", &v.Warnings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetValidationTestFailure. +func (v VnetValidationTestFailure) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", v.ID) + populate(objectMap, "kind", v.Kind) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetValidationTestFailure. +func (v *VnetValidationTestFailure) 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", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &v.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetValidationTestFailureProperties. +func (v VnetValidationTestFailureProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "details", v.Details) + populate(objectMap, "testName", v.TestName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetValidationTestFailureProperties. +func (v *VnetValidationTestFailureProperties) 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", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "details": + err = unpopulate(val, "Details", &v.Details) + delete(rawMsg, key) + case "testName": + err = unpopulate(val, "TestName", &v.TestName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebAppCollection. +func (w WebAppCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppCollection. +func (w *WebAppCollection) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebAppInstanceStatusCollection. +func (w WebAppInstanceStatusCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppInstanceStatusCollection. +func (w *WebAppInstanceStatusCollection) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebAppMajorVersion. +func (w WebAppMajorVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "displayText", w.DisplayText) + populate(objectMap, "minorVersions", w.MinorVersions) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppMajorVersion. +func (w *WebAppMajorVersion) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayText": + err = unpopulate(val, "DisplayText", &w.DisplayText) + delete(rawMsg, key) + case "minorVersions": + err = unpopulate(val, "MinorVersions", &w.MinorVersions) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebAppMinorVersion. +func (w WebAppMinorVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "displayText", w.DisplayText) + populate(objectMap, "stackSettings", w.StackSettings) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppMinorVersion. +func (w *WebAppMinorVersion) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayText": + err = unpopulate(val, "DisplayText", &w.DisplayText) + delete(rawMsg, key) + case "stackSettings": + err = unpopulate(val, "StackSettings", &w.StackSettings) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebAppRuntimeSettings. +func (w WebAppRuntimeSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "appInsightsSettings", w.AppInsightsSettings) + populateTimeRFC3339(objectMap, "endOfLifeDate", w.EndOfLifeDate) + populate(objectMap, "gitHubActionSettings", w.GitHubActionSettings) + populate(objectMap, "isAutoUpdate", w.IsAutoUpdate) + populate(objectMap, "isDeprecated", w.IsDeprecated) + populate(objectMap, "isEarlyAccess", w.IsEarlyAccess) + populate(objectMap, "isHidden", w.IsHidden) + populate(objectMap, "isPreview", w.IsPreview) + populate(objectMap, "remoteDebuggingSupported", w.RemoteDebuggingSupported) + populate(objectMap, "runtimeVersion", w.RuntimeVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppRuntimeSettings. +func (w *WebAppRuntimeSettings) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appInsightsSettings": + err = unpopulate(val, "AppInsightsSettings", &w.AppInsightsSettings) + delete(rawMsg, key) + case "endOfLifeDate": + err = unpopulateTimeRFC3339(val, "EndOfLifeDate", &w.EndOfLifeDate) + delete(rawMsg, key) + case "gitHubActionSettings": + err = unpopulate(val, "GitHubActionSettings", &w.GitHubActionSettings) + delete(rawMsg, key) + case "isAutoUpdate": + err = unpopulate(val, "IsAutoUpdate", &w.IsAutoUpdate) + delete(rawMsg, key) + case "isDeprecated": + err = unpopulate(val, "IsDeprecated", &w.IsDeprecated) + delete(rawMsg, key) + case "isEarlyAccess": + err = unpopulate(val, "IsEarlyAccess", &w.IsEarlyAccess) + delete(rawMsg, key) + case "isHidden": + err = unpopulate(val, "IsHidden", &w.IsHidden) + delete(rawMsg, key) + case "isPreview": + err = unpopulate(val, "IsPreview", &w.IsPreview) + delete(rawMsg, key) + case "remoteDebuggingSupported": + err = unpopulate(val, "RemoteDebuggingSupported", &w.RemoteDebuggingSupported) + delete(rawMsg, key) + case "runtimeVersion": + err = unpopulate(val, "RuntimeVersion", &w.RuntimeVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebAppRuntimes. +func (w WebAppRuntimes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "linuxContainerSettings", w.LinuxContainerSettings) + populate(objectMap, "linuxRuntimeSettings", w.LinuxRuntimeSettings) + populate(objectMap, "windowsContainerSettings", w.WindowsContainerSettings) + populate(objectMap, "windowsRuntimeSettings", w.WindowsRuntimeSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppRuntimes. +func (w *WebAppRuntimes) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "linuxContainerSettings": + err = unpopulate(val, "LinuxContainerSettings", &w.LinuxContainerSettings) + delete(rawMsg, key) + case "linuxRuntimeSettings": + err = unpopulate(val, "LinuxRuntimeSettings", &w.LinuxRuntimeSettings) + delete(rawMsg, key) + case "windowsContainerSettings": + err = unpopulate(val, "WindowsContainerSettings", &w.WindowsContainerSettings) + delete(rawMsg, key) + case "windowsRuntimeSettings": + err = unpopulate(val, "WindowsRuntimeSettings", &w.WindowsRuntimeSettings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebAppStack. +func (w WebAppStack) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", w.ID) + populate(objectMap, "kind", w.Kind) + populate(objectMap, "location", w.Location) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppStack. +func (w *WebAppStack) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &w.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &w.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebAppStackCollection. +func (w WebAppStackCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppStackCollection. +func (w *WebAppStackCollection) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebAppStackProperties. +func (w WebAppStackProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "displayText", w.DisplayText) + populate(objectMap, "majorVersions", w.MajorVersions) + populate(objectMap, "preferredOs", w.PreferredOs) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppStackProperties. +func (w *WebAppStackProperties) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayText": + err = unpopulate(val, "DisplayText", &w.DisplayText) + delete(rawMsg, key) + case "majorVersions": + err = unpopulate(val, "MajorVersions", &w.MajorVersions) + delete(rawMsg, key) + case "preferredOs": + err = unpopulate(val, "PreferredOs", &w.PreferredOs) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebJob. +func (w WebJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", w.ID) + populate(objectMap, "kind", w.Kind) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebJob. +func (w *WebJob) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &w.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebJobCollection. +func (w WebJobCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebJobCollection. +func (w *WebJobCollection) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebJobProperties. +func (w WebJobProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "error", w.Error) + populate(objectMap, "extra_info_url", w.ExtraInfoURL) + populate(objectMap, "run_command", w.RunCommand) + populate(objectMap, "settings", w.Settings) + populate(objectMap, "url", w.URL) + populate(objectMap, "using_sdk", w.UsingSdk) + populate(objectMap, "web_job_type", w.WebJobType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebJobProperties. +func (w *WebJobProperties) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &w.Error) + delete(rawMsg, key) + case "extra_info_url": + err = unpopulate(val, "ExtraInfoURL", &w.ExtraInfoURL) + delete(rawMsg, key) + case "run_command": + err = unpopulate(val, "RunCommand", &w.RunCommand) + delete(rawMsg, key) + case "settings": + err = unpopulate(val, "Settings", &w.Settings) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &w.URL) + delete(rawMsg, key) + case "using_sdk": + err = unpopulate(val, "UsingSdk", &w.UsingSdk) + delete(rawMsg, key) + case "web_job_type": + err = unpopulate(val, "WebJobType", &w.WebJobType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebSiteInstanceStatus. +func (w WebSiteInstanceStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", w.ID) + populate(objectMap, "kind", w.Kind) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebSiteInstanceStatus. +func (w *WebSiteInstanceStatus) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &w.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebSiteInstanceStatusProperties. +func (w WebSiteInstanceStatusProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "consoleUrl", w.ConsoleURL) + populate(objectMap, "containers", w.Containers) + populate(objectMap, "detectorUrl", w.DetectorURL) + populate(objectMap, "healthCheckUrl", w.HealthCheckURL) + populate(objectMap, "state", w.State) + populate(objectMap, "statusUrl", w.StatusURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebSiteInstanceStatusProperties. +func (w *WebSiteInstanceStatusProperties) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "consoleUrl": + err = unpopulate(val, "ConsoleURL", &w.ConsoleURL) + delete(rawMsg, key) + case "containers": + err = unpopulate(val, "Containers", &w.Containers) + delete(rawMsg, key) + case "detectorUrl": + err = unpopulate(val, "DetectorURL", &w.DetectorURL) + delete(rawMsg, key) + case "healthCheckUrl": + err = unpopulate(val, "HealthCheckURL", &w.HealthCheckURL) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &w.State) + delete(rawMsg, key) + case "statusUrl": + err = unpopulate(val, "StatusURL", &w.StatusURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WindowsJavaContainerSettings. +func (w WindowsJavaContainerSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populateTimeRFC3339(objectMap, "endOfLifeDate", w.EndOfLifeDate) + populate(objectMap, "isAutoUpdate", w.IsAutoUpdate) + populate(objectMap, "isDeprecated", w.IsDeprecated) + populate(objectMap, "isEarlyAccess", w.IsEarlyAccess) + populate(objectMap, "isHidden", w.IsHidden) + populate(objectMap, "isPreview", w.IsPreview) + populate(objectMap, "javaContainer", w.JavaContainer) + populate(objectMap, "javaContainerVersion", w.JavaContainerVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WindowsJavaContainerSettings. +func (w *WindowsJavaContainerSettings) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endOfLifeDate": + err = unpopulateTimeRFC3339(val, "EndOfLifeDate", &w.EndOfLifeDate) + delete(rawMsg, key) + case "isAutoUpdate": + err = unpopulate(val, "IsAutoUpdate", &w.IsAutoUpdate) + delete(rawMsg, key) + case "isDeprecated": + err = unpopulate(val, "IsDeprecated", &w.IsDeprecated) + delete(rawMsg, key) + case "isEarlyAccess": + err = unpopulate(val, "IsEarlyAccess", &w.IsEarlyAccess) + delete(rawMsg, key) + case "isHidden": + err = unpopulate(val, "IsHidden", &w.IsHidden) + delete(rawMsg, key) + case "isPreview": + err = unpopulate(val, "IsPreview", &w.IsPreview) + delete(rawMsg, key) + case "javaContainer": + err = unpopulate(val, "JavaContainer", &w.JavaContainer) + delete(rawMsg, key) + case "javaContainerVersion": + err = unpopulate(val, "JavaContainerVersion", &w.JavaContainerVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkerPool. +func (w WorkerPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "computeMode", w.ComputeMode) + populate(objectMap, "instanceNames", w.InstanceNames) + populate(objectMap, "workerCount", w.WorkerCount) + populate(objectMap, "workerSize", w.WorkerSize) + populate(objectMap, "workerSizeId", w.WorkerSizeID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkerPool. +func (w *WorkerPool) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeMode": + err = unpopulate(val, "ComputeMode", &w.ComputeMode) + delete(rawMsg, key) + case "instanceNames": + err = unpopulate(val, "InstanceNames", &w.InstanceNames) + delete(rawMsg, key) + case "workerCount": + err = unpopulate(val, "WorkerCount", &w.WorkerCount) + delete(rawMsg, key) + case "workerSize": + err = unpopulate(val, "WorkerSize", &w.WorkerSize) + delete(rawMsg, key) + case "workerSizeId": + err = unpopulate(val, "WorkerSizeID", &w.WorkerSizeID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkerPoolCollection. +func (w WorkerPoolCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkerPoolCollection. +func (w *WorkerPoolCollection) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkerPoolResource. +func (w WorkerPoolResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", w.ID) + populate(objectMap, "kind", w.Kind) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "sku", w.SKU) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkerPoolResource. +func (w *WorkerPoolResource) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &w.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &w.SKU) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Workflow. +func (w Workflow) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", w.ID) + populate(objectMap, "identity", w.Identity) + populate(objectMap, "location", w.Location) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "tags", w.Tags) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Workflow. +func (w *Workflow) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &w.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &w.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &w.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowFilter. +func (w WorkflowFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "state", w.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowFilter. +func (w *WorkflowFilter) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "state": + err = unpopulate(val, "State", &w.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowListResult. +func (w WorkflowListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowListResult. +func (w *WorkflowListResult) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowOutputParameter. +func (w WorkflowOutputParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", w.Description) + populate(objectMap, "error", &w.Error) + populate(objectMap, "metadata", &w.Metadata) + populate(objectMap, "type", w.Type) + populate(objectMap, "value", &w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowOutputParameter. +func (w *WorkflowOutputParameter) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &w.Description) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &w.Error) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &w.Metadata) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowParameter. +func (w WorkflowParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", w.Description) + populate(objectMap, "metadata", &w.Metadata) + populate(objectMap, "type", w.Type) + populate(objectMap, "value", &w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowParameter. +func (w *WorkflowParameter) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &w.Description) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &w.Metadata) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowProperties. +func (w WorkflowProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "accessControl", w.AccessControl) + populate(objectMap, "accessEndpoint", w.AccessEndpoint) + populateTimeRFC3339(objectMap, "changedTime", w.ChangedTime) + populateTimeRFC3339(objectMap, "createdTime", w.CreatedTime) + populate(objectMap, "definition", &w.Definition) + populate(objectMap, "endpointsConfiguration", w.EndpointsConfiguration) + populate(objectMap, "integrationAccount", w.IntegrationAccount) + populate(objectMap, "integrationServiceEnvironment", w.IntegrationServiceEnvironment) + populate(objectMap, "kind", w.Kind) + populate(objectMap, "parameters", w.Parameters) + populate(objectMap, "provisioningState", w.ProvisioningState) + populate(objectMap, "sku", w.SKU) + populate(objectMap, "state", w.State) + populate(objectMap, "version", w.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowProperties. +func (w *WorkflowProperties) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessControl": + err = unpopulate(val, "AccessControl", &w.AccessControl) + delete(rawMsg, key) + case "accessEndpoint": + err = unpopulate(val, "AccessEndpoint", &w.AccessEndpoint) + delete(rawMsg, key) + case "changedTime": + err = unpopulateTimeRFC3339(val, "ChangedTime", &w.ChangedTime) + delete(rawMsg, key) + case "createdTime": + err = unpopulateTimeRFC3339(val, "CreatedTime", &w.CreatedTime) + delete(rawMsg, key) + case "definition": + err = unpopulate(val, "Definition", &w.Definition) + delete(rawMsg, key) + case "endpointsConfiguration": + err = unpopulate(val, "EndpointsConfiguration", &w.EndpointsConfiguration) + delete(rawMsg, key) + case "integrationAccount": + err = unpopulate(val, "IntegrationAccount", &w.IntegrationAccount) + delete(rawMsg, key) + case "integrationServiceEnvironment": + err = unpopulate(val, "IntegrationServiceEnvironment", &w.IntegrationServiceEnvironment) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &w.Kind) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &w.Parameters) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &w.ProvisioningState) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &w.SKU) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &w.State) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &w.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowResource. +func (w WorkflowResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", w.ID) + populate(objectMap, "location", w.Location) + populate(objectMap, "name", w.Name) + populate(objectMap, "tags", w.Tags) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowResource. +func (w *WorkflowResource) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &w.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &w.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRun. +func (w WorkflowRun) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", w.ID) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRun. +func (w *WorkflowRun) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRunAction. +func (w WorkflowRunAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", w.ID) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRunAction. +func (w *WorkflowRunAction) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRunActionFilter. +func (w WorkflowRunActionFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "status", w.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRunActionFilter. +func (w *WorkflowRunActionFilter) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "status": + err = unpopulate(val, "Status", &w.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRunActionListResult. +func (w WorkflowRunActionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRunActionListResult. +func (w *WorkflowRunActionListResult) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRunActionProperties. +func (w WorkflowRunActionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", w.Code) + populate(objectMap, "correlation", w.Correlation) + populateTimeRFC3339(objectMap, "endTime", w.EndTime) + populate(objectMap, "error", &w.Error) + populate(objectMap, "inputsLink", w.InputsLink) + populate(objectMap, "outputsLink", w.OutputsLink) + populate(objectMap, "retryHistory", w.RetryHistory) + populateTimeRFC3339(objectMap, "startTime", w.StartTime) + populate(objectMap, "status", w.Status) + populate(objectMap, "trackedProperties", &w.TrackedProperties) + populate(objectMap, "trackingId", w.TrackingID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRunActionProperties. +func (w *WorkflowRunActionProperties) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &w.Code) + delete(rawMsg, key) + case "correlation": + err = unpopulate(val, "Correlation", &w.Correlation) + delete(rawMsg, key) + case "endTime": + err = unpopulateTimeRFC3339(val, "EndTime", &w.EndTime) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &w.Error) + delete(rawMsg, key) + case "inputsLink": + err = unpopulate(val, "InputsLink", &w.InputsLink) + delete(rawMsg, key) + case "outputsLink": + err = unpopulate(val, "OutputsLink", &w.OutputsLink) + delete(rawMsg, key) + case "retryHistory": + err = unpopulate(val, "RetryHistory", &w.RetryHistory) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, "StartTime", &w.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &w.Status) + delete(rawMsg, key) + case "trackedProperties": + err = unpopulate(val, "TrackedProperties", &w.TrackedProperties) + delete(rawMsg, key) + case "trackingId": + err = unpopulate(val, "TrackingID", &w.TrackingID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRunActionRepetitionDefinition. +func (w WorkflowRunActionRepetitionDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", w.ID) + populate(objectMap, "location", w.Location) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "tags", w.Tags) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRunActionRepetitionDefinition. +func (w *WorkflowRunActionRepetitionDefinition) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &w.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &w.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRunActionRepetitionDefinitionCollection. +func (w WorkflowRunActionRepetitionDefinitionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRunActionRepetitionDefinitionCollection. +func (w *WorkflowRunActionRepetitionDefinitionCollection) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRunActionRepetitionProperties. +func (w WorkflowRunActionRepetitionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", w.Code) + populate(objectMap, "correlation", w.Correlation) + populateTimeRFC3339(objectMap, "endTime", w.EndTime) + populate(objectMap, "error", &w.Error) + populate(objectMap, "inputs", &w.Inputs) + populate(objectMap, "inputsLink", w.InputsLink) + populate(objectMap, "iterationCount", w.IterationCount) + populate(objectMap, "outputs", &w.Outputs) + populate(objectMap, "outputsLink", w.OutputsLink) + populate(objectMap, "repetitionIndexes", w.RepetitionIndexes) + populate(objectMap, "retryHistory", w.RetryHistory) + populateTimeRFC3339(objectMap, "startTime", w.StartTime) + populate(objectMap, "status", w.Status) + populate(objectMap, "trackedProperties", &w.TrackedProperties) + populate(objectMap, "trackingId", w.TrackingID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRunActionRepetitionProperties. +func (w *WorkflowRunActionRepetitionProperties) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &w.Code) + delete(rawMsg, key) + case "correlation": + err = unpopulate(val, "Correlation", &w.Correlation) + delete(rawMsg, key) + case "endTime": + err = unpopulateTimeRFC3339(val, "EndTime", &w.EndTime) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &w.Error) + delete(rawMsg, key) + case "inputs": + err = unpopulate(val, "Inputs", &w.Inputs) + delete(rawMsg, key) + case "inputsLink": + err = unpopulate(val, "InputsLink", &w.InputsLink) + delete(rawMsg, key) + case "iterationCount": + err = unpopulate(val, "IterationCount", &w.IterationCount) + delete(rawMsg, key) + case "outputs": + err = unpopulate(val, "Outputs", &w.Outputs) + delete(rawMsg, key) + case "outputsLink": + err = unpopulate(val, "OutputsLink", &w.OutputsLink) + delete(rawMsg, key) + case "repetitionIndexes": + err = unpopulate(val, "RepetitionIndexes", &w.RepetitionIndexes) + delete(rawMsg, key) + case "retryHistory": + err = unpopulate(val, "RetryHistory", &w.RetryHistory) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, "StartTime", &w.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &w.Status) + delete(rawMsg, key) + case "trackedProperties": + err = unpopulate(val, "TrackedProperties", &w.TrackedProperties) + delete(rawMsg, key) + case "trackingId": + err = unpopulate(val, "TrackingID", &w.TrackingID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRunFilter. +func (w WorkflowRunFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "status", w.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRunFilter. +func (w *WorkflowRunFilter) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "status": + err = unpopulate(val, "Status", &w.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRunListResult. +func (w WorkflowRunListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRunListResult. +func (w *WorkflowRunListResult) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRunProperties. +func (w WorkflowRunProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", w.Code) + populate(objectMap, "correlation", w.Correlation) + populate(objectMap, "correlationId", w.CorrelationID) + populateTimeRFC3339(objectMap, "endTime", w.EndTime) + populate(objectMap, "error", &w.Error) + populate(objectMap, "outputs", w.Outputs) + populate(objectMap, "response", w.Response) + populateTimeRFC3339(objectMap, "startTime", w.StartTime) + populate(objectMap, "status", w.Status) + populate(objectMap, "trigger", w.Trigger) + populateTimeRFC3339(objectMap, "waitEndTime", w.WaitEndTime) + populate(objectMap, "workflow", w.Workflow) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRunProperties. +func (w *WorkflowRunProperties) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &w.Code) + delete(rawMsg, key) + case "correlation": + err = unpopulate(val, "Correlation", &w.Correlation) + delete(rawMsg, key) + case "correlationId": + err = unpopulate(val, "CorrelationID", &w.CorrelationID) + delete(rawMsg, key) + case "endTime": + err = unpopulateTimeRFC3339(val, "EndTime", &w.EndTime) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &w.Error) + delete(rawMsg, key) + case "outputs": + err = unpopulate(val, "Outputs", &w.Outputs) + delete(rawMsg, key) + case "response": + err = unpopulate(val, "Response", &w.Response) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, "StartTime", &w.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &w.Status) + delete(rawMsg, key) + case "trigger": + err = unpopulate(val, "Trigger", &w.Trigger) + delete(rawMsg, key) + case "waitEndTime": + err = unpopulateTimeRFC3339(val, "WaitEndTime", &w.WaitEndTime) + delete(rawMsg, key) + case "workflow": + err = unpopulate(val, "Workflow", &w.Workflow) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRunTrigger. +func (w WorkflowRunTrigger) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", w.Code) + populate(objectMap, "correlation", w.Correlation) + populateTimeRFC3339(objectMap, "endTime", w.EndTime) + populate(objectMap, "error", &w.Error) + populate(objectMap, "inputs", &w.Inputs) + populate(objectMap, "inputsLink", w.InputsLink) + populate(objectMap, "name", w.Name) + populate(objectMap, "outputs", &w.Outputs) + populate(objectMap, "outputsLink", w.OutputsLink) + populateTimeRFC3339(objectMap, "scheduledTime", w.ScheduledTime) + populateTimeRFC3339(objectMap, "startTime", w.StartTime) + populate(objectMap, "status", w.Status) + populate(objectMap, "trackedProperties", &w.TrackedProperties) + populate(objectMap, "trackingId", w.TrackingID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRunTrigger. +func (w *WorkflowRunTrigger) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &w.Code) + delete(rawMsg, key) + case "correlation": + err = unpopulate(val, "Correlation", &w.Correlation) + delete(rawMsg, key) + case "endTime": + err = unpopulateTimeRFC3339(val, "EndTime", &w.EndTime) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &w.Error) + delete(rawMsg, key) + case "inputs": + err = unpopulate(val, "Inputs", &w.Inputs) + delete(rawMsg, key) + case "inputsLink": + err = unpopulate(val, "InputsLink", &w.InputsLink) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "outputs": + err = unpopulate(val, "Outputs", &w.Outputs) + delete(rawMsg, key) + case "outputsLink": + err = unpopulate(val, "OutputsLink", &w.OutputsLink) + delete(rawMsg, key) + case "scheduledTime": + err = unpopulateTimeRFC3339(val, "ScheduledTime", &w.ScheduledTime) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, "StartTime", &w.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &w.Status) + delete(rawMsg, key) + case "trackedProperties": + err = unpopulate(val, "TrackedProperties", &w.TrackedProperties) + delete(rawMsg, key) + case "trackingId": + err = unpopulate(val, "TrackingID", &w.TrackingID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowSKU. +func (w WorkflowSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "name", w.Name) + populate(objectMap, "plan", w.Plan) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowSKU. +func (w *WorkflowSKU) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "plan": + err = unpopulate(val, "Plan", &w.Plan) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowTrigger. +func (w WorkflowTrigger) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", w.ID) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowTrigger. +func (w *WorkflowTrigger) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowTriggerCallbackURL. +func (w WorkflowTriggerCallbackURL) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "basePath", w.BasePath) + populate(objectMap, "method", w.Method) + populate(objectMap, "queries", w.Queries) + populate(objectMap, "relativePath", w.RelativePath) + populate(objectMap, "relativePathParameters", w.RelativePathParameters) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowTriggerCallbackURL. +func (w *WorkflowTriggerCallbackURL) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "basePath": + err = unpopulate(val, "BasePath", &w.BasePath) + delete(rawMsg, key) + case "method": + err = unpopulate(val, "Method", &w.Method) + delete(rawMsg, key) + case "queries": + err = unpopulate(val, "Queries", &w.Queries) + delete(rawMsg, key) + case "relativePath": + err = unpopulate(val, "RelativePath", &w.RelativePath) + delete(rawMsg, key) + case "relativePathParameters": + err = unpopulate(val, "RelativePathParameters", &w.RelativePathParameters) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowTriggerFilter. +func (w WorkflowTriggerFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "state", w.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowTriggerFilter. +func (w *WorkflowTriggerFilter) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "state": + err = unpopulate(val, "State", &w.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowTriggerHistory. +func (w WorkflowTriggerHistory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", w.ID) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowTriggerHistory. +func (w *WorkflowTriggerHistory) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowTriggerHistoryFilter. +func (w WorkflowTriggerHistoryFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "status", w.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowTriggerHistoryFilter. +func (w *WorkflowTriggerHistoryFilter) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "status": + err = unpopulate(val, "Status", &w.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowTriggerHistoryListResult. +func (w WorkflowTriggerHistoryListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowTriggerHistoryListResult. +func (w *WorkflowTriggerHistoryListResult) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowTriggerHistoryProperties. +func (w WorkflowTriggerHistoryProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", w.Code) + populate(objectMap, "correlation", w.Correlation) + populateTimeRFC3339(objectMap, "endTime", w.EndTime) + populate(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) + populate(objectMap, "status", w.Status) + populate(objectMap, "trackingId", w.TrackingID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowTriggerHistoryProperties. +func (w *WorkflowTriggerHistoryProperties) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &w.Code) + delete(rawMsg, key) + case "correlation": + err = unpopulate(val, "Correlation", &w.Correlation) + delete(rawMsg, key) + case "endTime": + err = unpopulateTimeRFC3339(val, "EndTime", &w.EndTime) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &w.Error) + delete(rawMsg, key) + case "fired": + err = unpopulate(val, "Fired", &w.Fired) + delete(rawMsg, key) + case "inputsLink": + err = unpopulate(val, "InputsLink", &w.InputsLink) + delete(rawMsg, key) + case "outputsLink": + err = unpopulate(val, "OutputsLink", &w.OutputsLink) + delete(rawMsg, key) + case "run": + err = unpopulate(val, "Run", &w.Run) + delete(rawMsg, key) + case "scheduledTime": + err = unpopulateTimeRFC3339(val, "ScheduledTime", &w.ScheduledTime) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, "StartTime", &w.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &w.Status) + delete(rawMsg, key) + case "trackingId": + err = unpopulate(val, "TrackingID", &w.TrackingID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowTriggerListCallbackURLQueries. +func (w WorkflowTriggerListCallbackURLQueries) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "api-version", w.APIVersion) + populate(objectMap, "se", w.Se) + populate(objectMap, "sig", w.Sig) + populate(objectMap, "sp", w.Sp) + populate(objectMap, "sv", w.Sv) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowTriggerListCallbackURLQueries. +func (w *WorkflowTriggerListCallbackURLQueries) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "api-version": + err = unpopulate(val, "APIVersion", &w.APIVersion) + delete(rawMsg, key) + case "se": + err = unpopulate(val, "Se", &w.Se) + delete(rawMsg, key) + case "sig": + err = unpopulate(val, "Sig", &w.Sig) + delete(rawMsg, key) + case "sp": + err = unpopulate(val, "Sp", &w.Sp) + delete(rawMsg, key) + case "sv": + err = unpopulate(val, "Sv", &w.Sv) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowTriggerListResult. +func (w WorkflowTriggerListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowTriggerListResult. +func (w *WorkflowTriggerListResult) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowTriggerProperties. +func (w WorkflowTriggerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populateTimeRFC3339(objectMap, "changedTime", w.ChangedTime) + populateTimeRFC3339(objectMap, "createdTime", w.CreatedTime) + populateTimeRFC3339(objectMap, "lastExecutionTime", w.LastExecutionTime) + populateTimeRFC3339(objectMap, "nextExecutionTime", w.NextExecutionTime) + populate(objectMap, "provisioningState", w.ProvisioningState) + populate(objectMap, "recurrence", w.Recurrence) + populate(objectMap, "state", w.State) + populate(objectMap, "status", w.Status) + populate(objectMap, "workflow", w.Workflow) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowTriggerProperties. +func (w *WorkflowTriggerProperties) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "changedTime": + err = unpopulateTimeRFC3339(val, "ChangedTime", &w.ChangedTime) + delete(rawMsg, key) + case "createdTime": + err = unpopulateTimeRFC3339(val, "CreatedTime", &w.CreatedTime) + delete(rawMsg, key) + case "lastExecutionTime": + err = unpopulateTimeRFC3339(val, "LastExecutionTime", &w.LastExecutionTime) + delete(rawMsg, key) + case "nextExecutionTime": + err = unpopulateTimeRFC3339(val, "NextExecutionTime", &w.NextExecutionTime) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &w.ProvisioningState) + delete(rawMsg, key) + case "recurrence": + err = unpopulate(val, "Recurrence", &w.Recurrence) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &w.State) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &w.Status) + delete(rawMsg, key) + case "workflow": + err = unpopulate(val, "Workflow", &w.Workflow) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowTriggerRecurrence. +func (w WorkflowTriggerRecurrence) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "endTime", w.EndTime) + populate(objectMap, "frequency", w.Frequency) + populate(objectMap, "interval", w.Interval) + populate(objectMap, "schedule", w.Schedule) + populate(objectMap, "startTime", w.StartTime) + populate(objectMap, "timeZone", w.TimeZone) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowTriggerRecurrence. +func (w *WorkflowTriggerRecurrence) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulate(val, "EndTime", &w.EndTime) + delete(rawMsg, key) + case "frequency": + err = unpopulate(val, "Frequency", &w.Frequency) + delete(rawMsg, key) + case "interval": + err = unpopulate(val, "Interval", &w.Interval) + delete(rawMsg, key) + case "schedule": + err = unpopulate(val, "Schedule", &w.Schedule) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &w.StartTime) + delete(rawMsg, key) + case "timeZone": + err = unpopulate(val, "TimeZone", &w.TimeZone) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowVersion. +func (w WorkflowVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", w.ID) + populate(objectMap, "location", w.Location) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "tags", w.Tags) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowVersion. +func (w *WorkflowVersion) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &w.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &w.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowVersionListResult. +func (w WorkflowVersionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowVersionListResult. +func (w *WorkflowVersionListResult) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowVersionProperties. +func (w WorkflowVersionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "accessControl", w.AccessControl) + populate(objectMap, "accessEndpoint", w.AccessEndpoint) + populateTimeRFC3339(objectMap, "changedTime", w.ChangedTime) + populateTimeRFC3339(objectMap, "createdTime", w.CreatedTime) + populate(objectMap, "definition", &w.Definition) + populate(objectMap, "endpointsConfiguration", w.EndpointsConfiguration) + populate(objectMap, "integrationAccount", w.IntegrationAccount) + populate(objectMap, "parameters", w.Parameters) + populate(objectMap, "provisioningState", w.ProvisioningState) + populate(objectMap, "sku", w.SKU) + populate(objectMap, "state", w.State) + populate(objectMap, "version", w.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowVersionProperties. +func (w *WorkflowVersionProperties) 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", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessControl": + err = unpopulate(val, "AccessControl", &w.AccessControl) + delete(rawMsg, key) + case "accessEndpoint": + err = unpopulate(val, "AccessEndpoint", &w.AccessEndpoint) + delete(rawMsg, key) + case "changedTime": + err = unpopulateTimeRFC3339(val, "ChangedTime", &w.ChangedTime) + delete(rawMsg, key) + case "createdTime": + err = unpopulateTimeRFC3339(val, "CreatedTime", &w.CreatedTime) + delete(rawMsg, key) + case "definition": + err = unpopulate(val, "Definition", &w.Definition) + delete(rawMsg, key) + case "endpointsConfiguration": + err = unpopulate(val, "EndpointsConfiguration", &w.EndpointsConfiguration) + delete(rawMsg, key) + case "integrationAccount": + err = unpopulate(val, "IntegrationAccount", &w.IntegrationAccount) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &w.Parameters) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &w.ProvisioningState) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &w.SKU) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &w.State) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &w.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +func populate(m map[string]interface{}, k string, v interface{}) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } +} + +func populateByteArray(m map[string]interface{}, k string, b []byte, f runtime.Base64Encoding) { + if azcore.IsNullValue(b) { + m[k] = nil + } else if len(b) == 0 { + return + } else { + m[k] = runtime.EncodeByteArray(b, f) + } +} + +func unpopulate(data json.RawMessage, fn string, v interface{}) error { + if data == nil { + return nil + } + if err := json.Unmarshal(data, v); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + return nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_plans_client.go b/sdk/resourcemanager/appservice/armappservice/plans_client.go similarity index 94% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_plans_client.go rename to sdk/resourcemanager/appservice/armappservice/plans_client.go index 26a4b5223499..b95b8e8a8375 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_plans_client.go +++ b/sdk/resourcemanager/appservice/armappservice/plans_client.go @@ -5,6 +5,7 @@ // 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 @@ -55,9 +56,9 @@ func NewPlansClient(subscriptionID string, credential azcore.TokenCredential, op return client, nil } -// BeginCreateOrUpdate - Creates or updates an App Service Plan. +// BeginCreateOrUpdate - Description for Creates or updates an App Service Plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -75,9 +76,9 @@ func (client *PlansClient) BeginCreateOrUpdate(ctx context.Context, resourceGrou } } -// CreateOrUpdate - Creates or updates an App Service Plan. +// CreateOrUpdate - Description for Creates or updates an App Service Plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *PlansClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, appServicePlan Plan, options *PlansClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, appServicePlan, options) if err != nil { @@ -113,15 +114,15 @@ func (client *PlansClient) createOrUpdateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appServicePlan) } -// CreateOrUpdateVnetRoute - Create or update a Virtual Network route in an App Service plan. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -172,7 +173,7 @@ func (client *PlansClient) createOrUpdateVnetRouteCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, route) @@ -187,9 +188,9 @@ func (client *PlansClient) createOrUpdateVnetRouteHandleResponse(resp *http.Resp return result, nil } -// Delete - Delete an App Service plan. +// Delete - Description for Delete an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -228,15 +229,15 @@ func (client *PlansClient) deleteCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteHybridConnection - Delete a Hybrid Connection in use in an App Service plan. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -286,15 +287,15 @@ func (client *PlansClient) deleteHybridConnectionCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteVnetRoute - Delete a Virtual Network route in an App Service plan. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -343,15 +344,15 @@ func (client *PlansClient) deleteVnetRouteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// Get - Get an App Service plan. +// Get - Description for Get an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -390,7 +391,7 @@ func (client *PlansClient) getCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -405,9 +406,9 @@ func (client *PlansClient) getHandleResponse(resp *http.Response) (PlansClientGe return result, nil } -// GetHybridConnection - Retrieve a Hybrid Connection in use in an App Service plan. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -457,7 +458,7 @@ func (client *PlansClient) getHybridConnectionCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -472,9 +473,9 @@ func (client *PlansClient) getHybridConnectionHandleResponse(resp *http.Response return result, nil } -// GetHybridConnectionPlanLimit - Get the maximum number of Hybrid Connections allowed in an App Service plan. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -514,7 +515,7 @@ func (client *PlansClient) getHybridConnectionPlanLimitCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -529,9 +530,9 @@ func (client *PlansClient) getHybridConnectionPlanLimitHandleResponse(resp *http return result, nil } -// GetRouteForVnet - Get a Virtual Network route in an App Service plan. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -580,7 +581,7 @@ func (client *PlansClient) getRouteForVnetCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -595,9 +596,9 @@ func (client *PlansClient) getRouteForVnetHandleResponse(resp *http.Response) (P return result, nil } -// GetServerFarmSKUs - Gets all selectable SKUs for a given App Service Plan +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -636,7 +637,7 @@ func (client *PlansClient) getServerFarmSKUsCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -651,9 +652,9 @@ func (client *PlansClient) getServerFarmSKUsHandleResponse(resp *http.Response) return result, nil } -// GetVnetFromServerFarm - Get a Virtual Network associated with an App Service plan. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -698,7 +699,7 @@ func (client *PlansClient) getVnetFromServerFarmCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -713,9 +714,9 @@ func (client *PlansClient) getVnetFromServerFarmHandleResponse(resp *http.Respon return result, nil } -// GetVnetGateway - Get a Virtual Network gateway. +// GetVnetGateway - Description for Get a Virtual Network gateway. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -764,7 +765,7 @@ func (client *PlansClient) getVnetGatewayCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -779,9 +780,9 @@ func (client *PlansClient) getVnetGatewayHandleResponse(resp *http.Response) (Pl return result, nil } -// NewListPager - Get all App Service plans for a subscription. +// NewListPager - Description for Get all App Service plans for a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - PlansClientListOptions contains the optional parameters for the PlansClient.List method. func (client *PlansClient) NewListPager(options *PlansClientListOptions) *runtime.Pager[PlansClientListResponse] { return runtime.NewPager(runtime.PagingHandler[PlansClientListResponse]{ @@ -826,7 +827,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", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -841,9 +842,9 @@ func (client *PlansClient) listHandleResponse(resp *http.Response) (PlansClientL return result, nil } -// NewListByResourceGroupPager - Get all App Service plans in a resource group. +// NewListByResourceGroupPager - Description for Get all App Service plans in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // options - PlansClientListByResourceGroupOptions contains the optional parameters for the PlansClient.ListByResourceGroup // method. @@ -891,7 +892,7 @@ func (client *PlansClient) listByResourceGroupCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -906,9 +907,9 @@ func (client *PlansClient) listByResourceGroupHandleResponse(resp *http.Response return result, nil } -// ListCapabilities - List all capabilities of an App Service plan. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -947,7 +948,7 @@ func (client *PlansClient) listCapabilitiesCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -962,9 +963,9 @@ func (client *PlansClient) listCapabilitiesHandleResponse(resp *http.Response) ( return result, nil } -// ListHybridConnectionKeys - Get the send key name and value of a Hybrid Connection. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -1014,7 +1015,7 @@ func (client *PlansClient) listHybridConnectionKeysCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1029,9 +1030,9 @@ func (client *PlansClient) listHybridConnectionKeysHandleResponse(resp *http.Res return result, nil } -// NewListHybridConnectionsPager - Retrieve all Hybrid Connections in use in an App Service plan. +// NewListHybridConnectionsPager - Description for Retrieve all Hybrid Connections in use in an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListHybridConnections @@ -1084,7 +1085,7 @@ func (client *PlansClient) listHybridConnectionsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1099,9 +1100,9 @@ func (client *PlansClient) listHybridConnectionsHandleResponse(resp *http.Respon return result, nil } -// ListRoutesForVnet - Get all routes that are associated with a Virtual Network in an App Service plan. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -1145,7 +1146,7 @@ func (client *PlansClient) listRoutesForVnetCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1160,9 +1161,9 @@ func (client *PlansClient) listRoutesForVnetHandleResponse(resp *http.Response) return result, nil } -// NewListUsagesPager - Gets server farm usage information +// NewListUsagesPager - Description for Gets server farm usage information // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListUsages method. @@ -1214,7 +1215,7 @@ func (client *PlansClient) listUsagesCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -1234,9 +1235,9 @@ func (client *PlansClient) listUsagesHandleResponse(resp *http.Response) (PlansC return result, nil } -// ListVnets - Get all Virtual Networks associated with an App Service plan. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -1275,7 +1276,7 @@ func (client *PlansClient) listVnetsCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1290,9 +1291,9 @@ func (client *PlansClient) listVnetsHandleResponse(resp *http.Response) (PlansCl return result, nil } -// NewListWebAppsPager - Get all apps associated with an App Service plan. +// NewListWebAppsPager - Description for Get all apps associated with an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListWebApps method. @@ -1344,7 +1345,7 @@ func (client *PlansClient) listWebAppsCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") if options != nil && options.SkipToken != nil { reqQP.Set("$skipToken", *options.SkipToken) } @@ -1370,9 +1371,9 @@ func (client *PlansClient) listWebAppsHandleResponse(resp *http.Response) (Plans return result, nil } -// NewListWebAppsByHybridConnectionPager - Get all apps that use a Hybrid Connection in an App Service Plan. +// NewListWebAppsByHybridConnectionPager - Description for Get all apps that use a Hybrid Connection in an App Service Plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -1435,7 +1436,7 @@ func (client *PlansClient) listWebAppsByHybridConnectionCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1450,9 +1451,9 @@ func (client *PlansClient) listWebAppsByHybridConnectionHandleResponse(resp *htt return result, nil } -// RebootWorker - Reboot a worker machine in an App Service plan. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -1496,15 +1497,15 @@ func (client *PlansClient) rebootWorkerCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// RestartWebApps - Restart all apps in an App Service plan. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -1546,15 +1547,15 @@ 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", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// Update - Creates or updates an App Service Plan. +// Update - Description for Creates or updates an App Service Plan. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -1594,7 +1595,7 @@ func (client *PlansClient) updateCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appServicePlan) @@ -1609,9 +1610,9 @@ func (client *PlansClient) updateHandleResponse(resp *http.Response) (PlansClien return result, nil } -// UpdateVnetGateway - Update a Virtual Network gateway. +// UpdateVnetGateway - Description for Update a Virtual Network gateway. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -1661,7 +1662,7 @@ func (client *PlansClient) updateVnetGatewayCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -1676,9 +1677,9 @@ func (client *PlansClient) updateVnetGatewayHandleResponse(resp *http.Response) return result, nil } -// UpdateVnetRoute - Create or update a Virtual Network route in an App Service plan. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -1728,7 +1729,7 @@ func (client *PlansClient) updateVnetRouteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, route) diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_provider_client.go b/sdk/resourcemanager/appservice/armappservice/provider_client.go similarity index 93% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_provider_client.go rename to sdk/resourcemanager/appservice/armappservice/provider_client.go index 93c341ca70da..39ef53d7e04e 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_provider_client.go +++ b/sdk/resourcemanager/appservice/armappservice/provider_client.go @@ -5,6 +5,7 @@ // 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 @@ -54,9 +55,9 @@ func NewProviderClient(subscriptionID string, credential azcore.TokenCredential, return client, nil } -// NewGetAvailableStacksPager - Get available application frameworks and their versions +// NewGetAvailableStacksPager - Description for Get available application frameworks and their versions // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - ProviderClientGetAvailableStacksOptions contains the optional parameters for the ProviderClient.GetAvailableStacks // method. func (client *ProviderClient) NewGetAvailableStacksPager(options *ProviderClientGetAvailableStacksOptions) *runtime.Pager[ProviderClientGetAvailableStacksResponse] { @@ -98,7 +99,7 @@ func (client *ProviderClient) getAvailableStacksCreateRequest(ctx context.Contex if options != nil && options.OSTypeSelected != nil { reqQP.Set("osTypeSelected", string(*options.OSTypeSelected)) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -113,9 +114,9 @@ func (client *ProviderClient) getAvailableStacksHandleResponse(resp *http.Respon return result, nil } -// NewGetAvailableStacksOnPremPager - Get available application frameworks and their versions +// NewGetAvailableStacksOnPremPager - Description for Get available application frameworks and their versions // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - ProviderClientGetAvailableStacksOnPremOptions contains the optional parameters for the ProviderClient.GetAvailableStacksOnPrem // method. func (client *ProviderClient) NewGetAvailableStacksOnPremPager(options *ProviderClientGetAvailableStacksOnPremOptions) *runtime.Pager[ProviderClientGetAvailableStacksOnPremResponse] { @@ -161,7 +162,7 @@ func (client *ProviderClient) getAvailableStacksOnPremCreateRequest(ctx context. if options != nil && options.OSTypeSelected != nil { reqQP.Set("osTypeSelected", string(*options.OSTypeSelected)) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -176,9 +177,9 @@ func (client *ProviderClient) getAvailableStacksOnPremHandleResponse(resp *http. return result, nil } -// NewGetFunctionAppStacksPager - Get available Function app frameworks and their versions +// NewGetFunctionAppStacksPager - Description for Get available Function app frameworks and their versions // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - ProviderClientGetFunctionAppStacksOptions contains the optional parameters for the ProviderClient.GetFunctionAppStacks // method. func (client *ProviderClient) NewGetFunctionAppStacksPager(options *ProviderClientGetFunctionAppStacksOptions) *runtime.Pager[ProviderClientGetFunctionAppStacksResponse] { @@ -220,7 +221,7 @@ func (client *ProviderClient) getFunctionAppStacksCreateRequest(ctx context.Cont if options != nil && options.StackOsType != nil { reqQP.Set("stackOsType", string(*options.StackOsType)) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -235,9 +236,10 @@ func (client *ProviderClient) getFunctionAppStacksHandleResponse(resp *http.Resp return result, nil } -// NewGetFunctionAppStacksForLocationPager - Get available Function app frameworks and their versions for location +// NewGetFunctionAppStacksForLocationPager - Description for Get available Function app frameworks and their versions for +// location // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // location - Function App stack location. // options - ProviderClientGetFunctionAppStacksForLocationOptions contains the optional parameters for the ProviderClient.GetFunctionAppStacksForLocation // method. @@ -284,7 +286,7 @@ func (client *ProviderClient) getFunctionAppStacksForLocationCreateRequest(ctx c if options != nil && options.StackOsType != nil { reqQP.Set("stackOsType", string(*options.StackOsType)) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -299,9 +301,9 @@ func (client *ProviderClient) getFunctionAppStacksForLocationHandleResponse(resp return result, nil } -// NewGetWebAppStacksPager - Get available Web app frameworks and their versions +// NewGetWebAppStacksPager - Description for Get available Web app frameworks and their versions // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - ProviderClientGetWebAppStacksOptions contains the optional parameters for the ProviderClient.GetWebAppStacks // method. func (client *ProviderClient) NewGetWebAppStacksPager(options *ProviderClientGetWebAppStacksOptions) *runtime.Pager[ProviderClientGetWebAppStacksResponse] { @@ -343,7 +345,7 @@ func (client *ProviderClient) getWebAppStacksCreateRequest(ctx context.Context, if options != nil && options.StackOsType != nil { reqQP.Set("stackOsType", string(*options.StackOsType)) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -358,9 +360,9 @@ func (client *ProviderClient) getWebAppStacksHandleResponse(resp *http.Response) return result, nil } -// NewGetWebAppStacksForLocationPager - Get available Web app frameworks and their versions for location +// NewGetWebAppStacksForLocationPager - Description for Get available Web app frameworks and their versions for location // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // location - Web App stack location. // options - ProviderClientGetWebAppStacksForLocationOptions contains the optional parameters for the ProviderClient.GetWebAppStacksForLocation // method. @@ -407,7 +409,7 @@ func (client *ProviderClient) getWebAppStacksForLocationCreateRequest(ctx contex if options != nil && options.StackOsType != nil { reqQP.Set("stackOsType", string(*options.StackOsType)) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -422,10 +424,10 @@ func (client *ProviderClient) getWebAppStacksForLocationHandleResponse(resp *htt return result, nil } -// NewListOperationsPager - Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric -// definitions +// NewListOperationsPager - Description for Gets all available operations for the Microsoft.Web resource provider. Also exposes +// resource metric definitions // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - ProviderClientListOperationsOptions contains the optional parameters for the ProviderClient.ListOperations method. func (client *ProviderClient) NewListOperationsPager(options *ProviderClientListOperationsOptions) *runtime.Pager[ProviderClientListOperationsResponse] { return runtime.NewPager(runtime.PagingHandler[ProviderClientListOperationsResponse]{ @@ -463,7 +465,7 @@ func (client *ProviderClient) listOperationsCreateRequest(ctx context.Context, o return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_recommendations_client.go b/sdk/resourcemanager/appservice/armappservice/recommendations_client.go similarity index 94% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_recommendations_client.go rename to sdk/resourcemanager/appservice/armappservice/recommendations_client.go index 37feeb721d17..38438c57b16b 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_recommendations_client.go +++ b/sdk/resourcemanager/appservice/armappservice/recommendations_client.go @@ -5,6 +5,7 @@ // 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 @@ -55,9 +56,9 @@ func NewRecommendationsClient(subscriptionID string, credential azcore.TokenCred return client, nil } -// DisableAllForHostingEnvironment - Disable all recommendations for an app. +// DisableAllForHostingEnvironment - Description for Disable all recommendations for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -98,15 +99,15 @@ func (client *RecommendationsClient) disableAllForHostingEnvironmentCreateReques } reqQP := req.Raw().URL.Query() reqQP.Set("environmentName", environmentName) - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DisableAllForWebApp - Disable all recommendations for an app. +// DisableAllForWebApp - Description for Disable all recommendations for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -146,15 +147,15 @@ func (client *RecommendationsClient) disableAllForWebAppCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DisableRecommendationForHostingEnvironment - Disables the specific rule for a web site permanently. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // environmentName - Site name // name - Rule name @@ -200,15 +201,15 @@ func (client *RecommendationsClient) disableRecommendationForHostingEnvironmentC } reqQP := req.Raw().URL.Query() reqQP.Set("environmentName", environmentName) - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DisableRecommendationForSite - Disables the specific rule for a web site permanently. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Site name // name - Rule name @@ -253,15 +254,16 @@ func (client *RecommendationsClient) disableRecommendationForSiteCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DisableRecommendationForSubscription - Disables the specified rule so it will not apply to a subscription in the future. +// DisableRecommendationForSubscription - Description for Disables the specified rule so it will not apply to a subscription +// in the future. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // name - Rule name // options - RecommendationsClientDisableRecommendationForSubscriptionOptions contains the optional parameters for the RecommendationsClient.DisableRecommendationForSubscription // method. @@ -296,15 +298,15 @@ func (client *RecommendationsClient) disableRecommendationForSubscriptionCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// GetRuleDetailsByHostingEnvironment - Get a recommendation rule for an app. +// GetRuleDetailsByHostingEnvironment - Description for Get a recommendation rule for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // hostingEnvironmentName - Name of the hosting environment. // name - Name of the recommendation. @@ -355,7 +357,7 @@ func (client *RecommendationsClient) getRuleDetailsByHostingEnvironmentCreateReq if options != nil && options.RecommendationID != nil { reqQP.Set("recommendationId", *options.RecommendationID) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -370,9 +372,9 @@ func (client *RecommendationsClient) getRuleDetailsByHostingEnvironmentHandleRes return result, nil } -// GetRuleDetailsByWebApp - Get a recommendation rule for an app. +// GetRuleDetailsByWebApp - Description for Get a recommendation rule for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // siteName - Name of the app. // name - Name of the recommendation. @@ -423,7 +425,7 @@ func (client *RecommendationsClient) getRuleDetailsByWebAppCreateRequest(ctx con if options != nil && options.RecommendationID != nil { reqQP.Set("recommendationId", *options.RecommendationID) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -438,9 +440,9 @@ func (client *RecommendationsClient) getRuleDetailsByWebAppHandleResponse(resp * return result, nil } -// NewListPager - List all recommendations for a subscription. +// NewListPager - Description for List all recommendations for a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - RecommendationsClientListOptions contains the optional parameters for the RecommendationsClient.List method. func (client *RecommendationsClient) NewListPager(options *RecommendationsClientListOptions) *runtime.Pager[RecommendationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[RecommendationsClientListResponse]{ @@ -485,7 +487,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", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -505,9 +507,10 @@ func (client *RecommendationsClient) listHandleResponse(resp *http.Response) (Re return result, nil } -// NewListHistoryForHostingEnvironmentPager - Get past recommendations for an app, optionally specified by the time range. +// NewListHistoryForHostingEnvironmentPager - Description for Get past recommendations for an app, optionally specified by +// the time range. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListHistoryForHostingEnvironment @@ -563,7 +566,7 @@ func (client *RecommendationsClient) listHistoryForHostingEnvironmentCreateReque if options != nil && options.ExpiredOnly != nil { reqQP.Set("expiredOnly", strconv.FormatBool(*options.ExpiredOnly)) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -583,9 +586,9 @@ func (client *RecommendationsClient) listHistoryForHostingEnvironmentHandleRespo return result, nil } -// NewListHistoryForWebAppPager - Get past recommendations for an app, optionally specified by the time range. +// NewListHistoryForWebAppPager - Description for Get past recommendations for an app, optionally specified by the time range. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListHistoryForWebApp @@ -641,7 +644,7 @@ func (client *RecommendationsClient) listHistoryForWebAppCreateRequest(ctx conte if options != nil && options.ExpiredOnly != nil { reqQP.Set("expiredOnly", strconv.FormatBool(*options.ExpiredOnly)) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -661,9 +664,9 @@ func (client *RecommendationsClient) listHistoryForWebAppHandleResponse(resp *ht return result, nil } -// NewListRecommendedRulesForHostingEnvironmentPager - Get all recommendations for a hosting environment. +// NewListRecommendedRulesForHostingEnvironmentPager - Description for Get all recommendations for a hosting environment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -719,7 +722,7 @@ func (client *RecommendationsClient) listRecommendedRulesForHostingEnvironmentCr if options != nil && options.Featured != nil { reqQP.Set("featured", strconv.FormatBool(*options.Featured)) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -739,9 +742,9 @@ func (client *RecommendationsClient) listRecommendedRulesForHostingEnvironmentHa return result, nil } -// NewListRecommendedRulesForWebAppPager - Get all recommendations for an app. +// NewListRecommendedRulesForWebAppPager - Description for Get all recommendations for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListRecommendedRulesForWebApp @@ -797,7 +800,7 @@ func (client *RecommendationsClient) listRecommendedRulesForWebAppCreateRequest( if options != nil && options.Featured != nil { reqQP.Set("featured", strconv.FormatBool(*options.Featured)) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -817,9 +820,9 @@ func (client *RecommendationsClient) listRecommendedRulesForWebAppHandleResponse return result, nil } -// ResetAllFilters - Reset all recommendation opt-out settings for a subscription. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // options - RecommendationsClientResetAllFiltersOptions contains the optional parameters for the RecommendationsClient.ResetAllFilters // method. func (client *RecommendationsClient) ResetAllFilters(ctx context.Context, options *RecommendationsClientResetAllFiltersOptions) (RecommendationsClientResetAllFiltersResponse, error) { @@ -849,15 +852,15 @@ func (client *RecommendationsClient) resetAllFiltersCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// ResetAllFiltersForHostingEnvironment - Reset all recommendation opt-out settings for an app. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -898,15 +901,15 @@ func (client *RecommendationsClient) resetAllFiltersForHostingEnvironmentCreateR } reqQP := req.Raw().URL.Query() reqQP.Set("environmentName", environmentName) - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// ResetAllFiltersForWebApp - Reset all recommendation opt-out settings for an app. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -946,7 +949,7 @@ func (client *RecommendationsClient) resetAllFiltersForWebAppCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_resourcehealthmetadata_client.go b/sdk/resourcemanager/appservice/armappservice/resourcehealthmetadata_client.go similarity index 94% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_resourcehealthmetadata_client.go rename to sdk/resourcemanager/appservice/armappservice/resourcehealthmetadata_client.go index e6674d3998b1..8b1c1753cd55 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_resourcehealthmetadata_client.go +++ b/sdk/resourcemanager/appservice/armappservice/resourcehealthmetadata_client.go @@ -5,6 +5,7 @@ // 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 @@ -54,9 +55,9 @@ func NewResourceHealthMetadataClient(subscriptionID string, credential azcore.To return client, nil } -// GetBySite - Gets the category of ResourceHealthMetadata to use for the given site +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -96,7 +97,7 @@ func (client *ResourceHealthMetadataClient) getBySiteCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -111,9 +112,9 @@ func (client *ResourceHealthMetadataClient) getBySiteHandleResponse(resp *http.R return result, nil } -// GetBySiteSlot - Gets the category of ResourceHealthMetadata to use for the given site +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -158,7 +159,7 @@ func (client *ResourceHealthMetadataClient) getBySiteSlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -173,9 +174,9 @@ func (client *ResourceHealthMetadataClient) getBySiteSlotHandleResponse(resp *ht return result, nil } -// NewListPager - List all ResourceHealthMetadata for all sites in the subscription. +// NewListPager - Description for List all ResourceHealthMetadata for all sites in the subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - ResourceHealthMetadataClientListOptions contains the optional parameters for the ResourceHealthMetadataClient.List // method. func (client *ResourceHealthMetadataClient) NewListPager(options *ResourceHealthMetadataClientListOptions) *runtime.Pager[ResourceHealthMetadataClientListResponse] { @@ -218,7 +219,7 @@ func (client *ResourceHealthMetadataClient) listCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -233,9 +234,10 @@ func (client *ResourceHealthMetadataClient) listHandleResponse(resp *http.Respon return result, nil } -// NewListByResourceGroupPager - List all ResourceHealthMetadata for all sites in the resource group in the subscription. +// NewListByResourceGroupPager - Description for List all ResourceHealthMetadata for all sites in the resource group in the +// subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // options - ResourceHealthMetadataClientListByResourceGroupOptions contains the optional parameters for the ResourceHealthMetadataClient.ListByResourceGroup // method. @@ -283,7 +285,7 @@ func (client *ResourceHealthMetadataClient) listByResourceGroupCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -298,9 +300,9 @@ func (client *ResourceHealthMetadataClient) listByResourceGroupHandleResponse(re return result, nil } -// NewListBySitePager - Gets the category of ResourceHealthMetadata to use for the given site as a collection +// NewListBySitePager - Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListBySite @@ -353,7 +355,7 @@ func (client *ResourceHealthMetadataClient) listBySiteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -368,9 +370,9 @@ func (client *ResourceHealthMetadataClient) listBySiteHandleResponse(resp *http. return result, nil } -// NewListBySiteSlotPager - Gets the category of ResourceHealthMetadata to use for the given site as a collection +// NewListBySiteSlotPager - Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -428,7 +430,7 @@ func (client *ResourceHealthMetadataClient) listBySiteSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_response_types.go b/sdk/resourcemanager/appservice/armappservice/response_types.go similarity index 93% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_response_types.go rename to sdk/resourcemanager/appservice/armappservice/response_types.go index 615eb2e63ea8..7f36f56a1a6e 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_response_types.go +++ b/sdk/resourcemanager/appservice/armappservice/response_types.go @@ -5,6 +5,7 @@ // 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 @@ -452,6 +453,12 @@ type EnvironmentsClientCreateOrUpdateWorkerPoolResponse struct { WorkerPoolResource } +// EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse contains the response from method EnvironmentsClient.DeleteAseCustomDNSSuffixConfiguration. +type EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse struct { + // Anything + Interface interface{} +} + // EnvironmentsClientDeletePrivateEndpointConnectionResponse contains the response from method EnvironmentsClient.DeletePrivateEndpointConnection. type EnvironmentsClientDeletePrivateEndpointConnectionResponse struct { // Anything @@ -468,6 +475,11 @@ type EnvironmentsClientDeleteResponse struct { // placeholder for future response values } +// EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse contains the response from method EnvironmentsClient.GetAseCustomDNSSuffixConfiguration. +type EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse struct { + CustomDNSSuffixConfiguration +} + // EnvironmentsClientGetAseV3NetworkingConfigurationResponse contains the response from method EnvironmentsClient.GetAseV3NetworkingConfiguration. type EnvironmentsClientGetAseV3NetworkingConfigurationResponse struct { AseV3NetworkingConfiguration @@ -630,6 +642,16 @@ type EnvironmentsClientSuspendResponse struct { WebAppCollection } +// EnvironmentsClientTestUpgradeAvailableNotificationResponse contains the response from method EnvironmentsClient.TestUpgradeAvailableNotification. +type EnvironmentsClientTestUpgradeAvailableNotificationResponse struct { + // placeholder for future response values +} + +// EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse contains the response from method EnvironmentsClient.UpdateAseCustomDNSSuffixConfiguration. +type EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse struct { + CustomDNSSuffixConfiguration +} + // EnvironmentsClientUpdateAseNetworkingConfigurationResponse contains the response from method EnvironmentsClient.UpdateAseNetworkingConfiguration. type EnvironmentsClientUpdateAseNetworkingConfigurationResponse struct { AseV3NetworkingConfiguration @@ -650,6 +672,11 @@ type EnvironmentsClientUpdateWorkerPoolResponse struct { WorkerPoolResource } +// EnvironmentsClientUpgradeResponse contains the response from method EnvironmentsClient.Upgrade. +type EnvironmentsClientUpgradeResponse struct { + // placeholder for future response values +} + // GlobalClientGetDeletedWebAppResponse contains the response from method GlobalClient.GetDeletedWebApp. type GlobalClientGetDeletedWebAppResponse struct { DeletedSite @@ -1072,6 +1099,26 @@ type StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse struct // placeholder for future response values } +// StaticSitesClientGetLinkedBackendForBuildResponse contains the response from method StaticSitesClient.GetLinkedBackendForBuild. +type StaticSitesClientGetLinkedBackendForBuildResponse struct { + StaticSiteLinkedBackendARMResource +} + +// StaticSitesClientGetLinkedBackendResponse contains the response from method StaticSitesClient.GetLinkedBackend. +type StaticSitesClientGetLinkedBackendResponse struct { + StaticSiteLinkedBackendARMResource +} + +// StaticSitesClientGetLinkedBackendsForBuildResponse contains the response from method StaticSitesClient.GetLinkedBackendsForBuild. +type StaticSitesClientGetLinkedBackendsForBuildResponse struct { + StaticSiteLinkedBackendsCollection +} + +// StaticSitesClientGetLinkedBackendsResponse contains the response from method StaticSitesClient.GetLinkedBackends. +type StaticSitesClientGetLinkedBackendsResponse struct { + StaticSiteLinkedBackendsCollection +} + // StaticSitesClientGetPrivateEndpointConnectionListResponse contains the response from method StaticSitesClient.GetPrivateEndpointConnectionList. type StaticSitesClientGetPrivateEndpointConnectionListResponse struct { PrivateEndpointConnectionCollection @@ -1132,6 +1179,16 @@ type StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse struct { StaticSiteUserProvidedFunctionAppsCollection } +// StaticSitesClientLinkBackendResponse contains the response from method StaticSitesClient.LinkBackend. +type StaticSitesClientLinkBackendResponse struct { + StaticSiteLinkedBackendARMResource +} + +// StaticSitesClientLinkBackendToBuildResponse contains the response from method StaticSitesClient.LinkBackendToBuild. +type StaticSitesClientLinkBackendToBuildResponse struct { + StaticSiteLinkedBackendARMResource +} + // StaticSitesClientListResponse contains the response from method StaticSitesClient.List. type StaticSitesClientListResponse struct { StaticSiteCollection @@ -1207,6 +1264,16 @@ type StaticSitesClientResetStaticSiteAPIKeyResponse struct { // placeholder for future response values } +// StaticSitesClientUnlinkBackendFromBuildResponse contains the response from method StaticSitesClient.UnlinkBackendFromBuild. +type StaticSitesClientUnlinkBackendFromBuildResponse struct { + // placeholder for future response values +} + +// StaticSitesClientUnlinkBackendResponse contains the response from method StaticSitesClient.UnlinkBackend. +type StaticSitesClientUnlinkBackendResponse struct { + // placeholder for future response values +} + // StaticSitesClientUpdateStaticSiteResponse contains the response from method StaticSitesClient.UpdateStaticSite. type StaticSitesClientUpdateStaticSiteResponse struct { StaticSiteARMResource @@ -1217,6 +1284,16 @@ type StaticSitesClientUpdateStaticSiteUserResponse struct { StaticSiteUserARMResource } +// StaticSitesClientValidateBackendForBuildResponse contains the response from method StaticSitesClient.ValidateBackendForBuild. +type StaticSitesClientValidateBackendForBuildResponse struct { + // placeholder for future response values +} + +// StaticSitesClientValidateBackendResponse contains the response from method StaticSitesClient.ValidateBackend. +type StaticSitesClientValidateBackendResponse struct { + // placeholder for future response values +} + // StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse contains the response from method StaticSitesClient.ValidateCustomDomainCanBeAddedToStaticSite. type StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse struct { // placeholder for future response values @@ -2135,6 +2212,11 @@ type WebAppsClientGetProcessSlotResponse struct { ProcessInfo } +// WebAppsClientGetProductionSiteDeploymentStatusResponse contains the response from method WebAppsClient.GetProductionSiteDeploymentStatus. +type WebAppsClientGetProductionSiteDeploymentStatusResponse struct { + CsmDeploymentStatus +} + // WebAppsClientGetPublicCertificateResponse contains the response from method WebAppsClient.GetPublicCertificate. type WebAppsClientGetPublicCertificateResponse struct { PublicCertificate @@ -2215,6 +2297,11 @@ type WebAppsClientGetSlotResponse struct { Site } +// WebAppsClientGetSlotSiteDeploymentStatusSlotResponse contains the response from method WebAppsClient.GetSlotSiteDeploymentStatusSlot. +type WebAppsClientGetSlotSiteDeploymentStatusSlotResponse struct { + CsmDeploymentStatus +} + // WebAppsClientGetSourceControlResponse contains the response from method WebAppsClient.GetSourceControl. type WebAppsClientGetSourceControlResponse struct { SiteSourceControl @@ -2612,6 +2699,11 @@ type WebAppsClientListProcessesSlotResponse struct { ProcessInfoCollection } +// WebAppsClientListProductionSiteDeploymentStatusesResponse contains the response from method WebAppsClient.ListProductionSiteDeploymentStatuses. +type WebAppsClientListProductionSiteDeploymentStatusesResponse struct { + CsmDeploymentStatusCollection +} + // WebAppsClientListPublicCertificatesResponse contains the response from method WebAppsClient.ListPublicCertificates. type WebAppsClientListPublicCertificatesResponse struct { PublicCertificateCollection @@ -2704,6 +2796,11 @@ type WebAppsClientListSlotDifferencesSlotResponse struct { SlotDifferenceCollection } +// WebAppsClientListSlotSiteDeploymentStatusesSlotResponse contains the response from method WebAppsClient.ListSlotSiteDeploymentStatusesSlot. +type WebAppsClientListSlotSiteDeploymentStatusesSlotResponse struct { + CsmDeploymentStatusCollection +} + // WebAppsClientListSlotsResponse contains the response from method WebAppsClient.ListSlots. type WebAppsClientListSlotsResponse struct { WebAppCollection @@ -3354,3 +3451,128 @@ type WebSiteManagementClientValidateResponse struct { type WebSiteManagementClientVerifyHostingEnvironmentVnetResponse struct { VnetValidationFailureDetails } + +// WorkflowRunActionRepetitionsClientGetResponse contains the response from method WorkflowRunActionRepetitionsClient.Get. +type WorkflowRunActionRepetitionsClientGetResponse struct { + WorkflowRunActionRepetitionDefinition +} + +// WorkflowRunActionRepetitionsClientListExpressionTracesResponse contains the response from method WorkflowRunActionRepetitionsClient.ListExpressionTraces. +type WorkflowRunActionRepetitionsClientListExpressionTracesResponse struct { + ExpressionTraces +} + +// WorkflowRunActionRepetitionsClientListResponse contains the response from method WorkflowRunActionRepetitionsClient.List. +type WorkflowRunActionRepetitionsClientListResponse struct { + WorkflowRunActionRepetitionDefinitionCollection +} + +// WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse contains the response from method WorkflowRunActionRepetitionsRequestHistoriesClient.Get. +type WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse struct { + RequestHistory +} + +// WorkflowRunActionRepetitionsRequestHistoriesClientListResponse contains the response from method WorkflowRunActionRepetitionsRequestHistoriesClient.List. +type WorkflowRunActionRepetitionsRequestHistoriesClientListResponse struct { + RequestHistoryListResult +} + +// WorkflowRunActionScopeRepetitionsClientGetResponse contains the response from method WorkflowRunActionScopeRepetitionsClient.Get. +type WorkflowRunActionScopeRepetitionsClientGetResponse struct { + WorkflowRunActionRepetitionDefinition +} + +// WorkflowRunActionScopeRepetitionsClientListResponse contains the response from method WorkflowRunActionScopeRepetitionsClient.List. +type WorkflowRunActionScopeRepetitionsClientListResponse struct { + WorkflowRunActionRepetitionDefinitionCollection +} + +// WorkflowRunActionsClientGetResponse contains the response from method WorkflowRunActionsClient.Get. +type WorkflowRunActionsClientGetResponse struct { + WorkflowRunAction +} + +// WorkflowRunActionsClientListExpressionTracesResponse contains the response from method WorkflowRunActionsClient.ListExpressionTraces. +type WorkflowRunActionsClientListExpressionTracesResponse struct { + ExpressionTraces +} + +// WorkflowRunActionsClientListResponse contains the response from method WorkflowRunActionsClient.List. +type WorkflowRunActionsClientListResponse struct { + WorkflowRunActionListResult +} + +// WorkflowRunsClientCancelResponse contains the response from method WorkflowRunsClient.Cancel. +type WorkflowRunsClientCancelResponse struct { + // placeholder for future response values +} + +// WorkflowRunsClientGetResponse contains the response from method WorkflowRunsClient.Get. +type WorkflowRunsClientGetResponse struct { + WorkflowRun +} + +// WorkflowRunsClientListResponse contains the response from method WorkflowRunsClient.List. +type WorkflowRunsClientListResponse struct { + WorkflowRunListResult +} + +// WorkflowTriggerHistoriesClientGetResponse contains the response from method WorkflowTriggerHistoriesClient.Get. +type WorkflowTriggerHistoriesClientGetResponse struct { + WorkflowTriggerHistory +} + +// WorkflowTriggerHistoriesClientListResponse contains the response from method WorkflowTriggerHistoriesClient.List. +type WorkflowTriggerHistoriesClientListResponse struct { + WorkflowTriggerHistoryListResult +} + +// WorkflowTriggerHistoriesClientResubmitResponse contains the response from method WorkflowTriggerHistoriesClient.Resubmit. +type WorkflowTriggerHistoriesClientResubmitResponse struct { + // placeholder for future response values +} + +// WorkflowTriggersClientGetResponse contains the response from method WorkflowTriggersClient.Get. +type WorkflowTriggersClientGetResponse struct { + WorkflowTrigger +} + +// WorkflowTriggersClientGetSchemaJSONResponse contains the response from method WorkflowTriggersClient.GetSchemaJSON. +type WorkflowTriggersClientGetSchemaJSONResponse struct { + JSONSchema +} + +// WorkflowTriggersClientListCallbackURLResponse contains the response from method WorkflowTriggersClient.ListCallbackURL. +type WorkflowTriggersClientListCallbackURLResponse struct { + WorkflowTriggerCallbackURL +} + +// WorkflowTriggersClientListResponse contains the response from method WorkflowTriggersClient.List. +type WorkflowTriggersClientListResponse struct { + WorkflowTriggerListResult +} + +// WorkflowTriggersClientRunResponse contains the response from method WorkflowTriggersClient.Run. +type WorkflowTriggersClientRunResponse struct { + // placeholder for future response values +} + +// WorkflowVersionsClientGetResponse contains the response from method WorkflowVersionsClient.Get. +type WorkflowVersionsClientGetResponse struct { + WorkflowVersion +} + +// WorkflowVersionsClientListResponse contains the response from method WorkflowVersionsClient.List. +type WorkflowVersionsClientListResponse struct { + WorkflowVersionListResult +} + +// WorkflowsClientRegenerateAccessKeyResponse contains the response from method WorkflowsClient.RegenerateAccessKey. +type WorkflowsClientRegenerateAccessKeyResponse struct { + // placeholder for future response values +} + +// WorkflowsClientValidateResponse contains the response from method WorkflowsClient.Validate. +type WorkflowsClientValidateResponse struct { + // placeholder for future response values +} diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_staticsites_client.go b/sdk/resourcemanager/appservice/armappservice/staticsites_client.go similarity index 77% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_staticsites_client.go rename to sdk/resourcemanager/appservice/armappservice/staticsites_client.go index a0b556764297..d1d19b32f4b6 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_staticsites_client.go +++ b/sdk/resourcemanager/appservice/armappservice/staticsites_client.go @@ -5,6 +5,7 @@ // 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 @@ -55,9 +56,9 @@ func NewStaticSitesClient(subscriptionID string, credential azcore.TokenCredenti return client, nil } -// BeginApproveOrRejectPrivateEndpointConnection - Approves or rejects a private endpoint connection +// BeginApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -76,9 +77,9 @@ func (client *StaticSitesClient) BeginApproveOrRejectPrivateEndpointConnection(c } } -// ApproveOrRejectPrivateEndpointConnection - Approves or rejects a private endpoint connection +// ApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *StaticSitesClient) approveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*http.Response, error) { req, err := client.approveOrRejectPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) if err != nil { @@ -118,16 +119,16 @@ func (client *StaticSitesClient) approveOrRejectPrivateEndpointConnectionCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, privateEndpointWrapper) } -// BeginCreateOrUpdateStaticSite - Creates a new static site in an existing resource group, or updates an existing static -// site. +// BeginCreateOrUpdateStaticSite - Description for Creates a new static site in an existing resource group, or updates an +// existing static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -145,9 +146,10 @@ func (client *StaticSitesClient) BeginCreateOrUpdateStaticSite(ctx context.Conte } } -// CreateOrUpdateStaticSite - Creates a new static site in an existing resource group, or updates an existing static site. +// CreateOrUpdateStaticSite - Description for Creates a new static site in an existing resource group, or updates an existing +// static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *StaticSitesClient) createOrUpdateStaticSite(ctx context.Context, resourceGroupName string, name string, staticSiteEnvelope StaticSiteARMResource, options *StaticSitesClientBeginCreateOrUpdateStaticSiteOptions) (*http.Response, error) { req, err := client.createOrUpdateStaticSiteCreateRequest(ctx, resourceGroupName, name, staticSiteEnvelope, options) if err != nil { @@ -183,15 +185,15 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteEnvelope) } -// CreateOrUpdateStaticSiteAppSettings - Creates or updates the app settings of a static site. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -232,7 +234,7 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteAppSettingsCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appSettings) @@ -247,9 +249,9 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteAppSettingsHandleRespon return result, nil } -// CreateOrUpdateStaticSiteBuildAppSettings - Creates or updates the app settings of a static site build. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - The stage site identifier. @@ -295,7 +297,7 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteBuildAppSettingsCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appSettings) @@ -310,9 +312,10 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteBuildAppSettingsHandleR return result, nil } -// CreateOrUpdateStaticSiteBuildFunctionAppSettings - Creates or updates the function app settings of a static site build. +// CreateOrUpdateStaticSiteBuildFunctionAppSettings - Description for Creates or updates the function app settings of a static +// site build. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - The stage site identifier. @@ -358,7 +361,7 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteBuildFunctionAppSetting return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appSettings) @@ -373,10 +376,10 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteBuildFunctionAppSetting return result, nil } -// BeginCreateOrUpdateStaticSiteCustomDomain - Creates a new static site custom domain in an existing resource group and static -// site. +// BeginCreateOrUpdateStaticSiteCustomDomain - Description for Creates a new static site custom domain in an existing resource +// group and static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // domainName - The custom domain to create. @@ -396,10 +399,10 @@ func (client *StaticSitesClient) BeginCreateOrUpdateStaticSiteCustomDomain(ctx c } } -// CreateOrUpdateStaticSiteCustomDomain - Creates a new static site custom domain in an existing resource group and static -// site. +// CreateOrUpdateStaticSiteCustomDomain - Description for Creates a new static site custom domain in an existing resource +// group and static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *StaticSitesClient) createOrUpdateStaticSiteCustomDomain(ctx context.Context, resourceGroupName string, name string, domainName string, staticSiteCustomDomainRequestPropertiesEnvelope StaticSiteCustomDomainRequestPropertiesARMResource, options *StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions) (*http.Response, error) { req, err := client.createOrUpdateStaticSiteCustomDomainCreateRequest(ctx, resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, options) if err != nil { @@ -439,15 +442,16 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteCustomDomainCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteCustomDomainRequestPropertiesEnvelope) } -// CreateOrUpdateStaticSiteFunctionAppSettings - Creates or updates the function app settings of a static site. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -488,7 +492,7 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteFunctionAppSettingsCrea return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appSettings) @@ -503,9 +507,9 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteFunctionAppSettingsHand return result, nil } -// CreateUserRolesInvitationLink - Creates an invitation link for a user with the role +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -545,7 +549,7 @@ func (client *StaticSitesClient) createUserRolesInvitationLinkCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteUserRolesInvitationEnvelope) @@ -560,9 +564,9 @@ func (client *StaticSitesClient) createUserRolesInvitationLinkHandleResponse(res return result, nil } -// BeginCreateZipDeploymentForStaticSite - Deploys zipped content to a static site. +// BeginCreateZipDeploymentForStaticSite - Description for Deploys zipped content to a static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -580,9 +584,9 @@ func (client *StaticSitesClient) BeginCreateZipDeploymentForStaticSite(ctx conte } } -// CreateZipDeploymentForStaticSite - Deploys zipped content to a static site. +// CreateZipDeploymentForStaticSite - Description for Deploys zipped content to a static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *StaticSitesClient) createZipDeploymentForStaticSite(ctx context.Context, resourceGroupName string, name string, staticSiteZipDeploymentEnvelope StaticSiteZipDeploymentARMResource, options *StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions) (*http.Response, error) { req, err := client.createZipDeploymentForStaticSiteCreateRequest(ctx, resourceGroupName, name, staticSiteZipDeploymentEnvelope, options) if err != nil { @@ -618,15 +622,16 @@ func (client *StaticSitesClient) createZipDeploymentForStaticSiteCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteZipDeploymentEnvelope) } -// BeginCreateZipDeploymentForStaticSiteBuild - Deploys zipped content to a specific environment of a static site. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - Name of the environment. @@ -645,9 +650,9 @@ func (client *StaticSitesClient) BeginCreateZipDeploymentForStaticSiteBuild(ctx } } -// CreateZipDeploymentForStaticSiteBuild - Deploys zipped content to a specific environment of a static site. +// 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 2021-03-01 +// Generated from API version 2022-03-01 func (client *StaticSitesClient) createZipDeploymentForStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, staticSiteZipDeploymentEnvelope StaticSiteZipDeploymentARMResource, options *StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions) (*http.Response, error) { req, err := client.createZipDeploymentForStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope, options) if err != nil { @@ -687,15 +692,15 @@ func (client *StaticSitesClient) createZipDeploymentForStaticSiteBuildCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteZipDeploymentEnvelope) } -// BeginDeletePrivateEndpointConnection - Deletes a private endpoint connection +// BeginDeletePrivateEndpointConnection - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -713,9 +718,9 @@ func (client *StaticSitesClient) BeginDeletePrivateEndpointConnection(ctx contex } } -// DeletePrivateEndpointConnection - Deletes a private endpoint connection +// DeletePrivateEndpointConnection - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *StaticSitesClient) deletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *StaticSitesClientBeginDeletePrivateEndpointConnectionOptions) (*http.Response, error) { req, err := client.deletePrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) if err != nil { @@ -755,15 +760,15 @@ func (client *StaticSitesClient) deletePrivateEndpointConnectionCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginDeleteStaticSite - Deletes a static site. +// BeginDeleteStaticSite - Description for Deletes a static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -780,9 +785,9 @@ func (client *StaticSitesClient) BeginDeleteStaticSite(ctx context.Context, reso } } -// DeleteStaticSite - Deletes a static site. +// DeleteStaticSite - Description for Deletes a static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *StaticSitesClient) deleteStaticSite(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientBeginDeleteStaticSiteOptions) (*http.Response, error) { req, err := client.deleteStaticSiteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { @@ -818,15 +823,15 @@ func (client *StaticSitesClient) deleteStaticSiteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginDeleteStaticSiteBuild - Deletes a static site build. +// BeginDeleteStaticSiteBuild - Description for Deletes a static site build. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - The stage site identifier. @@ -844,9 +849,9 @@ func (client *StaticSitesClient) BeginDeleteStaticSiteBuild(ctx context.Context, } } -// DeleteStaticSiteBuild - Deletes a static site build. +// DeleteStaticSiteBuild - Description for Deletes a static site build. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *StaticSitesClient) deleteStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientBeginDeleteStaticSiteBuildOptions) (*http.Response, error) { req, err := client.deleteStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, options) if err != nil { @@ -886,15 +891,15 @@ func (client *StaticSitesClient) deleteStaticSiteBuildCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginDeleteStaticSiteCustomDomain - Deletes a custom domain. +// BeginDeleteStaticSiteCustomDomain - Description for Deletes a custom domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // domainName - The custom domain to delete. @@ -912,9 +917,9 @@ func (client *StaticSitesClient) BeginDeleteStaticSiteCustomDomain(ctx context.C } } -// DeleteStaticSiteCustomDomain - Deletes a custom domain. +// DeleteStaticSiteCustomDomain - Description for Deletes a custom domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *StaticSitesClient) deleteStaticSiteCustomDomain(ctx context.Context, resourceGroupName string, name string, domainName string, options *StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions) (*http.Response, error) { req, err := client.deleteStaticSiteCustomDomainCreateRequest(ctx, resourceGroupName, name, domainName, options) if err != nil { @@ -954,15 +959,15 @@ func (client *StaticSitesClient) deleteStaticSiteCustomDomainCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteStaticSiteUser - Deletes the user entry from the static site. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the staticsite. // authprovider - The auth provider for this user. @@ -1012,15 +1017,15 @@ func (client *StaticSitesClient) deleteStaticSiteUserCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginDetachStaticSite - Detaches a static site. +// BeginDetachStaticSite - Description for Detaches a static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -1037,9 +1042,9 @@ func (client *StaticSitesClient) BeginDetachStaticSite(ctx context.Context, reso } } -// DetachStaticSite - Detaches a static site. +// DetachStaticSite - Description for Detaches a static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *StaticSitesClient) detachStaticSite(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientBeginDetachStaticSiteOptions) (*http.Response, error) { req, err := client.detachStaticSiteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { @@ -1075,15 +1080,15 @@ func (client *StaticSitesClient) detachStaticSiteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DetachUserProvidedFunctionAppFromStaticSite - Detach the user provided function app from the static site +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -1128,15 +1133,16 @@ func (client *StaticSitesClient) detachUserProvidedFunctionAppFromStaticSiteCrea return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DetachUserProvidedFunctionAppFromStaticSiteBuild - Detach the user provided function app from the static site build +// DetachUserProvidedFunctionAppFromStaticSiteBuild - Description for Detach the user provided function app from the static +// site build // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - The stage site identifier. @@ -1186,15 +1192,289 @@ func (client *StaticSitesClient) detachUserProvidedFunctionAppFromStaticSiteBuil return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// GetPrivateEndpointConnection - Gets a private endpoint connection +// 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 2021-03-01 +// Generated from API version 2022-03-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) { + req, err := client.getLinkedBackendCreateRequest(ctx, resourceGroupName, name, linkedBackendName, options) + if err != nil { + return StaticSitesClientGetLinkedBackendResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientGetLinkedBackendResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return StaticSitesClientGetLinkedBackendResponse{}, runtime.NewResponseError(resp) + } + return client.getLinkedBackendHandleResponse(resp) +} + +// getLinkedBackendCreateRequest creates the GetLinkedBackend request. +func (client *StaticSitesClient) getLinkedBackendCreateRequest(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, options *StaticSitesClientGetLinkedBackendOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if linkedBackendName == "" { + return nil, errors.New("parameter linkedBackendName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkedBackendName}", url.PathEscape(linkedBackendName)) + 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.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getLinkedBackendHandleResponse handles the GetLinkedBackend response. +func (client *StaticSitesClient) getLinkedBackendHandleResponse(resp *http.Response) (StaticSitesClientGetLinkedBackendResponse, error) { + result := StaticSitesClientGetLinkedBackendResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteLinkedBackendARMResource); err != nil { + return StaticSitesClientGetLinkedBackendResponse{}, err + } + return result, nil +} + +// 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-03-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site +// environmentName - The stage site identifier +// linkedBackendName - Name of the linked backend that should be retrieved +// 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) { + req, err := client.getLinkedBackendForBuildCreateRequest(ctx, resourceGroupName, name, environmentName, linkedBackendName, options) + if err != nil { + return StaticSitesClientGetLinkedBackendForBuildResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientGetLinkedBackendForBuildResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return StaticSitesClientGetLinkedBackendForBuildResponse{}, runtime.NewResponseError(resp) + } + return client.getLinkedBackendForBuildHandleResponse(resp) +} + +// getLinkedBackendForBuildCreateRequest creates the GetLinkedBackendForBuild request. +func (client *StaticSitesClient) getLinkedBackendForBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, options *StaticSitesClientGetLinkedBackendForBuildOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if linkedBackendName == "" { + return nil, errors.New("parameter linkedBackendName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkedBackendName}", url.PathEscape(linkedBackendName)) + 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.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getLinkedBackendForBuildHandleResponse handles the GetLinkedBackendForBuild response. +func (client *StaticSitesClient) getLinkedBackendForBuildHandleResponse(resp *http.Response) (StaticSitesClientGetLinkedBackendForBuildResponse, error) { + result := StaticSitesClientGetLinkedBackendForBuildResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteLinkedBackendARMResource); err != nil { + return StaticSitesClientGetLinkedBackendForBuildResponse{}, err + } + return result, nil +} + +// NewGetLinkedBackendsPager - Returns details of all backends linked to a static site +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-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.GetLinkedBackends +// method. +func (client *StaticSitesClient) NewGetLinkedBackendsPager(resourceGroupName string, name string, options *StaticSitesClientGetLinkedBackendsOptions) *runtime.Pager[StaticSitesClientGetLinkedBackendsResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientGetLinkedBackendsResponse]{ + More: func(page StaticSitesClientGetLinkedBackendsResponse) bool { + 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 + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientGetLinkedBackendsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return StaticSitesClientGetLinkedBackendsResponse{}, runtime.NewResponseError(resp) + } + return client.getLinkedBackendsHandleResponse(resp) + }, + }) +} + +// getLinkedBackendsCreateRequest creates the GetLinkedBackends request. +func (client *StaticSitesClient) getLinkedBackendsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientGetLinkedBackendsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + 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.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getLinkedBackendsHandleResponse handles the GetLinkedBackends response. +func (client *StaticSitesClient) getLinkedBackendsHandleResponse(resp *http.Response) (StaticSitesClientGetLinkedBackendsResponse, error) { + result := StaticSitesClientGetLinkedBackendsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteLinkedBackendsCollection); err != nil { + return StaticSitesClientGetLinkedBackendsResponse{}, err + } + return result, nil +} + +// NewGetLinkedBackendsForBuildPager - Returns details of all backends linked to a static site build +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site +// environmentName - The stage site identifier +// options - StaticSitesClientGetLinkedBackendsForBuildOptions contains the optional parameters for the StaticSitesClient.GetLinkedBackendsForBuild +// method. +func (client *StaticSitesClient) NewGetLinkedBackendsForBuildPager(resourceGroupName string, name string, environmentName string, options *StaticSitesClientGetLinkedBackendsForBuildOptions) *runtime.Pager[StaticSitesClientGetLinkedBackendsForBuildResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientGetLinkedBackendsForBuildResponse]{ + More: func(page StaticSitesClientGetLinkedBackendsForBuildResponse) bool { + 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) + } + if err != nil { + return StaticSitesClientGetLinkedBackendsForBuildResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientGetLinkedBackendsForBuildResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return StaticSitesClientGetLinkedBackendsForBuildResponse{}, runtime.NewResponseError(resp) + } + return client.getLinkedBackendsForBuildHandleResponse(resp) + }, + }) +} + +// getLinkedBackendsForBuildCreateRequest creates the GetLinkedBackendsForBuild request. +func (client *StaticSitesClient) getLinkedBackendsForBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientGetLinkedBackendsForBuildOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + 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.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getLinkedBackendsForBuildHandleResponse handles the GetLinkedBackendsForBuild response. +func (client *StaticSitesClient) getLinkedBackendsForBuildHandleResponse(resp *http.Response) (StaticSitesClientGetLinkedBackendsForBuildResponse, error) { + result := StaticSitesClientGetLinkedBackendsForBuildResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteLinkedBackendsCollection); err != nil { + return StaticSitesClientGetLinkedBackendsForBuildResponse{}, err + } + return result, nil +} + +// GetPrivateEndpointConnection - Description for Gets a private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-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. @@ -1239,7 +1519,7 @@ func (client *StaticSitesClient) getPrivateEndpointConnectionCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1254,9 +1534,10 @@ func (client *StaticSitesClient) getPrivateEndpointConnectionHandleResponse(resp return result, nil } -// NewGetPrivateEndpointConnectionListPager - Gets the list of private endpoint connections associated with a static site +// NewGetPrivateEndpointConnectionListPager - Description for Gets the list of private endpoint connections associated with +// a static site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.GetPrivateEndpointConnectionList @@ -1309,7 +1590,7 @@ func (client *StaticSitesClient) getPrivateEndpointConnectionListCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1324,9 +1605,9 @@ func (client *StaticSitesClient) getPrivateEndpointConnectionListHandleResponse( return result, nil } -// GetPrivateLinkResources - Gets the private link resources +// GetPrivateLinkResources - Description for Gets the private link resources // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -1366,7 +1647,7 @@ func (client *StaticSitesClient) getPrivateLinkResourcesCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1381,9 +1662,9 @@ func (client *StaticSitesClient) getPrivateLinkResourcesHandleResponse(resp *htt return result, nil } -// GetStaticSite - Gets the details of a static site. +// GetStaticSite - Description for Gets the details of a static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -1423,7 +1704,7 @@ func (client *StaticSitesClient) getStaticSiteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1438,9 +1719,9 @@ func (client *StaticSitesClient) getStaticSiteHandleResponse(resp *http.Response return result, nil } -// GetStaticSiteBuild - Gets the details of a static site build. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - The stage site identifier. @@ -1485,7 +1766,7 @@ func (client *StaticSitesClient) getStaticSiteBuildCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1500,9 +1781,9 @@ func (client *StaticSitesClient) getStaticSiteBuildHandleResponse(resp *http.Res return result, nil } -// NewGetStaticSiteBuildsPager - Gets all static site builds for a particular static site. +// NewGetStaticSiteBuildsPager - Description for Gets all static site builds for a particular static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.GetStaticSiteBuilds @@ -1555,7 +1836,7 @@ func (client *StaticSitesClient) getStaticSiteBuildsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1570,9 +1851,9 @@ func (client *StaticSitesClient) getStaticSiteBuildsHandleResponse(resp *http.Re return result, nil } -// GetStaticSiteCustomDomain - Gets an existing custom domain for a particular static site. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -1617,7 +1898,7 @@ func (client *StaticSitesClient) getStaticSiteCustomDomainCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1632,9 +1913,9 @@ func (client *StaticSitesClient) getStaticSiteCustomDomainHandleResponse(resp *h return result, nil } -// NewGetStaticSitesByResourceGroupPager - Gets all static sites in the specified resource group. +// NewGetStaticSitesByResourceGroupPager - Description for Gets all static sites in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // options - StaticSitesClientGetStaticSitesByResourceGroupOptions contains the optional parameters for the StaticSitesClient.GetStaticSitesByResourceGroup // method. @@ -1682,7 +1963,7 @@ func (client *StaticSitesClient) getStaticSitesByResourceGroupCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1697,9 +1978,10 @@ func (client *StaticSitesClient) getStaticSitesByResourceGroupHandleResponse(res return result, nil } -// GetUserProvidedFunctionAppForStaticSite - Gets the details of the user provided function app registered with a static site +// GetUserProvidedFunctionAppForStaticSite - Description for Gets the details of the user provided function app registered +// with a static site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -1744,7 +2026,7 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppForStaticSiteCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1759,10 +2041,10 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppForStaticSiteHandleRe return result, nil } -// GetUserProvidedFunctionAppForStaticSiteBuild - Gets the details of the user provided function app registered with a static -// site build +// GetUserProvidedFunctionAppForStaticSiteBuild - Description for Gets the details of the user provided function app registered +// with a static site build // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - The stage site identifier. @@ -1812,7 +2094,7 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppForStaticSiteBuildCre return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1827,10 +2109,10 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppForStaticSiteBuildHan return result, nil } -// NewGetUserProvidedFunctionAppsForStaticSitePager - Gets the details of the user provided function apps registered with -// a static site +// NewGetUserProvidedFunctionAppsForStaticSitePager - Description for Gets the details of the user provided function apps +// registered with a static site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.GetUserProvidedFunctionAppsForStaticSite @@ -1883,7 +2165,7 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1898,10 +2180,10 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteHandleR return result, nil } -// NewGetUserProvidedFunctionAppsForStaticSiteBuildPager - Gets the details of the user provided function apps registered -// with a static site build +// NewGetUserProvidedFunctionAppsForStaticSiteBuildPager - Description for Gets the details of the user provided function +// apps registered with a static site build // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - The stage site identifier. @@ -1959,7 +2241,7 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteBuildCr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1974,9 +2256,152 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteBuildHa return result, nil } -// NewListPager - Get all Static Sites for a subscription. +// BeginLinkBackend - Link backend to a static site +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-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 +// staticSiteLinkedBackendEnvelope - A JSON representation of the linked backend request properties +// options - StaticSitesClientBeginLinkBackendOptions contains the optional parameters for the StaticSitesClient.BeginLinkBackend +// method. +func (client *StaticSitesClient) BeginLinkBackend(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginLinkBackendOptions) (*runtime.Poller[StaticSitesClientLinkBackendResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.linkBackend(ctx, resourceGroupName, name, linkedBackendName, staticSiteLinkedBackendEnvelope, options) + if err != nil { + return nil, err + } + return runtime.NewPoller[StaticSitesClientLinkBackendResponse](resp, client.pl, nil) + } else { + return runtime.NewPollerFromResumeToken[StaticSitesClientLinkBackendResponse](options.ResumeToken, client.pl, nil) + } +} + +// LinkBackend - Link backend to a static site +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 +func (client *StaticSitesClient) linkBackend(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginLinkBackendOptions) (*http.Response, error) { + req, err := client.linkBackendCreateRequest(ctx, resourceGroupName, name, linkedBackendName, staticSiteLinkedBackendEnvelope, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// linkBackendCreateRequest creates the LinkBackend request. +func (client *StaticSitesClient) linkBackendCreateRequest(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginLinkBackendOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if linkedBackendName == "" { + return nil, errors.New("parameter linkedBackendName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkedBackendName}", url.PathEscape(linkedBackendName)) + 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.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, staticSiteLinkedBackendEnvelope) +} + +// BeginLinkBackendToBuild - Link backend to a static site build +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site +// environmentName - The stage site identifier +// linkedBackendName - Name of the backend to link to the static site +// staticSiteLinkedBackendEnvelope - A JSON representation of the linked backend request properties +// options - StaticSitesClientBeginLinkBackendToBuildOptions contains the optional parameters for the StaticSitesClient.BeginLinkBackendToBuild +// method. +func (client *StaticSitesClient) BeginLinkBackendToBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginLinkBackendToBuildOptions) (*runtime.Poller[StaticSitesClientLinkBackendToBuildResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.linkBackendToBuild(ctx, resourceGroupName, name, environmentName, linkedBackendName, staticSiteLinkedBackendEnvelope, options) + if err != nil { + return nil, err + } + return runtime.NewPoller[StaticSitesClientLinkBackendToBuildResponse](resp, client.pl, nil) + } else { + return runtime.NewPollerFromResumeToken[StaticSitesClientLinkBackendToBuildResponse](options.ResumeToken, client.pl, nil) + } +} + +// LinkBackendToBuild - Link backend to a static site build // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 +func (client *StaticSitesClient) linkBackendToBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginLinkBackendToBuildOptions) (*http.Response, error) { + req, err := client.linkBackendToBuildCreateRequest(ctx, resourceGroupName, name, environmentName, linkedBackendName, staticSiteLinkedBackendEnvelope, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// linkBackendToBuildCreateRequest creates the LinkBackendToBuild request. +func (client *StaticSitesClient) linkBackendToBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginLinkBackendToBuildOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if linkedBackendName == "" { + return nil, errors.New("parameter linkedBackendName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkedBackendName}", url.PathEscape(linkedBackendName)) + 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.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, staticSiteLinkedBackendEnvelope) +} + +// NewListPager - Description for Get all Static Sites for a subscription. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // options - StaticSitesClientListOptions contains the optional parameters for the StaticSitesClient.List method. func (client *StaticSitesClient) NewListPager(options *StaticSitesClientListOptions) *runtime.Pager[StaticSitesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[StaticSitesClientListResponse]{ @@ -2018,7 +2443,7 @@ func (client *StaticSitesClient) listCreateRequest(ctx context.Context, options return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2033,9 +2458,9 @@ func (client *StaticSitesClient) listHandleResponse(resp *http.Response) (Static return result, nil } -// ListStaticSiteAppSettings - Gets the application settings of a static site. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -2075,7 +2500,7 @@ func (client *StaticSitesClient) listStaticSiteAppSettingsCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2090,9 +2515,9 @@ func (client *StaticSitesClient) listStaticSiteAppSettingsHandleResponse(resp *h return result, nil } -// ListStaticSiteBuildAppSettings - Gets the application settings of a static site build. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - The stage site identifier. @@ -2137,7 +2562,7 @@ func (client *StaticSitesClient) listStaticSiteBuildAppSettingsCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2152,9 +2577,9 @@ func (client *StaticSitesClient) listStaticSiteBuildAppSettingsHandleResponse(re return result, nil } -// ListStaticSiteBuildFunctionAppSettings - Gets the application settings of a static site build. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - The stage site identifier. @@ -2199,7 +2624,7 @@ func (client *StaticSitesClient) listStaticSiteBuildFunctionAppSettingsCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2214,9 +2639,9 @@ func (client *StaticSitesClient) listStaticSiteBuildFunctionAppSettingsHandleRes return result, nil } -// NewListStaticSiteBuildFunctionsPager - Gets the functions of a particular static site build. +// NewListStaticSiteBuildFunctionsPager - Description for Gets the functions of a particular static site build. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - The stage site identifier. @@ -2274,7 +2699,7 @@ func (client *StaticSitesClient) listStaticSiteBuildFunctionsCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2289,9 +2714,9 @@ func (client *StaticSitesClient) listStaticSiteBuildFunctionsHandleResponse(resp return result, nil } -// ListStaticSiteConfiguredRoles - Lists the roles configured for the static site. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -2331,7 +2756,7 @@ func (client *StaticSitesClient) listStaticSiteConfiguredRolesCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2346,9 +2771,9 @@ func (client *StaticSitesClient) listStaticSiteConfiguredRolesHandleResponse(res return result, nil } -// NewListStaticSiteCustomDomainsPager - Gets all static site custom domains for a particular static site. +// NewListStaticSiteCustomDomainsPager - Description for Gets all static site custom domains for a particular static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListStaticSiteCustomDomains @@ -2401,7 +2826,7 @@ func (client *StaticSitesClient) listStaticSiteCustomDomainsCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2416,9 +2841,9 @@ func (client *StaticSitesClient) listStaticSiteCustomDomainsHandleResponse(resp return result, nil } -// ListStaticSiteFunctionAppSettings - Gets the application settings of a static site. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -2458,7 +2883,7 @@ func (client *StaticSitesClient) listStaticSiteFunctionAppSettingsCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2473,9 +2898,9 @@ func (client *StaticSitesClient) listStaticSiteFunctionAppSettingsHandleResponse return result, nil } -// NewListStaticSiteFunctionsPager - Gets the functions of a static site. +// NewListStaticSiteFunctionsPager - Description for Gets the functions of a static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListStaticSiteFunctions @@ -2528,7 +2953,7 @@ func (client *StaticSitesClient) listStaticSiteFunctionsCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2543,9 +2968,9 @@ func (client *StaticSitesClient) listStaticSiteFunctionsHandleResponse(resp *htt return result, nil } -// ListStaticSiteSecrets - Lists the secrets for an existing static site. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -2585,7 +3010,7 @@ func (client *StaticSitesClient) listStaticSiteSecretsCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2600,9 +3025,9 @@ func (client *StaticSitesClient) listStaticSiteSecretsHandleResponse(resp *http. return result, nil } -// NewListStaticSiteUsersPager - Gets the list of users of a static site. +// NewListStaticSiteUsersPager - Description for Gets the list of users of a static site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -2660,7 +3085,7 @@ func (client *StaticSitesClient) listStaticSiteUsersCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2675,9 +3100,9 @@ func (client *StaticSitesClient) listStaticSiteUsersHandleResponse(resp *http.Re return result, nil } -// PreviewWorkflow - Generates a preview workflow file for the static site +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -2713,7 +3138,7 @@ func (client *StaticSitesClient) previewWorkflowCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSitesWorkflowPreviewRequest) @@ -2728,9 +3153,10 @@ func (client *StaticSitesClient) previewWorkflowHandleResponse(resp *http.Respon return result, nil } -// BeginRegisterUserProvidedFunctionAppWithStaticSite - Register a user provided function app with a static site +// BeginRegisterUserProvidedFunctionAppWithStaticSite - 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -2749,9 +3175,9 @@ func (client *StaticSitesClient) BeginRegisterUserProvidedFunctionAppWithStaticS } } -// RegisterUserProvidedFunctionAppWithStaticSite - Register a user provided function app with a static site +// 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 2021-03-01 +// Generated from API version 2022-03-01 func (client *StaticSitesClient) registerUserProvidedFunctionAppWithStaticSite(ctx context.Context, resourceGroupName string, name string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, options *StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions) (*http.Response, error) { req, err := client.registerUserProvidedFunctionAppWithStaticSiteCreateRequest(ctx, resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, options) if err != nil { @@ -2794,15 +3220,16 @@ func (client *StaticSitesClient) registerUserProvidedFunctionAppWithStaticSiteCr if options != nil && options.IsForced != nil { reqQP.Set("isForced", strconv.FormatBool(*options.IsForced)) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteUserProvidedFunctionEnvelope) } -// BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild - Register a user provided function app with a static site build +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // environmentName - The stage site identifier. @@ -2822,9 +3249,10 @@ func (client *StaticSitesClient) BeginRegisterUserProvidedFunctionAppWithStaticS } } -// RegisterUserProvidedFunctionAppWithStaticSiteBuild - Register a user provided function app with a static site build +// RegisterUserProvidedFunctionAppWithStaticSiteBuild - 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 2021-03-01 +// Generated from API version 2022-03-01 func (client *StaticSitesClient) registerUserProvidedFunctionAppWithStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, options *StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions) (*http.Response, error) { req, err := client.registerUserProvidedFunctionAppWithStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, functionAppName, staticSiteUserProvidedFunctionEnvelope, options) if err != nil { @@ -2871,15 +3299,15 @@ func (client *StaticSitesClient) registerUserProvidedFunctionAppWithStaticSiteBu if options != nil && options.IsForced != nil { reqQP.Set("isForced", strconv.FormatBool(*options.IsForced)) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteUserProvidedFunctionEnvelope) } -// ResetStaticSiteAPIKey - Resets the api key for an existing static site. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -2919,15 +3347,133 @@ func (client *StaticSitesClient) resetStaticSiteAPIKeyCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, resetPropertiesEnvelope) } -// UpdateStaticSite - Creates a new static site in an existing resource group, or updates an existing static site. +// UnlinkBackend - Unlink a backend from a static site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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) { + req, err := client.unlinkBackendCreateRequest(ctx, resourceGroupName, name, linkedBackendName, options) + if err != nil { + return StaticSitesClientUnlinkBackendResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientUnlinkBackendResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { + return StaticSitesClientUnlinkBackendResponse{}, runtime.NewResponseError(resp) + } + return StaticSitesClientUnlinkBackendResponse{}, nil +} + +// unlinkBackendCreateRequest creates the UnlinkBackend request. +func (client *StaticSitesClient) unlinkBackendCreateRequest(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, options *StaticSitesClientUnlinkBackendOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if linkedBackendName == "" { + return nil, errors.New("parameter linkedBackendName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkedBackendName}", url.PathEscape(linkedBackendName)) + 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.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.IsCleaningAuthConfig != nil { + reqQP.Set("isCleaningAuthConfig", strconv.FormatBool(*options.IsCleaningAuthConfig)) + } + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// UnlinkBackendFromBuild - Unlink a backend from a static site build +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site +// environmentName - The stage site identifier +// linkedBackendName - Name of the backend linked to the static site +// 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) { + req, err := client.unlinkBackendFromBuildCreateRequest(ctx, resourceGroupName, name, environmentName, linkedBackendName, options) + if err != nil { + return StaticSitesClientUnlinkBackendFromBuildResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return StaticSitesClientUnlinkBackendFromBuildResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { + return StaticSitesClientUnlinkBackendFromBuildResponse{}, runtime.NewResponseError(resp) + } + return StaticSitesClientUnlinkBackendFromBuildResponse{}, nil +} + +// unlinkBackendFromBuildCreateRequest creates the UnlinkBackendFromBuild request. +func (client *StaticSitesClient) unlinkBackendFromBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, options *StaticSitesClientUnlinkBackendFromBuildOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if linkedBackendName == "" { + return nil, errors.New("parameter linkedBackendName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkedBackendName}", url.PathEscape(linkedBackendName)) + 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.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.IsCleaningAuthConfig != nil { + reqQP.Set("isCleaningAuthConfig", strconv.FormatBool(*options.IsCleaningAuthConfig)) + } + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// UpdateStaticSite - Description for Creates a new static site in an existing resource group, or updates an existing static +// site. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-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. @@ -2968,7 +3514,7 @@ func (client *StaticSitesClient) updateStaticSiteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteEnvelope) @@ -2983,9 +3529,9 @@ func (client *StaticSitesClient) updateStaticSiteHandleResponse(resp *http.Respo return result, nil } -// UpdateStaticSiteUser - Updates a user entry with the listed roles +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -3036,7 +3582,7 @@ func (client *StaticSitesClient) updateStaticSiteUserCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteUserEnvelope) @@ -3051,9 +3597,153 @@ func (client *StaticSitesClient) updateStaticSiteUserHandleResponse(resp *http.R return result, nil } -// BeginValidateCustomDomainCanBeAddedToStaticSite - Validates a particular custom domain can be added to a static site. +// 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-03-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 +// staticSiteLinkedBackendEnvelope - A JSON representation of the linked backend request properties +// options - StaticSitesClientBeginValidateBackendOptions contains the optional parameters for the StaticSitesClient.BeginValidateBackend +// method. +func (client *StaticSitesClient) BeginValidateBackend(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginValidateBackendOptions) (*runtime.Poller[StaticSitesClientValidateBackendResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.validateBackend(ctx, resourceGroupName, name, linkedBackendName, staticSiteLinkedBackendEnvelope, options) + if err != nil { + return nil, err + } + return runtime.NewPoller[StaticSitesClientValidateBackendResponse](resp, client.pl, nil) + } else { + return runtime.NewPollerFromResumeToken[StaticSitesClientValidateBackendResponse](options.ResumeToken, client.pl, nil) + } +} + +// 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-03-01 +func (client *StaticSitesClient) validateBackend(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginValidateBackendOptions) (*http.Response, error) { + req, err := client.validateBackendCreateRequest(ctx, resourceGroupName, name, linkedBackendName, staticSiteLinkedBackendEnvelope, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// validateBackendCreateRequest creates the ValidateBackend request. +func (client *StaticSitesClient) validateBackendCreateRequest(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginValidateBackendOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName}/validate" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if linkedBackendName == "" { + return nil, errors.New("parameter linkedBackendName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkedBackendName}", url.PathEscape(linkedBackendName)) + 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.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, staticSiteLinkedBackendEnvelope) +} + +// 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-03-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the static site +// environmentName - The stage site identifier +// linkedBackendName - Name of the linked backend that should be retrieved +// staticSiteLinkedBackendEnvelope - A JSON representation of the linked backend request properties +// options - StaticSitesClientBeginValidateBackendForBuildOptions contains the optional parameters for the StaticSitesClient.BeginValidateBackendForBuild +// method. +func (client *StaticSitesClient) BeginValidateBackendForBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginValidateBackendForBuildOptions) (*runtime.Poller[StaticSitesClientValidateBackendForBuildResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.validateBackendForBuild(ctx, resourceGroupName, name, environmentName, linkedBackendName, staticSiteLinkedBackendEnvelope, options) + if err != nil { + return nil, err + } + return runtime.NewPoller[StaticSitesClientValidateBackendForBuildResponse](resp, client.pl, nil) + } else { + return runtime.NewPollerFromResumeToken[StaticSitesClientValidateBackendForBuildResponse](options.ResumeToken, client.pl, nil) + } +} + +// 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-03-01 +func (client *StaticSitesClient) validateBackendForBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginValidateBackendForBuildOptions) (*http.Response, error) { + req, err := client.validateBackendForBuildCreateRequest(ctx, resourceGroupName, name, environmentName, linkedBackendName, staticSiteLinkedBackendEnvelope, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// validateBackendForBuildCreateRequest creates the ValidateBackendForBuild request. +func (client *StaticSitesClient) validateBackendForBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginValidateBackendForBuildOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName}/validate" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if linkedBackendName == "" { + return nil, errors.New("parameter linkedBackendName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkedBackendName}", url.PathEscape(linkedBackendName)) + 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.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, staticSiteLinkedBackendEnvelope) +} + +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the static site. // domainName - The custom domain to validate. @@ -3073,9 +3763,10 @@ func (client *StaticSitesClient) BeginValidateCustomDomainCanBeAddedToStaticSite } } -// ValidateCustomDomainCanBeAddedToStaticSite - Validates a particular custom domain can be added to a static site. +// ValidateCustomDomainCanBeAddedToStaticSite - 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 2021-03-01 +// Generated from API version 2022-03-01 func (client *StaticSitesClient) validateCustomDomainCanBeAddedToStaticSite(ctx context.Context, resourceGroupName string, name string, domainName string, staticSiteCustomDomainRequestPropertiesEnvelope StaticSiteCustomDomainRequestPropertiesARMResource, options *StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions) (*http.Response, error) { req, err := client.validateCustomDomainCanBeAddedToStaticSiteCreateRequest(ctx, resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, options) if err != nil { @@ -3115,7 +3806,7 @@ func (client *StaticSitesClient) validateCustomDomainCanBeAddedToStaticSiteCreat return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, staticSiteCustomDomainRequestPropertiesEnvelope) diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_time_rfc3339.go b/sdk/resourcemanager/appservice/armappservice/time_rfc3339.go similarity index 99% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_time_rfc3339.go rename to sdk/resourcemanager/appservice/armappservice/time_rfc3339.go index c5897c2a0842..6fbddbab455e 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_time_rfc3339.go +++ b/sdk/resourcemanager/appservice/armappservice/time_rfc3339.go @@ -5,6 +5,7 @@ // 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 diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_topleveldomains_client.go b/sdk/resourcemanager/appservice/armappservice/topleveldomains_client.go similarity index 94% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_topleveldomains_client.go rename to sdk/resourcemanager/appservice/armappservice/topleveldomains_client.go index 11bcab9dc018..bf1403e19693 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_topleveldomains_client.go +++ b/sdk/resourcemanager/appservice/armappservice/topleveldomains_client.go @@ -5,6 +5,7 @@ // 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 @@ -54,9 +55,9 @@ func NewTopLevelDomainsClient(subscriptionID string, credential azcore.TokenCred return client, nil } -// Get - Get details of a top-level domain. +// Get - Description for Get details of a top-level domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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) { @@ -90,7 +91,7 @@ func (client *TopLevelDomainsClient) getCreateRequest(ctx context.Context, name return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -105,9 +106,9 @@ func (client *TopLevelDomainsClient) getHandleResponse(resp *http.Response) (Top return result, nil } -// NewListPager - Get all top-level domains supported for registration. +// NewListPager - Description for Get all top-level domains supported for registration. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - TopLevelDomainsClientListOptions contains the optional parameters for the TopLevelDomainsClient.List method. func (client *TopLevelDomainsClient) NewListPager(options *TopLevelDomainsClientListOptions) *runtime.Pager[TopLevelDomainsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[TopLevelDomainsClientListResponse]{ @@ -149,7 +150,7 @@ func (client *TopLevelDomainsClient) listCreateRequest(ctx context.Context, opti return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -164,9 +165,9 @@ func (client *TopLevelDomainsClient) listHandleResponse(resp *http.Response) (To return result, nil } -// NewListAgreementsPager - Gets all legal agreements that user needs to accept before purchasing a domain. +// NewListAgreementsPager - Description for Gets all legal agreements that user needs to accept before purchasing a domain. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // name - Name of the top-level domain. // agreementOption - Domain agreement options. // options - TopLevelDomainsClientListAgreementsOptions contains the optional parameters for the TopLevelDomainsClient.ListAgreements @@ -215,7 +216,7 @@ func (client *TopLevelDomainsClient) listAgreementsCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, agreementOption) diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_webapps_client.go b/sdk/resourcemanager/appservice/armappservice/webapps_client.go similarity index 92% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_webapps_client.go rename to sdk/resourcemanager/appservice/armappservice/webapps_client.go index 0ceae50360d5..b9b52d85ad25 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_webapps_client.go +++ b/sdk/resourcemanager/appservice/armappservice/webapps_client.go @@ -5,6 +5,7 @@ // 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 @@ -55,9 +56,9 @@ func NewWebAppsClient(subscriptionID string, credential azcore.TokenCredential, return client, nil } -// AddPremierAddOn - Updates a named add-on of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // premierAddOnName - Add-on name. @@ -102,7 +103,7 @@ func (client *WebAppsClient) addPremierAddOnCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, premierAddOn) @@ -117,9 +118,9 @@ func (client *WebAppsClient) addPremierAddOnHandleResponse(resp *http.Response) return result, nil } -// AddPremierAddOnSlot - Updates a named add-on of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // premierAddOnName - Add-on name. @@ -171,7 +172,7 @@ func (client *WebAppsClient) addPremierAddOnSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, premierAddOn) @@ -186,9 +187,9 @@ func (client *WebAppsClient) addPremierAddOnSlotHandleResponse(resp *http.Respon return result, nil } -// AnalyzeCustomHostname - Analyze a custom hostname. +// AnalyzeCustomHostname - Description for Analyze a custom hostname. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -231,7 +232,7 @@ func (client *WebAppsClient) analyzeCustomHostnameCreateRequest(ctx context.Cont if options != nil && options.HostName != nil { reqQP.Set("hostName", *options.HostName) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -246,9 +247,9 @@ func (client *WebAppsClient) analyzeCustomHostnameHandleResponse(resp *http.Resp return result, nil } -// AnalyzeCustomHostnameSlot - Analyze a custom hostname. +// AnalyzeCustomHostnameSlot - Description for Analyze a custom hostname. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -296,7 +297,7 @@ func (client *WebAppsClient) analyzeCustomHostnameSlotCreateRequest(ctx context. if options != nil && options.HostName != nil { reqQP.Set("hostName", *options.HostName) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -311,9 +312,10 @@ func (client *WebAppsClient) analyzeCustomHostnameSlotHandleResponse(resp *http. return result, nil } -// ApplySlotConfigToProduction - Applies the configuration settings from the target slot onto the current slot. +// ApplySlotConfigToProduction - 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -354,15 +356,15 @@ func (client *WebAppsClient) applySlotConfigToProductionCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, slotSwapEntity) } -// ApplySlotConfigurationSlot - Applies the configuration settings from the target slot onto the current slot. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -408,15 +410,15 @@ func (client *WebAppsClient) applySlotConfigurationSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, slotSwapEntity) } -// BeginApproveOrRejectPrivateEndpointConnection - Approves or rejects a private endpoint connection +// BeginApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -433,9 +435,9 @@ func (client *WebAppsClient) BeginApproveOrRejectPrivateEndpointConnection(ctx c } } -// ApproveOrRejectPrivateEndpointConnection - Approves or rejects a private endpoint connection +// ApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) approveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*http.Response, error) { req, err := client.approveOrRejectPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) if err != nil { @@ -475,15 +477,15 @@ func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, privateEndpointWrapper) } -// BeginApproveOrRejectPrivateEndpointConnectionSlot - Approves or rejects a private endpoint connection +// BeginApproveOrRejectPrivateEndpointConnectionSlot - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -500,9 +502,9 @@ func (client *WebAppsClient) BeginApproveOrRejectPrivateEndpointConnectionSlot(c } } -// ApproveOrRejectPrivateEndpointConnectionSlot - Approves or rejects a private endpoint connection +// ApproveOrRejectPrivateEndpointConnectionSlot - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions) (*http.Response, error) { req, err := client.approveOrRejectPrivateEndpointConnectionSlotCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, slot, privateEndpointWrapper, options) if err != nil { @@ -546,15 +548,15 @@ func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionSlotCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, privateEndpointWrapper) } -// Backup - Creates a backup of an app. +// Backup - Description for Creates a backup of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -594,7 +596,7 @@ func (client *WebAppsClient) backupCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -609,9 +611,9 @@ func (client *WebAppsClient) backupHandleResponse(resp *http.Response) (WebAppsC return result, nil } -// BackupSlot - Creates a backup of an app. +// BackupSlot - Description for Creates a backup of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -656,7 +658,7 @@ func (client *WebAppsClient) backupSlotCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -671,9 +673,9 @@ func (client *WebAppsClient) backupSlotHandleResponse(resp *http.Response) (WebA return result, nil } -// CreateDeployment - Create a deployment for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // id - ID of an existing deployment. @@ -719,7 +721,7 @@ func (client *WebAppsClient) createDeploymentCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, deployment) @@ -734,9 +736,9 @@ func (client *WebAppsClient) createDeploymentHandleResponse(resp *http.Response) return result, nil } -// CreateDeploymentSlot - Create a deployment for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // id - ID of an existing deployment. @@ -787,7 +789,7 @@ func (client *WebAppsClient) createDeploymentSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, deployment) @@ -802,9 +804,9 @@ func (client *WebAppsClient) createDeploymentSlotHandleResponse(resp *http.Respo return result, nil } -// BeginCreateFunction - Create function for web site, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - Function name. @@ -823,9 +825,9 @@ func (client *WebAppsClient) BeginCreateFunction(ctx context.Context, resourceGr } } -// CreateFunction - Create function for web site, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) createFunction(ctx context.Context, resourceGroupName string, name string, functionName string, functionEnvelope FunctionEnvelope, options *WebAppsClientBeginCreateFunctionOptions) (*http.Response, error) { req, err := client.createFunctionCreateRequest(ctx, resourceGroupName, name, functionName, functionEnvelope, options) if err != nil { @@ -865,15 +867,15 @@ func (client *WebAppsClient) createFunctionCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, functionEnvelope) } -// BeginCreateInstanceFunctionSlot - Create function for web site, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - Function name. @@ -893,9 +895,9 @@ func (client *WebAppsClient) BeginCreateInstanceFunctionSlot(ctx context.Context } } -// CreateInstanceFunctionSlot - Create function for web site, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) createInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, functionEnvelope FunctionEnvelope, options *WebAppsClientBeginCreateInstanceFunctionSlotOptions) (*http.Response, error) { req, err := client.createInstanceFunctionSlotCreateRequest(ctx, resourceGroupName, name, functionName, slot, functionEnvelope, options) if err != nil { @@ -939,15 +941,15 @@ func (client *WebAppsClient) createInstanceFunctionSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, functionEnvelope) } -// BeginCreateInstanceMSDeployOperation - Invoke the MSDeploy web app extension. +// BeginCreateInstanceMSDeployOperation - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // instanceID - ID of web app instance. @@ -966,9 +968,9 @@ func (client *WebAppsClient) BeginCreateInstanceMSDeployOperation(ctx context.Co } } -// CreateInstanceMSDeployOperation - Invoke the MSDeploy web app extension. +// CreateInstanceMSDeployOperation - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) createInstanceMSDeployOperation(ctx context.Context, resourceGroupName string, name string, instanceID string, msDeploy MSDeploy, options *WebAppsClientBeginCreateInstanceMSDeployOperationOptions) (*http.Response, error) { req, err := client.createInstanceMSDeployOperationCreateRequest(ctx, resourceGroupName, name, instanceID, msDeploy, options) if err != nil { @@ -1008,15 +1010,15 @@ func (client *WebAppsClient) createInstanceMSDeployOperationCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, msDeploy) } -// BeginCreateInstanceMSDeployOperationSlot - Invoke the MSDeploy web app extension. +// BeginCreateInstanceMSDeployOperationSlot - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -1036,9 +1038,9 @@ func (client *WebAppsClient) BeginCreateInstanceMSDeployOperationSlot(ctx contex } } -// CreateInstanceMSDeployOperationSlot - Invoke the MSDeploy web app extension. +// CreateInstanceMSDeployOperationSlot - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) createInstanceMSDeployOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, msDeploy MSDeploy, options *WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions) (*http.Response, error) { req, err := client.createInstanceMSDeployOperationSlotCreateRequest(ctx, resourceGroupName, name, slot, instanceID, msDeploy, options) if err != nil { @@ -1082,15 +1084,15 @@ func (client *WebAppsClient) createInstanceMSDeployOperationSlotCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, msDeploy) } -// BeginCreateMSDeployOperation - Invoke the MSDeploy web app extension. +// BeginCreateMSDeployOperation - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // msDeploy - Details of MSDeploy operation @@ -1108,9 +1110,9 @@ func (client *WebAppsClient) BeginCreateMSDeployOperation(ctx context.Context, r } } -// CreateMSDeployOperation - Invoke the MSDeploy web app extension. +// CreateMSDeployOperation - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) createMSDeployOperation(ctx context.Context, resourceGroupName string, name string, msDeploy MSDeploy, options *WebAppsClientBeginCreateMSDeployOperationOptions) (*http.Response, error) { req, err := client.createMSDeployOperationCreateRequest(ctx, resourceGroupName, name, msDeploy, options) if err != nil { @@ -1146,15 +1148,15 @@ func (client *WebAppsClient) createMSDeployOperationCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, msDeploy) } -// BeginCreateMSDeployOperationSlot - Invoke the MSDeploy web app extension. +// BeginCreateMSDeployOperationSlot - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -1173,9 +1175,9 @@ func (client *WebAppsClient) BeginCreateMSDeployOperationSlot(ctx context.Contex } } -// CreateMSDeployOperationSlot - Invoke the MSDeploy web app extension. +// CreateMSDeployOperationSlot - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) createMSDeployOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, msDeploy MSDeploy, options *WebAppsClientBeginCreateMSDeployOperationSlotOptions) (*http.Response, error) { req, err := client.createMSDeployOperationSlotCreateRequest(ctx, resourceGroupName, name, slot, msDeploy, options) if err != nil { @@ -1215,15 +1217,15 @@ func (client *WebAppsClient) createMSDeployOperationSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, msDeploy) } -// CreateOneDeployOperation - Invoke the OneDeploy publish web app extension. +// CreateOneDeployOperation - Description for Invoke the OneDeploy publish web app extension. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -1263,7 +1265,7 @@ func (client *WebAppsClient) createOneDeployOperationCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1278,9 +1280,10 @@ func (client *WebAppsClient) createOneDeployOperationHandleResponse(resp *http.R return result, nil } -// BeginCreateOrUpdate - Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. +// BeginCreateOrUpdate - 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -1298,9 +1301,10 @@ func (client *WebAppsClient) BeginCreateOrUpdate(ctx context.Context, resourceGr } } -// CreateOrUpdate - Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. +// CreateOrUpdate - 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 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, options *WebAppsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, siteEnvelope, options) if err != nil { @@ -1336,15 +1340,15 @@ func (client *WebAppsClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteEnvelope) } -// CreateOrUpdateConfiguration - Updates the configuration of an app. +// CreateOrUpdateConfiguration - Description for Updates the configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -1385,7 +1389,7 @@ func (client *WebAppsClient) createOrUpdateConfigurationCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteConfig) @@ -1400,9 +1404,9 @@ func (client *WebAppsClient) createOrUpdateConfigurationHandleResponse(resp *htt return result, nil } -// CreateOrUpdateConfigurationSlot - Updates the configuration of an app. +// CreateOrUpdateConfigurationSlot - Description for Updates the configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -1448,7 +1452,7 @@ func (client *WebAppsClient) createOrUpdateConfigurationSlotCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteConfig) @@ -1463,10 +1467,10 @@ func (client *WebAppsClient) createOrUpdateConfigurationSlotHandleResponse(resp return result, nil } -// CreateOrUpdateDomainOwnershipIdentifier - Creates a domain ownership identifier for web app, or updates an existing ownership -// identifier. +// CreateOrUpdateDomainOwnershipIdentifier - Description for Creates a domain ownership identifier for web app, or updates +// an existing ownership identifier. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // domainOwnershipIdentifierName - Name of domain ownership identifier. @@ -1512,7 +1516,7 @@ func (client *WebAppsClient) createOrUpdateDomainOwnershipIdentifierCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) @@ -1527,10 +1531,10 @@ func (client *WebAppsClient) createOrUpdateDomainOwnershipIdentifierHandleRespon return result, nil } -// CreateOrUpdateDomainOwnershipIdentifierSlot - Creates a domain ownership identifier for web app, or updates an existing -// ownership identifier. +// CreateOrUpdateDomainOwnershipIdentifierSlot - Description for Creates a domain ownership identifier for web app, or updates +// an existing ownership identifier. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // domainOwnershipIdentifierName - Name of domain ownership identifier. @@ -1581,7 +1585,7 @@ func (client *WebAppsClient) createOrUpdateDomainOwnershipIdentifierSlotCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) @@ -1596,9 +1600,9 @@ func (client *WebAppsClient) createOrUpdateDomainOwnershipIdentifierSlotHandleRe return result, nil } -// CreateOrUpdateFunctionSecret - Add or update a function secret. +// CreateOrUpdateFunctionSecret - Description for Add or update a function secret. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - The name of the function. @@ -1649,7 +1653,7 @@ func (client *WebAppsClient) createOrUpdateFunctionSecretCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, key) @@ -1664,9 +1668,9 @@ func (client *WebAppsClient) createOrUpdateFunctionSecretHandleResponse(resp *ht return result, nil } -// CreateOrUpdateFunctionSecretSlot - Add or update a function secret. +// CreateOrUpdateFunctionSecretSlot - Description for Add or update a function secret. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - The name of the function. @@ -1722,7 +1726,7 @@ func (client *WebAppsClient) createOrUpdateFunctionSecretSlotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, key) @@ -1737,9 +1741,9 @@ func (client *WebAppsClient) createOrUpdateFunctionSecretSlotHandleResponse(resp return result, nil } -// CreateOrUpdateHostNameBinding - Creates a hostname binding for an app. +// CreateOrUpdateHostNameBinding - Description for Creates a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // hostName - Hostname in the hostname binding. @@ -1785,7 +1789,7 @@ func (client *WebAppsClient) createOrUpdateHostNameBindingCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, hostNameBinding) @@ -1800,9 +1804,9 @@ func (client *WebAppsClient) createOrUpdateHostNameBindingHandleResponse(resp *h return result, nil } -// CreateOrUpdateHostNameBindingSlot - Creates a hostname binding for an app. +// CreateOrUpdateHostNameBindingSlot - Description for Creates a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // hostName - Hostname in the hostname binding. @@ -1853,7 +1857,7 @@ func (client *WebAppsClient) createOrUpdateHostNameBindingSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, hostNameBinding) @@ -1868,9 +1872,9 @@ func (client *WebAppsClient) createOrUpdateHostNameBindingSlotHandleResponse(res return result, nil } -// CreateOrUpdateHostSecret - Add or update a host level secret. +// CreateOrUpdateHostSecret - Description for Add or update a host level secret. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // keyType - The type of host key. @@ -1921,7 +1925,7 @@ func (client *WebAppsClient) createOrUpdateHostSecretCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, key) @@ -1936,9 +1940,9 @@ func (client *WebAppsClient) createOrUpdateHostSecretHandleResponse(resp *http.R return result, nil } -// CreateOrUpdateHostSecretSlot - Add or update a host level secret. +// CreateOrUpdateHostSecretSlot - Description for Add or update a host level secret. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // keyType - The type of host key. @@ -1994,7 +1998,7 @@ func (client *WebAppsClient) createOrUpdateHostSecretSlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, key) @@ -2009,9 +2013,9 @@ func (client *WebAppsClient) createOrUpdateHostSecretSlotHandleResponse(resp *ht return result, nil } -// CreateOrUpdateHybridConnection - Creates a new Hybrid Connection using a Service Bus relay. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -2062,7 +2066,7 @@ func (client *WebAppsClient) createOrUpdateHybridConnectionCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -2077,9 +2081,9 @@ func (client *WebAppsClient) createOrUpdateHybridConnectionHandleResponse(resp * return result, nil } -// CreateOrUpdateHybridConnectionSlot - Creates a new Hybrid Connection using a Service Bus relay. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -2135,7 +2139,7 @@ func (client *WebAppsClient) createOrUpdateHybridConnectionSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -2150,9 +2154,9 @@ func (client *WebAppsClient) createOrUpdateHybridConnectionSlotHandleResponse(re return result, nil } -// CreateOrUpdatePublicCertificate - Creates a hostname binding for an app. +// CreateOrUpdatePublicCertificate - Description for Creates a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // publicCertificateName - Public certificate name. @@ -2198,7 +2202,7 @@ func (client *WebAppsClient) createOrUpdatePublicCertificateCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, publicCertificate) @@ -2213,9 +2217,9 @@ func (client *WebAppsClient) createOrUpdatePublicCertificateHandleResponse(resp return result, nil } -// CreateOrUpdatePublicCertificateSlot - Creates a hostname binding for an app. +// CreateOrUpdatePublicCertificateSlot - Description for Creates a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // publicCertificateName - Public certificate name. @@ -2266,7 +2270,7 @@ func (client *WebAppsClient) createOrUpdatePublicCertificateSlotCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, publicCertificate) @@ -2281,10 +2285,10 @@ func (client *WebAppsClient) createOrUpdatePublicCertificateSlotHandleResponse(r return result, nil } -// CreateOrUpdateRelayServiceConnection - Creates a new hybrid connection configuration (PUT), or updates an existing one -// (PATCH). +// CreateOrUpdateRelayServiceConnection - Description for Creates a new hybrid connection configuration (PUT), or updates +// an existing one (PATCH). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // entityName - Name of the hybrid connection configuration. @@ -2330,7 +2334,7 @@ func (client *WebAppsClient) createOrUpdateRelayServiceConnectionCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -2345,10 +2349,10 @@ func (client *WebAppsClient) createOrUpdateRelayServiceConnectionHandleResponse( return result, nil } -// CreateOrUpdateRelayServiceConnectionSlot - Creates a new hybrid connection configuration (PUT), or updates an existing -// one (PATCH). +// CreateOrUpdateRelayServiceConnectionSlot - Description for Creates a new hybrid connection configuration (PUT), or updates +// an existing one (PATCH). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // entityName - Name of the hybrid connection configuration. @@ -2400,7 +2404,7 @@ func (client *WebAppsClient) createOrUpdateRelayServiceConnectionSlotCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -2415,9 +2419,10 @@ func (client *WebAppsClient) createOrUpdateRelayServiceConnectionSlotHandleRespo return result, nil } -// BeginCreateOrUpdateSlot - Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. +// BeginCreateOrUpdateSlot - 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -2437,9 +2442,10 @@ func (client *WebAppsClient) BeginCreateOrUpdateSlot(ctx context.Context, resour } } -// CreateOrUpdateSlot - Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. +// CreateOrUpdateSlot - 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 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) createOrUpdateSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteEnvelope Site, options *WebAppsClientBeginCreateOrUpdateSlotOptions) (*http.Response, error) { req, err := client.createOrUpdateSlotCreateRequest(ctx, resourceGroupName, name, slot, siteEnvelope, options) if err != nil { @@ -2479,15 +2485,15 @@ func (client *WebAppsClient) createOrUpdateSlotCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteEnvelope) } -// BeginCreateOrUpdateSourceControl - Updates the source control configuration of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -2505,9 +2511,9 @@ func (client *WebAppsClient) BeginCreateOrUpdateSourceControl(ctx context.Contex } } -// CreateOrUpdateSourceControl - Updates the source control configuration of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) createOrUpdateSourceControl(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, options *WebAppsClientBeginCreateOrUpdateSourceControlOptions) (*http.Response, error) { req, err := client.createOrUpdateSourceControlCreateRequest(ctx, resourceGroupName, name, siteSourceControl, options) if err != nil { @@ -2543,15 +2549,15 @@ func (client *WebAppsClient) createOrUpdateSourceControlCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteSourceControl) } -// BeginCreateOrUpdateSourceControlSlot - Updates the source control configuration of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -2571,9 +2577,9 @@ func (client *WebAppsClient) BeginCreateOrUpdateSourceControlSlot(ctx context.Co } } -// CreateOrUpdateSourceControlSlot - Updates the source control configuration of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) createOrUpdateSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteSourceControl SiteSourceControl, options *WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions) (*http.Response, error) { req, err := client.createOrUpdateSourceControlSlotCreateRequest(ctx, resourceGroupName, name, slot, siteSourceControl, options) if err != nil { @@ -2613,18 +2619,18 @@ func (client *WebAppsClient) createOrUpdateSourceControlSlotCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteSourceControl) } -// CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck - Integrates this Web App with a Virtual Network. This requires that -// 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, -// and is -// not in use by another App Service Plan other than the one this App is in. +// CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck - Description for Integrates this Web App with a Virtual Network. +// This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has +// already been +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -2665,7 +2671,7 @@ func (client *WebAppsClient) createOrUpdateSwiftVirtualNetworkConnectionWithChec return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -2680,12 +2686,12 @@ func (client *WebAppsClient) createOrUpdateSwiftVirtualNetworkConnectionWithChec return result, nil } -// CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot - Integrates this Web App with a Virtual Network. This requires -// that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been -// delegated, and is -// not in use by another App Service Plan other than the one this App is in. +// CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot - Description for Integrates this Web App with a Virtual Network. +// This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has +// already been +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -2732,7 +2738,7 @@ func (client *WebAppsClient) createOrUpdateSwiftVirtualNetworkConnectionWithChec return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -2747,10 +2753,10 @@ func (client *WebAppsClient) createOrUpdateSwiftVirtualNetworkConnectionWithChec return result, nil } -// CreateOrUpdateVnetConnection - Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties -// (PATCH). +// CreateOrUpdateVnetConnection - Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the +// connection properties (PATCH). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of an existing Virtual Network. @@ -2796,7 +2802,7 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -2811,9 +2817,10 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionHandleResponse(resp *ht return result, nil } -// CreateOrUpdateVnetConnectionGateway - Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). +// CreateOrUpdateVnetConnectionGateway - 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of the Virtual Network. @@ -2864,7 +2871,7 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionGatewayCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -2879,9 +2886,10 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionGatewayHandleResponse(r return result, nil } -// CreateOrUpdateVnetConnectionGatewaySlot - Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). +// CreateOrUpdateVnetConnectionGatewaySlot - 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of the Virtual Network. @@ -2938,7 +2946,7 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionGatewaySlotCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -2953,10 +2961,10 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionGatewaySlotHandleRespon return result, nil } -// CreateOrUpdateVnetConnectionSlot - Adds a Virtual Network connection to an app or slot (PUT) or updates the connection -// properties (PATCH). +// CreateOrUpdateVnetConnectionSlot - Description for Adds a Virtual Network connection to an app or slot (PUT) or updates +// the connection properties (PATCH). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of an existing Virtual Network. @@ -3008,7 +3016,7 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionSlotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -3023,9 +3031,9 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionSlotHandleResponse(resp return result, nil } -// Delete - Deletes a web, mobile, or API app, or one of the deployment slots. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -3070,15 +3078,15 @@ 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", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteBackup - Deletes a backup of an app by its ID. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // backupID - ID of the backup. @@ -3122,15 +3130,15 @@ func (client *WebAppsClient) deleteBackupCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteBackupConfiguration - Deletes the backup configuration of an app. +// DeleteBackupConfiguration - Description for Deletes the backup configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -3170,15 +3178,15 @@ func (client *WebAppsClient) deleteBackupConfigurationCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteBackupConfigurationSlot - Deletes the backup configuration of an app. +// DeleteBackupConfigurationSlot - Description for Deletes the backup configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -3224,15 +3232,15 @@ func (client *WebAppsClient) deleteBackupConfigurationSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteBackupSlot - Deletes a backup of an app by its ID. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // backupID - ID of the backup. @@ -3282,15 +3290,15 @@ func (client *WebAppsClient) deleteBackupSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteContinuousWebJob - Delete a continuous web job by its ID for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -3335,15 +3343,15 @@ func (client *WebAppsClient) deleteContinuousWebJobCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteContinuousWebJobSlot - Delete a continuous web job by its ID for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -3393,15 +3401,15 @@ func (client *WebAppsClient) deleteContinuousWebJobSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteDeployment - Delete a deployment by its ID for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // id - Deployment ID. @@ -3446,15 +3454,15 @@ func (client *WebAppsClient) deleteDeploymentCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteDeploymentSlot - Delete a deployment by its ID for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // id - Deployment ID. @@ -3504,15 +3512,15 @@ func (client *WebAppsClient) deleteDeploymentSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteDomainOwnershipIdentifier - Deletes a domain ownership identifier for a web app. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // domainOwnershipIdentifierName - Name of domain ownership identifier. @@ -3557,15 +3565,15 @@ func (client *WebAppsClient) deleteDomainOwnershipIdentifierCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteDomainOwnershipIdentifierSlot - Deletes a domain ownership identifier for a web app. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // domainOwnershipIdentifierName - Name of domain ownership identifier. @@ -3615,15 +3623,15 @@ func (client *WebAppsClient) deleteDomainOwnershipIdentifierSlotCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteFunction - Delete a function for web site, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - Function name. @@ -3667,15 +3675,15 @@ func (client *WebAppsClient) deleteFunctionCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteFunctionSecret - Delete a function secret. +// DeleteFunctionSecret - Description for Delete a function secret. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - The name of the function. @@ -3725,15 +3733,15 @@ func (client *WebAppsClient) deleteFunctionSecretCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteFunctionSecretSlot - Delete a function secret. +// DeleteFunctionSecretSlot - Description for Delete a function secret. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - The name of the function. @@ -3788,15 +3796,15 @@ func (client *WebAppsClient) deleteFunctionSecretSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteHostNameBinding - Deletes a hostname binding for an app. +// DeleteHostNameBinding - Description for Deletes a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // hostName - Hostname in the hostname binding. @@ -3841,15 +3849,15 @@ func (client *WebAppsClient) deleteHostNameBindingCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteHostNameBindingSlot - Deletes a hostname binding for an app. +// DeleteHostNameBindingSlot - Description for Deletes a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -3899,15 +3907,15 @@ func (client *WebAppsClient) deleteHostNameBindingSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteHostSecret - Delete a host level secret. +// DeleteHostSecret - Description for Delete a host level secret. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // keyType - The type of host key. @@ -3957,15 +3965,15 @@ func (client *WebAppsClient) deleteHostSecretCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteHostSecretSlot - Delete a host level secret. +// DeleteHostSecretSlot - Description for Delete a host level secret. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // keyType - The type of host key. @@ -4020,15 +4028,15 @@ func (client *WebAppsClient) deleteHostSecretSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteHybridConnection - Removes a Hybrid Connection from this site. +// DeleteHybridConnection - Description for Removes a Hybrid Connection from this site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -4078,15 +4086,15 @@ func (client *WebAppsClient) deleteHybridConnectionCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteHybridConnectionSlot - Removes a Hybrid Connection from this site. +// DeleteHybridConnectionSlot - Description for Removes a Hybrid Connection from this site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -4141,15 +4149,15 @@ func (client *WebAppsClient) deleteHybridConnectionSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteInstanceFunctionSlot - Delete a function for web site, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - Function name. @@ -4199,16 +4207,16 @@ func (client *WebAppsClient) deleteInstanceFunctionSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteInstanceProcess - Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance -// in a web site. +// DeleteInstanceProcess - Description for Terminate a process by its ID for a web site, or a deployment slot, or specific +// scaled-out instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -4259,16 +4267,16 @@ func (client *WebAppsClient) deleteInstanceProcessCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteInstanceProcessSlot - Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out -// instance in a web site. +// DeleteInstanceProcessSlot - Description for Terminate a process by its ID for a web site, or a deployment slot, or specific +// scaled-out instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -4324,15 +4332,15 @@ func (client *WebAppsClient) deleteInstanceProcessSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeletePremierAddOn - Delete a premier add-on from an app. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // premierAddOnName - Add-on name. @@ -4377,15 +4385,15 @@ func (client *WebAppsClient) deletePremierAddOnCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeletePremierAddOnSlot - Delete a premier add-on from an app. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // premierAddOnName - Add-on name. @@ -4436,15 +4444,15 @@ func (client *WebAppsClient) deletePremierAddOnSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginDeletePrivateEndpointConnection - Deletes a private endpoint connection +// BeginDeletePrivateEndpointConnection - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -4461,9 +4469,9 @@ func (client *WebAppsClient) BeginDeletePrivateEndpointConnection(ctx context.Co } } -// DeletePrivateEndpointConnection - Deletes a private endpoint connection +// DeletePrivateEndpointConnection - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) deletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *WebAppsClientBeginDeletePrivateEndpointConnectionOptions) (*http.Response, error) { req, err := client.deletePrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) if err != nil { @@ -4503,15 +4511,15 @@ func (client *WebAppsClient) deletePrivateEndpointConnectionCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginDeletePrivateEndpointConnectionSlot - Deletes a private endpoint connection +// BeginDeletePrivateEndpointConnectionSlot - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -4528,9 +4536,9 @@ func (client *WebAppsClient) BeginDeletePrivateEndpointConnectionSlot(ctx contex } } -// DeletePrivateEndpointConnectionSlot - Deletes a private endpoint connection +// DeletePrivateEndpointConnectionSlot - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) deletePrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, options *WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions) (*http.Response, error) { req, err := client.deletePrivateEndpointConnectionSlotCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, slot, options) if err != nil { @@ -4574,16 +4582,16 @@ func (client *WebAppsClient) deletePrivateEndpointConnectionSlotCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteProcess - Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in -// a web site. +// DeleteProcess - Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out +// instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -4627,16 +4635,16 @@ func (client *WebAppsClient) deleteProcessCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteProcessSlot - Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance -// in a web site. +// DeleteProcessSlot - Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out +// instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -4686,15 +4694,15 @@ func (client *WebAppsClient) deleteProcessSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeletePublicCertificate - Deletes a hostname binding for an app. +// DeletePublicCertificate - Description for Deletes a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // publicCertificateName - Public certificate name. @@ -4739,15 +4747,15 @@ func (client *WebAppsClient) deletePublicCertificateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeletePublicCertificateSlot - Deletes a hostname binding for an app. +// DeletePublicCertificateSlot - Description for Deletes a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -4797,15 +4805,15 @@ func (client *WebAppsClient) deletePublicCertificateSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteRelayServiceConnection - Deletes a relay service connection by its name. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // entityName - Name of the hybrid connection configuration. @@ -4850,15 +4858,15 @@ func (client *WebAppsClient) deleteRelayServiceConnectionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteRelayServiceConnectionSlot - Deletes a relay service connection by its name. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // entityName - Name of the hybrid connection configuration. @@ -4909,15 +4917,15 @@ func (client *WebAppsClient) deleteRelayServiceConnectionSlotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteSiteExtension - Remove a site extension from a web site, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // siteExtensionID - Site extension name. @@ -4962,15 +4970,15 @@ func (client *WebAppsClient) deleteSiteExtensionCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteSiteExtensionSlot - Remove a site extension from a web site, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // siteExtensionID - Site extension name. @@ -5020,15 +5028,15 @@ func (client *WebAppsClient) deleteSiteExtensionSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteSlot - Deletes a web, mobile, or API app, or one of the deployment slots. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -5078,15 +5086,15 @@ 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", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteSourceControl - Deletes the source control configuration of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -5129,15 +5137,15 @@ func (client *WebAppsClient) deleteSourceControlCreateRequest(ctx context.Contex if options != nil && options.AdditionalFlags != nil { reqQP.Set("additionalFlags", *options.AdditionalFlags) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteSourceControlSlot - Deletes the source control configuration of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -5186,15 +5194,15 @@ func (client *WebAppsClient) deleteSourceControlSlotCreateRequest(ctx context.Co if options != nil && options.AdditionalFlags != nil { reqQP.Set("additionalFlags", *options.AdditionalFlags) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteSwiftVirtualNetwork - Deletes a Swift Virtual Network connection from an app (or deployment slot). +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -5234,15 +5242,15 @@ func (client *WebAppsClient) deleteSwiftVirtualNetworkCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteSwiftVirtualNetworkSlot - Deletes a Swift Virtual Network connection from an app (or deployment slot). +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -5287,15 +5295,15 @@ func (client *WebAppsClient) deleteSwiftVirtualNetworkSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteTriggeredWebJob - Delete a triggered web job by its ID for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -5340,15 +5348,15 @@ func (client *WebAppsClient) deleteTriggeredWebJobCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteTriggeredWebJobSlot - Delete a triggered web job by its ID for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -5398,15 +5406,15 @@ func (client *WebAppsClient) deleteTriggeredWebJobSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteVnetConnection - Deletes a connection from an app (or deployment slot to a named virtual network. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of the virtual network. @@ -5451,15 +5459,15 @@ func (client *WebAppsClient) deleteVnetConnectionCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DeleteVnetConnectionSlot - Deletes a connection from an app (or deployment slot to a named virtual network. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of the virtual network. @@ -5509,16 +5517,16 @@ func (client *WebAppsClient) deleteVnetConnectionSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// DiscoverBackup - Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information -// about the databases stored in a backup. +// DiscoverBackup - Description for Discovers an existing app backup that can be restored from a blob in Azure storage. 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -5558,7 +5566,7 @@ func (client *WebAppsClient) discoverBackupCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -5573,10 +5581,10 @@ func (client *WebAppsClient) discoverBackupHandleResponse(resp *http.Response) ( return result, nil } -// DiscoverBackupSlot - Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get -// information about the databases stored in a backup. +// DiscoverBackupSlot - Description for Discovers an existing app backup that can be restored from a blob in Azure storage. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -5622,7 +5630,7 @@ func (client *WebAppsClient) discoverBackupSlotCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -5637,9 +5645,10 @@ func (client *WebAppsClient) discoverBackupSlotHandleResponse(resp *http.Respons return result, nil } -// GenerateNewSitePublishingPassword - Generates a new publishing password for an app (or deployment slot, if specified). +// GenerateNewSitePublishingPassword - Description for Generates a new publishing password for an app (or deployment slot, +// if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -5679,15 +5688,16 @@ func (client *WebAppsClient) generateNewSitePublishingPasswordCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// GenerateNewSitePublishingPasswordSlot - Generates a new publishing password for an app (or deployment slot, if specified). +// GenerateNewSitePublishingPasswordSlot - Description for Generates a new publishing password for an app (or deployment slot, +// if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -5733,15 +5743,15 @@ func (client *WebAppsClient) generateNewSitePublishingPasswordSlotCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// Get - Gets the details of a web, mobile, or API app. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -5780,7 +5790,7 @@ func (client *WebAppsClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5795,9 +5805,9 @@ func (client *WebAppsClient) getHandleResponse(resp *http.Response) (WebAppsClie return result, nil } -// GetAppSettingKeyVaultReference - Gets the config reference and status of an app +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // appSettingKey - App Setting key name. @@ -5842,7 +5852,7 @@ func (client *WebAppsClient) getAppSettingKeyVaultReferenceCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5857,9 +5867,9 @@ func (client *WebAppsClient) getAppSettingKeyVaultReferenceHandleResponse(resp * return result, nil } -// GetAppSettingKeyVaultReferenceSlot - Gets the config reference and status of an app +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // appSettingKey - App Setting key name. @@ -5908,7 +5918,7 @@ func (client *WebAppsClient) getAppSettingKeyVaultReferenceSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5923,9 +5933,9 @@ func (client *WebAppsClient) getAppSettingKeyVaultReferenceSlotHandleResponse(re return result, nil } -// NewGetAppSettingsKeyVaultReferencesPager - Gets the config reference app settings and status of an app +// NewGetAppSettingsKeyVaultReferencesPager - Description for Gets the config reference app settings and status of an app // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.GetAppSettingsKeyVaultReferences @@ -5978,7 +5988,7 @@ func (client *WebAppsClient) getAppSettingsKeyVaultReferencesCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5993,9 +6003,10 @@ func (client *WebAppsClient) getAppSettingsKeyVaultReferencesHandleResponse(resp return result, nil } -// NewGetAppSettingsKeyVaultReferencesSlotPager - Gets the config reference app settings and status of an app +// NewGetAppSettingsKeyVaultReferencesSlotPager - Description for Gets the config reference app settings and status of an +// app // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.GetAppSettingsKeyVaultReferencesSlot @@ -6052,7 +6063,7 @@ func (client *WebAppsClient) getAppSettingsKeyVaultReferencesSlotCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6067,9 +6078,9 @@ func (client *WebAppsClient) getAppSettingsKeyVaultReferencesSlotHandleResponse( return result, nil } -// GetAuthSettings - Gets the Authentication/Authorization settings of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -6108,7 +6119,7 @@ func (client *WebAppsClient) getAuthSettingsCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6123,9 +6134,9 @@ func (client *WebAppsClient) getAuthSettingsHandleResponse(resp *http.Response) return result, nil } -// GetAuthSettingsSlot - Gets the Authentication/Authorization settings of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -6170,7 +6181,7 @@ func (client *WebAppsClient) getAuthSettingsSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6185,9 +6196,9 @@ func (client *WebAppsClient) getAuthSettingsSlotHandleResponse(resp *http.Respon return result, nil } -// GetAuthSettingsV2 - Gets site's Authentication / Authorization settings for apps via the V2 format +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -6227,7 +6238,7 @@ func (client *WebAppsClient) getAuthSettingsV2CreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6242,9 +6253,9 @@ func (client *WebAppsClient) getAuthSettingsV2HandleResponse(resp *http.Response return result, nil } -// GetAuthSettingsV2Slot - Gets site's Authentication / Authorization settings for apps via the V2 format +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -6289,7 +6300,7 @@ func (client *WebAppsClient) getAuthSettingsV2SlotCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6304,9 +6315,10 @@ func (client *WebAppsClient) getAuthSettingsV2SlotHandleResponse(resp *http.Resp return result, nil } -// GetAuthSettingsV2WithoutSecrets - Gets site's Authentication / Authorization settings for apps via the V2 format +// GetAuthSettingsV2WithoutSecrets - 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -6346,7 +6358,7 @@ func (client *WebAppsClient) getAuthSettingsV2WithoutSecretsCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6363,7 +6375,7 @@ 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -6408,7 +6420,7 @@ func (client *WebAppsClient) getAuthSettingsV2WithoutSecretsSlotCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6423,9 +6435,9 @@ func (client *WebAppsClient) getAuthSettingsV2WithoutSecretsSlotHandleResponse(r return result, nil } -// GetBackupConfiguration - Gets the backup configuration of an app. +// GetBackupConfiguration - Description for Gets the backup configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -6465,7 +6477,7 @@ func (client *WebAppsClient) getBackupConfigurationCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6480,9 +6492,9 @@ func (client *WebAppsClient) getBackupConfigurationHandleResponse(resp *http.Res return result, nil } -// GetBackupConfigurationSlot - Gets the backup configuration of an app. +// GetBackupConfigurationSlot - Description for Gets the backup configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -6528,7 +6540,7 @@ func (client *WebAppsClient) getBackupConfigurationSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6543,9 +6555,9 @@ func (client *WebAppsClient) getBackupConfigurationSlotHandleResponse(resp *http return result, nil } -// GetBackupStatus - Gets a backup of an app by its ID. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // backupID - ID of the backup. @@ -6589,7 +6601,7 @@ func (client *WebAppsClient) getBackupStatusCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6604,9 +6616,9 @@ func (client *WebAppsClient) getBackupStatusHandleResponse(resp *http.Response) return result, nil } -// GetBackupStatusSlot - Gets a backup of an app by its ID. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // backupID - ID of the backup. @@ -6656,7 +6668,7 @@ func (client *WebAppsClient) getBackupStatusSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6671,10 +6683,10 @@ func (client *WebAppsClient) getBackupStatusSlotHandleResponse(resp *http.Respon return result, nil } -// GetConfiguration - Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, -// Always On, etc. +// GetConfiguration - Description for Gets the configuration of an app, such as platform version and bitness, default documents, +// virtual applications, Always On, etc. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -6714,7 +6726,7 @@ func (client *WebAppsClient) getConfigurationCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6729,10 +6741,10 @@ func (client *WebAppsClient) getConfigurationHandleResponse(resp *http.Response) return result, nil } -// GetConfigurationSlot - Gets the configuration of an app, such as platform version and bitness, default documents, virtual -// applications, Always On, etc. +// GetConfigurationSlot - Description for Gets the configuration of an app, such as platform version and bitness, default +// documents, virtual applications, Always On, etc. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -6777,7 +6789,7 @@ func (client *WebAppsClient) getConfigurationSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6792,9 +6804,9 @@ func (client *WebAppsClient) getConfigurationSlotHandleResponse(resp *http.Respo return result, nil } -// GetConfigurationSnapshot - Gets a snapshot of the configuration of an app at a previous point in time. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -6839,7 +6851,7 @@ func (client *WebAppsClient) getConfigurationSnapshotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6854,9 +6866,9 @@ func (client *WebAppsClient) getConfigurationSnapshotHandleResponse(resp *http.R return result, nil } -// GetConfigurationSnapshotSlot - Gets a snapshot of the configuration of an app at a previous point in time. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -6906,7 +6918,7 @@ func (client *WebAppsClient) getConfigurationSnapshotSlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6921,9 +6933,9 @@ func (client *WebAppsClient) getConfigurationSnapshotSlotHandleResponse(resp *ht return result, nil } -// GetContainerLogsZip - Gets the ZIP archived docker log files for the given site +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -6963,16 +6975,16 @@ func (client *WebAppsClient) getContainerLogsZipCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/zip"} return req, nil } -// GetContainerLogsZipSlot - Gets the ZIP archived docker log files for the given site +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -7017,16 +7029,16 @@ func (client *WebAppsClient) getContainerLogsZipSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/zip"} return req, nil } -// GetContinuousWebJob - Gets a continuous web job by its ID for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -7071,7 +7083,7 @@ func (client *WebAppsClient) getContinuousWebJobCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7086,9 +7098,9 @@ func (client *WebAppsClient) getContinuousWebJobHandleResponse(resp *http.Respon return result, nil } -// GetContinuousWebJobSlot - Gets a continuous web job by its ID for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -7138,7 +7150,7 @@ func (client *WebAppsClient) getContinuousWebJobSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7153,9 +7165,9 @@ func (client *WebAppsClient) getContinuousWebJobSlotHandleResponse(resp *http.Re return result, nil } -// GetDeployment - Get a deployment by its ID for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // id - Deployment ID. @@ -7199,7 +7211,7 @@ func (client *WebAppsClient) getDeploymentCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7214,9 +7226,9 @@ func (client *WebAppsClient) getDeploymentHandleResponse(resp *http.Response) (W return result, nil } -// GetDeploymentSlot - Get a deployment by its ID for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // id - Deployment ID. @@ -7266,7 +7278,7 @@ func (client *WebAppsClient) getDeploymentSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7281,9 +7293,9 @@ func (client *WebAppsClient) getDeploymentSlotHandleResponse(resp *http.Response return result, nil } -// GetDiagnosticLogsConfiguration - Gets the logging configuration of an app. +// GetDiagnosticLogsConfiguration - Description for Gets the logging configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -7323,7 +7335,7 @@ func (client *WebAppsClient) getDiagnosticLogsConfigurationCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7338,9 +7350,9 @@ func (client *WebAppsClient) getDiagnosticLogsConfigurationHandleResponse(resp * return result, nil } -// GetDiagnosticLogsConfigurationSlot - Gets the logging configuration of an app. +// GetDiagnosticLogsConfigurationSlot - Description for Gets the logging configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -7386,7 +7398,7 @@ func (client *WebAppsClient) getDiagnosticLogsConfigurationSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7401,9 +7413,9 @@ func (client *WebAppsClient) getDiagnosticLogsConfigurationSlotHandleResponse(re return result, nil } -// GetDomainOwnershipIdentifier - Get domain ownership identifier for web app. +// GetDomainOwnershipIdentifier - Description for Get domain ownership identifier for web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // domainOwnershipIdentifierName - Name of domain ownership identifier. @@ -7448,7 +7460,7 @@ func (client *WebAppsClient) getDomainOwnershipIdentifierCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7463,9 +7475,9 @@ func (client *WebAppsClient) getDomainOwnershipIdentifierHandleResponse(resp *ht return result, nil } -// GetDomainOwnershipIdentifierSlot - Get domain ownership identifier for web app. +// GetDomainOwnershipIdentifierSlot - Description for Get domain ownership identifier for web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // domainOwnershipIdentifierName - Name of domain ownership identifier. @@ -7515,7 +7527,7 @@ func (client *WebAppsClient) getDomainOwnershipIdentifierSlotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7530,9 +7542,9 @@ func (client *WebAppsClient) getDomainOwnershipIdentifierSlotHandleResponse(resp return result, nil } -// GetFtpAllowed - Returns whether FTP is allowed on the site or not. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -7571,7 +7583,7 @@ func (client *WebAppsClient) getFtpAllowedCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7586,9 +7598,9 @@ func (client *WebAppsClient) getFtpAllowedHandleResponse(resp *http.Response) (W return result, nil } -// GetFtpAllowedSlot - Returns whether FTP is allowed on the site or not. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -7632,7 +7644,7 @@ func (client *WebAppsClient) getFtpAllowedSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7647,9 +7659,9 @@ func (client *WebAppsClient) getFtpAllowedSlotHandleResponse(resp *http.Response return result, nil } -// GetFunction - Get function information by its ID for web site, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - Function name. @@ -7693,7 +7705,7 @@ func (client *WebAppsClient) getFunctionCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7708,9 +7720,9 @@ func (client *WebAppsClient) getFunctionHandleResponse(resp *http.Response) (Web return result, nil } -// GetFunctionsAdminToken - Fetch a short lived token that can be exchanged for a master key. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -7750,7 +7762,7 @@ func (client *WebAppsClient) getFunctionsAdminTokenCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7765,9 +7777,9 @@ func (client *WebAppsClient) getFunctionsAdminTokenHandleResponse(resp *http.Res return result, nil } -// GetFunctionsAdminTokenSlot - Fetch a short lived token that can be exchanged for a master key. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -7812,7 +7824,7 @@ func (client *WebAppsClient) getFunctionsAdminTokenSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7827,9 +7839,9 @@ func (client *WebAppsClient) getFunctionsAdminTokenSlotHandleResponse(resp *http return result, nil } -// GetHostNameBinding - Get the named hostname binding for an app (or deployment slot, if specified). +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // hostName - Hostname in the hostname binding. @@ -7874,7 +7886,7 @@ func (client *WebAppsClient) getHostNameBindingCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7889,9 +7901,9 @@ func (client *WebAppsClient) getHostNameBindingHandleResponse(resp *http.Respons return result, nil } -// GetHostNameBindingSlot - Get the named hostname binding for an app (or deployment slot, if specified). +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -7941,7 +7953,7 @@ func (client *WebAppsClient) getHostNameBindingSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7956,9 +7968,9 @@ func (client *WebAppsClient) getHostNameBindingSlotHandleResponse(resp *http.Res return result, nil } -// GetHybridConnection - Retrieves a specific Service Bus Hybrid Connection used by this Web App. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -8008,7 +8020,7 @@ func (client *WebAppsClient) getHybridConnectionCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8023,9 +8035,9 @@ func (client *WebAppsClient) getHybridConnectionHandleResponse(resp *http.Respon return result, nil } -// GetHybridConnectionSlot - Retrieves a specific Service Bus Hybrid Connection used by this Web App. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -8080,7 +8092,7 @@ func (client *WebAppsClient) getHybridConnectionSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8095,9 +8107,9 @@ func (client *WebAppsClient) getHybridConnectionSlotHandleResponse(resp *http.Re return result, nil } -// GetInstanceFunctionSlot - Get function information by its ID for web site, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - Function name. @@ -8147,7 +8159,7 @@ func (client *WebAppsClient) getInstanceFunctionSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8162,9 +8174,9 @@ func (client *WebAppsClient) getInstanceFunctionSlotHandleResponse(resp *http.Re return result, nil } -// GetInstanceInfo - Gets all scale-out instances of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -8207,7 +8219,7 @@ func (client *WebAppsClient) getInstanceInfoCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8222,9 +8234,9 @@ func (client *WebAppsClient) getInstanceInfoHandleResponse(resp *http.Response) return result, nil } -// GetInstanceInfoSlot - Gets all scale-out instances of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -8273,7 +8285,7 @@ func (client *WebAppsClient) getInstanceInfoSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8288,9 +8300,9 @@ func (client *WebAppsClient) getInstanceInfoSlotHandleResponse(resp *http.Respon return result, nil } -// GetInstanceMSDeployLog - Get the MSDeploy Log for the last MSDeploy operation. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // instanceID - ID of web app instance. @@ -8335,7 +8347,7 @@ func (client *WebAppsClient) getInstanceMSDeployLogCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8350,9 +8362,9 @@ func (client *WebAppsClient) getInstanceMSDeployLogHandleResponse(resp *http.Res return result, nil } -// GetInstanceMSDeployLogSlot - Get the MSDeploy Log for the last MSDeploy operation. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -8402,7 +8414,7 @@ func (client *WebAppsClient) getInstanceMSDeployLogSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8417,9 +8429,9 @@ func (client *WebAppsClient) getInstanceMSDeployLogSlotHandleResponse(resp *http return result, nil } -// GetInstanceMsDeployStatus - Get the status of the last MSDeploy operation. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // instanceID - ID of web app instance. @@ -8464,7 +8476,7 @@ func (client *WebAppsClient) getInstanceMsDeployStatusCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8479,9 +8491,9 @@ func (client *WebAppsClient) getInstanceMsDeployStatusHandleResponse(resp *http. return result, nil } -// GetInstanceMsDeployStatusSlot - Get the status of the last MSDeploy operation. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -8531,7 +8543,7 @@ func (client *WebAppsClient) getInstanceMsDeployStatusSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8546,9 +8558,9 @@ func (client *WebAppsClient) getInstanceMsDeployStatusSlotHandleResponse(resp *h return result, nil } -// GetInstanceProcess - Get process information by its ID for a specific scaled-out instance in a web site. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -8599,7 +8611,7 @@ func (client *WebAppsClient) getInstanceProcessCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8614,9 +8626,10 @@ func (client *WebAppsClient) getInstanceProcessHandleResponse(resp *http.Respons return result, nil } -// GetInstanceProcessDump - Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. +// GetInstanceProcessDump - 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -8667,16 +8680,17 @@ func (client *WebAppsClient) getInstanceProcessDumpCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// GetInstanceProcessDumpSlot - Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. +// GetInstanceProcessDumpSlot - 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -8732,16 +8746,17 @@ func (client *WebAppsClient) getInstanceProcessDumpSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// GetInstanceProcessModule - Get process information by its ID for a specific scaled-out instance in a web site. +// GetInstanceProcessModule - 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -8797,7 +8812,7 @@ func (client *WebAppsClient) getInstanceProcessModuleCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8812,9 +8827,10 @@ func (client *WebAppsClient) getInstanceProcessModuleHandleResponse(resp *http.R return result, nil } -// GetInstanceProcessModuleSlot - Get process information by its ID for a specific scaled-out instance in a web site. +// GetInstanceProcessModuleSlot - 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -8875,7 +8891,7 @@ func (client *WebAppsClient) getInstanceProcessModuleSlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8890,9 +8906,10 @@ func (client *WebAppsClient) getInstanceProcessModuleSlotHandleResponse(resp *ht return result, nil } -// GetInstanceProcessSlot - Get process information by its ID for a specific scaled-out instance in a web site. +// GetInstanceProcessSlot - 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -8948,7 +8965,7 @@ func (client *WebAppsClient) getInstanceProcessSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8963,9 +8980,9 @@ func (client *WebAppsClient) getInstanceProcessSlotHandleResponse(resp *http.Res return result, nil } -// GetMSDeployLog - Get the MSDeploy Log for the last MSDeploy operation. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -9004,7 +9021,7 @@ func (client *WebAppsClient) getMSDeployLogCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9019,9 +9036,9 @@ func (client *WebAppsClient) getMSDeployLogHandleResponse(resp *http.Response) ( return result, nil } -// GetMSDeployLogSlot - Get the MSDeploy Log for the last MSDeploy operation. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -9066,7 +9083,7 @@ func (client *WebAppsClient) getMSDeployLogSlotCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9081,9 +9098,9 @@ func (client *WebAppsClient) getMSDeployLogSlotHandleResponse(resp *http.Respons return result, nil } -// GetMSDeployStatus - Get the status of the last MSDeploy operation. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -9123,7 +9140,7 @@ func (client *WebAppsClient) getMSDeployStatusCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9138,9 +9155,9 @@ func (client *WebAppsClient) getMSDeployStatusHandleResponse(resp *http.Response return result, nil } -// GetMSDeployStatusSlot - Get the status of the last MSDeploy operation. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -9185,7 +9202,7 @@ func (client *WebAppsClient) getMSDeployStatusSlotCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9200,10 +9217,10 @@ func (client *WebAppsClient) getMSDeployStatusSlotHandleResponse(resp *http.Resp return result, nil } -// GetMigrateMySQLStatus - Returns the status of MySql in app migration, if one is active, and whether or not MySql in app -// is enabled +// GetMigrateMySQLStatus - Description for Returns the status of MySql in app migration, if one is active, and whether or +// not MySql in app is enabled // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -9243,7 +9260,7 @@ func (client *WebAppsClient) getMigrateMySQLStatusCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9258,10 +9275,10 @@ func (client *WebAppsClient) getMigrateMySQLStatusHandleResponse(resp *http.Resp return result, nil } -// GetMigrateMySQLStatusSlot - Returns the status of MySql in app migration, if one is active, and whether or not MySql in -// app is enabled +// GetMigrateMySQLStatusSlot - Description for Returns the status of MySql in app migration, if one is active, and whether +// or not MySql in app is enabled // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // slot - Name of the deployment slot. @@ -9306,7 +9323,7 @@ func (client *WebAppsClient) getMigrateMySQLStatusSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9321,9 +9338,10 @@ func (client *WebAppsClient) getMigrateMySQLStatusSlotHandleResponse(resp *http. return result, nil } -// GetNetworkTraceOperation - Gets a named operation for a network trace capturing (or deployment slot, if specified). +// GetNetworkTraceOperation - 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // operationID - GUID of the operation. @@ -9368,7 +9386,7 @@ func (client *WebAppsClient) getNetworkTraceOperationCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9383,9 +9401,10 @@ func (client *WebAppsClient) getNetworkTraceOperationHandleResponse(resp *http.R return result, nil } -// GetNetworkTraceOperationSlot - Gets a named operation for a network trace capturing (or deployment slot, if specified). +// GetNetworkTraceOperationSlot - 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // operationID - GUID of the operation. @@ -9435,7 +9454,7 @@ func (client *WebAppsClient) getNetworkTraceOperationSlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9450,9 +9469,10 @@ func (client *WebAppsClient) getNetworkTraceOperationSlotHandleResponse(resp *ht return result, nil } -// GetNetworkTraceOperationSlotV2 - Gets a named operation for a network trace capturing (or deployment slot, if specified). +// GetNetworkTraceOperationSlotV2 - 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // operationID - GUID of the operation. @@ -9502,7 +9522,7 @@ func (client *WebAppsClient) getNetworkTraceOperationSlotV2CreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9517,9 +9537,10 @@ func (client *WebAppsClient) getNetworkTraceOperationSlotV2HandleResponse(resp * return result, nil } -// GetNetworkTraceOperationV2 - Gets a named operation for a network trace capturing (or deployment slot, if specified). +// GetNetworkTraceOperationV2 - 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // operationID - GUID of the operation. @@ -9564,7 +9585,7 @@ func (client *WebAppsClient) getNetworkTraceOperationV2CreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9579,9 +9600,9 @@ func (client *WebAppsClient) getNetworkTraceOperationV2HandleResponse(resp *http return result, nil } -// GetNetworkTraces - Gets a named operation for a network trace capturing (or deployment slot, if specified). +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // operationID - GUID of the operation. @@ -9626,7 +9647,7 @@ func (client *WebAppsClient) getNetworkTracesCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9641,9 +9662,9 @@ func (client *WebAppsClient) getNetworkTracesHandleResponse(resp *http.Response) return result, nil } -// GetNetworkTracesSlot - Gets a named operation for a network trace capturing (or deployment slot, if specified). +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // operationID - GUID of the operation. @@ -9693,7 +9714,7 @@ func (client *WebAppsClient) getNetworkTracesSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9708,9 +9729,9 @@ func (client *WebAppsClient) getNetworkTracesSlotHandleResponse(resp *http.Respo return result, nil } -// GetNetworkTracesSlotV2 - Gets a named operation for a network trace capturing (or deployment slot, if specified). +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // operationID - GUID of the operation. @@ -9760,7 +9781,7 @@ func (client *WebAppsClient) getNetworkTracesSlotV2CreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9775,9 +9796,9 @@ func (client *WebAppsClient) getNetworkTracesSlotV2HandleResponse(resp *http.Res return result, nil } -// GetNetworkTracesV2 - Gets a named operation for a network trace capturing (or deployment slot, if specified). +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // operationID - GUID of the operation. @@ -9822,7 +9843,7 @@ func (client *WebAppsClient) getNetworkTracesV2CreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9837,9 +9858,10 @@ func (client *WebAppsClient) getNetworkTracesV2HandleResponse(resp *http.Respons return result, nil } -// GetOneDeployStatus - Invoke onedeploy status API /api/deployments and gets the deployment status for the site +// GetOneDeployStatus - Description for Invoke onedeploy status API /api/deployments and gets the deployment status for the +// site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -9879,7 +9901,7 @@ func (client *WebAppsClient) getOneDeployStatusCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9894,9 +9916,9 @@ func (client *WebAppsClient) getOneDeployStatusHandleResponse(resp *http.Respons return result, nil } -// GetPremierAddOn - Gets a named add-on of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // premierAddOnName - Add-on name. @@ -9940,7 +9962,7 @@ func (client *WebAppsClient) getPremierAddOnCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9955,9 +9977,9 @@ func (client *WebAppsClient) getPremierAddOnHandleResponse(resp *http.Response) return result, nil } -// GetPremierAddOnSlot - Gets a named add-on of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // premierAddOnName - Add-on name. @@ -10007,7 +10029,7 @@ func (client *WebAppsClient) getPremierAddOnSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10022,10 +10044,10 @@ func (client *WebAppsClient) getPremierAddOnSlotHandleResponse(resp *http.Respon return result, nil } -// GetPrivateAccess - Gets data around private site access enablement and authorized Virtual Networks that can access the -// site. +// GetPrivateAccess - Description for Gets 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -10065,7 +10087,7 @@ func (client *WebAppsClient) getPrivateAccessCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10080,10 +10102,10 @@ func (client *WebAppsClient) getPrivateAccessHandleResponse(resp *http.Response) return result, nil } -// GetPrivateAccessSlot - Gets data around private site access enablement and authorized Virtual Networks that can access -// the site. +// GetPrivateAccessSlot - Description for Gets 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -10128,7 +10150,7 @@ func (client *WebAppsClient) getPrivateAccessSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10143,9 +10165,9 @@ func (client *WebAppsClient) getPrivateAccessSlotHandleResponse(resp *http.Respo return result, nil } -// GetPrivateEndpointConnection - Gets a private endpoint connection +// GetPrivateEndpointConnection - Description for Gets a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the site. // privateEndpointConnectionName - Name of the private endpoint connection. @@ -10190,7 +10212,7 @@ func (client *WebAppsClient) getPrivateEndpointConnectionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10205,9 +10227,10 @@ func (client *WebAppsClient) getPrivateEndpointConnectionHandleResponse(resp *ht return result, nil } -// NewGetPrivateEndpointConnectionListPager - Gets the list of private endpoint connections associated with a site +// NewGetPrivateEndpointConnectionListPager - Description for Gets the list of private endpoint connections associated with +// a site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.GetPrivateEndpointConnectionList @@ -10260,7 +10283,7 @@ func (client *WebAppsClient) getPrivateEndpointConnectionListCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10275,9 +10298,10 @@ func (client *WebAppsClient) getPrivateEndpointConnectionListHandleResponse(resp return result, nil } -// NewGetPrivateEndpointConnectionListSlotPager - Gets the list of private endpoint connections associated with a site +// NewGetPrivateEndpointConnectionListSlotPager - Description for Gets the list of private endpoint connections associated +// with a site // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the site. // slot - Name of the site deployment slot. @@ -10335,7 +10359,7 @@ func (client *WebAppsClient) getPrivateEndpointConnectionListSlotCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10350,9 +10374,9 @@ func (client *WebAppsClient) getPrivateEndpointConnectionListSlotHandleResponse( return result, nil } -// GetPrivateEndpointConnectionSlot - Gets a private endpoint connection +// GetPrivateEndpointConnectionSlot - Description for Gets a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the site. // privateEndpointConnectionName - Name of the private endpoint connection. @@ -10402,7 +10426,7 @@ func (client *WebAppsClient) getPrivateEndpointConnectionSlotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10417,9 +10441,9 @@ func (client *WebAppsClient) getPrivateEndpointConnectionSlotHandleResponse(resp return result, nil } -// GetPrivateLinkResources - Gets the private link resources +// GetPrivateLinkResources - Description for Gets the private link resources // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -10459,7 +10483,7 @@ func (client *WebAppsClient) getPrivateLinkResourcesCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10474,9 +10498,9 @@ func (client *WebAppsClient) getPrivateLinkResourcesHandleResponse(resp *http.Re return result, nil } -// GetPrivateLinkResourcesSlot - Gets the private link resources +// GetPrivateLinkResourcesSlot - Description for Gets the private link resources // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -10520,7 +10544,7 @@ func (client *WebAppsClient) getPrivateLinkResourcesSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10535,9 +10559,9 @@ func (client *WebAppsClient) getPrivateLinkResourcesSlotHandleResponse(resp *htt return result, nil } -// GetProcess - Get process information by its ID for a specific scaled-out instance in a web site. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -10581,7 +10605,7 @@ func (client *WebAppsClient) getProcessCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10596,9 +10620,9 @@ func (client *WebAppsClient) getProcessHandleResponse(resp *http.Response) (WebA return result, nil } -// GetProcessDump - Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -10642,16 +10666,17 @@ func (client *WebAppsClient) getProcessDumpCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// GetProcessDumpSlot - Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. +// GetProcessDumpSlot - 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -10701,16 +10726,16 @@ func (client *WebAppsClient) getProcessDumpSlotCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// GetProcessModule - Get process information by its ID for a specific scaled-out instance in a web site. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -10760,7 +10785,7 @@ func (client *WebAppsClient) getProcessModuleCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10775,9 +10800,9 @@ func (client *WebAppsClient) getProcessModuleHandleResponse(resp *http.Response) return result, nil } -// GetProcessModuleSlot - Get process information by its ID for a specific scaled-out instance in a web site. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -10832,7 +10857,7 @@ func (client *WebAppsClient) getProcessModuleSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10847,9 +10872,9 @@ func (client *WebAppsClient) getProcessModuleSlotHandleResponse(resp *http.Respo return result, nil } -// GetProcessSlot - Get process information by its ID for a specific scaled-out instance in a web site. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -10898,7 +10923,7 @@ func (client *WebAppsClient) getProcessSlotCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10913,9 +10938,77 @@ func (client *WebAppsClient) getProcessSlotHandleResponse(resp *http.Response) ( return result, nil } -// GetPublicCertificate - Get the named public certificate for an app (or deployment slot, if specified). +// 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-03-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Name of the app. +// deploymentStatusID - GUID of the deployment operation. +// options - WebAppsClientBeginGetProductionSiteDeploymentStatusOptions contains the optional parameters for the WebAppsClient.BeginGetProductionSiteDeploymentStatus +// method. +func (client *WebAppsClient) BeginGetProductionSiteDeploymentStatus(ctx context.Context, resourceGroupName string, name string, deploymentStatusID string, options *WebAppsClientBeginGetProductionSiteDeploymentStatusOptions) (*runtime.Poller[WebAppsClientGetProductionSiteDeploymentStatusResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getProductionSiteDeploymentStatus(ctx, resourceGroupName, name, deploymentStatusID, options) + if err != nil { + return nil, err + } + return runtime.NewPoller[WebAppsClientGetProductionSiteDeploymentStatusResponse](resp, client.pl, nil) + } else { + return runtime.NewPollerFromResumeToken[WebAppsClientGetProductionSiteDeploymentStatusResponse](options.ResumeToken, client.pl, nil) + } +} + +// 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-03-01 +func (client *WebAppsClient) getProductionSiteDeploymentStatus(ctx context.Context, resourceGroupName string, name string, deploymentStatusID string, options *WebAppsClientBeginGetProductionSiteDeploymentStatusOptions) (*http.Response, error) { + req, err := client.getProductionSiteDeploymentStatusCreateRequest(ctx, resourceGroupName, name, deploymentStatusID, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// getProductionSiteDeploymentStatusCreateRequest creates the GetProductionSiteDeploymentStatus request. +func (client *WebAppsClient) getProductionSiteDeploymentStatusCreateRequest(ctx context.Context, resourceGroupName string, name string, deploymentStatusID string, options *WebAppsClientBeginGetProductionSiteDeploymentStatusOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deploymentStatus/{deploymentStatusId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if deploymentStatusID == "" { + return nil, errors.New("parameter deploymentStatusID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deploymentStatusId}", url.PathEscape(deploymentStatusID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // publicCertificateName - Public certificate name. @@ -10960,7 +11053,7 @@ func (client *WebAppsClient) getPublicCertificateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10975,9 +11068,9 @@ func (client *WebAppsClient) getPublicCertificateHandleResponse(resp *http.Respo return result, nil } -// GetPublicCertificateSlot - Get the named public certificate for an app (or deployment slot, if specified). +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -11027,7 +11120,7 @@ func (client *WebAppsClient) getPublicCertificateSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11042,9 +11135,9 @@ func (client *WebAppsClient) getPublicCertificateSlotHandleResponse(resp *http.R return result, nil } -// GetRelayServiceConnection - Gets a hybrid connection configuration by its name. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // entityName - Name of the hybrid connection. @@ -11089,7 +11182,7 @@ func (client *WebAppsClient) getRelayServiceConnectionCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11104,9 +11197,9 @@ func (client *WebAppsClient) getRelayServiceConnectionHandleResponse(resp *http. return result, nil } -// GetRelayServiceConnectionSlot - Gets a hybrid connection configuration by its name. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // entityName - Name of the hybrid connection. @@ -11157,7 +11250,7 @@ func (client *WebAppsClient) getRelayServiceConnectionSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11172,9 +11265,9 @@ func (client *WebAppsClient) getRelayServiceConnectionSlotHandleResponse(resp *h return result, nil } -// GetScmAllowed - Returns whether Scm basic auth is allowed on the site or not. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -11213,7 +11306,7 @@ func (client *WebAppsClient) getScmAllowedCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11228,9 +11321,9 @@ func (client *WebAppsClient) getScmAllowedHandleResponse(resp *http.Response) (W return result, nil } -// GetScmAllowedSlot - Returns whether Scm basic auth is allowed on the site or not. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -11274,7 +11367,7 @@ func (client *WebAppsClient) getScmAllowedSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11289,9 +11382,9 @@ func (client *WebAppsClient) getScmAllowedSlotHandleResponse(resp *http.Response return result, nil } -// GetSiteConnectionStringKeyVaultReference - Gets the config reference and status of an app +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -11335,7 +11428,7 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferenceCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11350,9 +11443,9 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferenceHandleRespo return result, nil } -// GetSiteConnectionStringKeyVaultReferenceSlot - Gets the config reference and status of an app +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -11400,7 +11493,7 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferenceSlotCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11415,9 +11508,10 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferenceSlotHandleR return result, nil } -// NewGetSiteConnectionStringKeyVaultReferencesPager - Gets the config reference app settings and status of an app +// NewGetSiteConnectionStringKeyVaultReferencesPager - Description for Gets the config reference app settings and status of +// an app // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.GetSiteConnectionStringKeyVaultReferences @@ -11470,7 +11564,7 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferencesCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11485,9 +11579,10 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferencesHandleResp return result, nil } -// NewGetSiteConnectionStringKeyVaultReferencesSlotPager - Gets the config reference app settings and status of an app +// NewGetSiteConnectionStringKeyVaultReferencesSlotPager - Description for Gets the config reference app settings and status +// of an app // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.GetSiteConnectionStringKeyVaultReferencesSlot @@ -11544,7 +11639,7 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferencesSlotCreate return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11559,9 +11654,9 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferencesSlotHandle return result, nil } -// GetSiteExtension - Get site extension information by its ID for a web site, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // siteExtensionID - Site extension name. @@ -11606,7 +11701,7 @@ func (client *WebAppsClient) getSiteExtensionCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11621,9 +11716,9 @@ func (client *WebAppsClient) getSiteExtensionHandleResponse(resp *http.Response) return result, nil } -// GetSiteExtensionSlot - Get site extension information by its ID for a web site, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // siteExtensionID - Site extension name. @@ -11673,7 +11768,7 @@ func (client *WebAppsClient) getSiteExtensionSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11688,9 +11783,9 @@ func (client *WebAppsClient) getSiteExtensionSlotHandleResponse(resp *http.Respo return result, nil } -// GetSitePhpErrorLogFlag - Gets web app's event logs. +// GetSitePhpErrorLogFlag - Description for Gets web app's event logs. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -11730,7 +11825,7 @@ func (client *WebAppsClient) getSitePhpErrorLogFlagCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11745,9 +11840,9 @@ func (client *WebAppsClient) getSitePhpErrorLogFlagHandleResponse(resp *http.Res return result, nil } -// GetSitePhpErrorLogFlagSlot - Gets web app's event logs. +// GetSitePhpErrorLogFlagSlot - Description for Gets web app's event logs. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -11792,7 +11887,7 @@ func (client *WebAppsClient) getSitePhpErrorLogFlagSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11807,9 +11902,9 @@ func (client *WebAppsClient) getSitePhpErrorLogFlagSlotHandleResponse(resp *http return result, nil } -// GetSlot - Gets the details of a web, mobile, or API app. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -11853,7 +11948,7 @@ func (client *WebAppsClient) getSlotCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11868,9 +11963,83 @@ func (client *WebAppsClient) getSlotHandleResponse(resp *http.Response) (WebApps return result, nil } -// GetSourceControl - Gets the source control configuration of an app. +// 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-03-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 +// slot. +// deploymentStatusID - GUID of the deployment operation. +// options - WebAppsClientBeginGetSlotSiteDeploymentStatusSlotOptions contains the optional parameters for the WebAppsClient.BeginGetSlotSiteDeploymentStatusSlot +// method. +func (client *WebAppsClient) BeginGetSlotSiteDeploymentStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, deploymentStatusID string, options *WebAppsClientBeginGetSlotSiteDeploymentStatusSlotOptions) (*runtime.Poller[WebAppsClientGetSlotSiteDeploymentStatusSlotResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getSlotSiteDeploymentStatusSlot(ctx, resourceGroupName, name, slot, deploymentStatusID, options) + if err != nil { + return nil, err + } + return runtime.NewPoller[WebAppsClientGetSlotSiteDeploymentStatusSlotResponse](resp, client.pl, nil) + } else { + return runtime.NewPollerFromResumeToken[WebAppsClientGetSlotSiteDeploymentStatusSlotResponse](options.ResumeToken, client.pl, nil) + } +} + +// 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-03-01 +func (client *WebAppsClient) getSlotSiteDeploymentStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, deploymentStatusID string, options *WebAppsClientBeginGetSlotSiteDeploymentStatusSlotOptions) (*http.Response, error) { + req, err := client.getSlotSiteDeploymentStatusSlotCreateRequest(ctx, resourceGroupName, name, slot, deploymentStatusID, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// getSlotSiteDeploymentStatusSlotCreateRequest creates the GetSlotSiteDeploymentStatusSlot request. +func (client *WebAppsClient) getSlotSiteDeploymentStatusSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, deploymentStatusID string, options *WebAppsClientBeginGetSlotSiteDeploymentStatusSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deploymentStatus/{deploymentStatusId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if deploymentStatusID == "" { + return nil, errors.New("parameter deploymentStatusID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deploymentStatusId}", url.PathEscape(deploymentStatusID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -11910,7 +12079,7 @@ func (client *WebAppsClient) getSourceControlCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11925,9 +12094,9 @@ func (client *WebAppsClient) getSourceControlHandleResponse(resp *http.Response) return result, nil } -// GetSourceControlSlot - Gets the source control configuration of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -11973,7 +12142,7 @@ func (client *WebAppsClient) getSourceControlSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11988,9 +12157,9 @@ func (client *WebAppsClient) getSourceControlSlotHandleResponse(resp *http.Respo return result, nil } -// GetSwiftVirtualNetworkConnection - Gets a Swift Virtual Network connection. +// GetSwiftVirtualNetworkConnection - Description for Gets a Swift Virtual Network connection. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -12030,7 +12199,7 @@ func (client *WebAppsClient) getSwiftVirtualNetworkConnectionCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12045,9 +12214,9 @@ func (client *WebAppsClient) getSwiftVirtualNetworkConnectionHandleResponse(resp return result, nil } -// GetSwiftVirtualNetworkConnectionSlot - Gets a Swift Virtual Network connection. +// GetSwiftVirtualNetworkConnectionSlot - Description for Gets a Swift Virtual Network connection. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -12093,7 +12262,7 @@ func (client *WebAppsClient) getSwiftVirtualNetworkConnectionSlotCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12108,9 +12277,9 @@ func (client *WebAppsClient) getSwiftVirtualNetworkConnectionSlotHandleResponse( return result, nil } -// GetTriggeredWebJob - Gets a triggered web job by its ID for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -12155,7 +12324,7 @@ func (client *WebAppsClient) getTriggeredWebJobCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12170,9 +12339,10 @@ func (client *WebAppsClient) getTriggeredWebJobHandleResponse(resp *http.Respons return result, nil } -// GetTriggeredWebJobHistory - Gets a triggered web job's history by its ID for an app, , or a deployment slot. +// GetTriggeredWebJobHistory - Description for Gets a triggered web job's history by its ID for an app, , or a deployment +// slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -12222,7 +12392,7 @@ func (client *WebAppsClient) getTriggeredWebJobHistoryCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12237,9 +12407,10 @@ func (client *WebAppsClient) getTriggeredWebJobHistoryHandleResponse(resp *http. return result, nil } -// GetTriggeredWebJobHistorySlot - Gets a triggered web job's history by its ID for an app, , or a deployment slot. +// GetTriggeredWebJobHistorySlot - Description for Gets a triggered web job's history by its ID for an app, , or a deployment +// slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -12294,7 +12465,7 @@ func (client *WebAppsClient) getTriggeredWebJobHistorySlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12309,9 +12480,9 @@ func (client *WebAppsClient) getTriggeredWebJobHistorySlotHandleResponse(resp *h return result, nil } -// GetTriggeredWebJobSlot - Gets a triggered web job by its ID for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -12361,7 +12532,7 @@ func (client *WebAppsClient) getTriggeredWebJobSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12376,9 +12547,9 @@ func (client *WebAppsClient) getTriggeredWebJobSlotHandleResponse(resp *http.Res return result, nil } -// GetVnetConnection - Gets a virtual network the app (or deployment slot) is connected to by name. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of the virtual network. @@ -12423,7 +12594,7 @@ func (client *WebAppsClient) getVnetConnectionCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12438,9 +12609,9 @@ func (client *WebAppsClient) getVnetConnectionHandleResponse(resp *http.Response return result, nil } -// GetVnetConnectionGateway - Gets an app's Virtual Network gateway. +// GetVnetConnectionGateway - Description for Gets an app's Virtual Network gateway. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of the Virtual Network. @@ -12490,7 +12661,7 @@ func (client *WebAppsClient) getVnetConnectionGatewayCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12505,9 +12676,9 @@ func (client *WebAppsClient) getVnetConnectionGatewayHandleResponse(resp *http.R return result, nil } -// GetVnetConnectionGatewaySlot - Gets an app's Virtual Network gateway. +// GetVnetConnectionGatewaySlot - Description for Gets an app's Virtual Network gateway. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of the Virtual Network. @@ -12563,7 +12734,7 @@ func (client *WebAppsClient) getVnetConnectionGatewaySlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12578,9 +12749,9 @@ func (client *WebAppsClient) getVnetConnectionGatewaySlotHandleResponse(resp *ht return result, nil } -// GetVnetConnectionSlot - Gets a virtual network the app (or deployment slot) is connected to by name. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of the virtual network. @@ -12631,7 +12802,7 @@ func (client *WebAppsClient) getVnetConnectionSlotCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12646,9 +12817,9 @@ func (client *WebAppsClient) getVnetConnectionSlotHandleResponse(resp *http.Resp return result, nil } -// GetWebJob - Get webjob information for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of the web job. @@ -12692,7 +12863,7 @@ func (client *WebAppsClient) getWebJobCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12707,9 +12878,9 @@ func (client *WebAppsClient) getWebJobHandleResponse(resp *http.Response) (WebAp return result, nil } -// GetWebJobSlot - Get webjob information for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of the web job. @@ -12758,7 +12929,7 @@ func (client *WebAppsClient) getWebJobSlotCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12773,9 +12944,9 @@ func (client *WebAppsClient) getWebJobSlotHandleResponse(resp *http.Response) (W return result, nil } -// GetWebSiteContainerLogs - Gets the last lines of docker logs for the given site +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -12815,16 +12986,16 @@ func (client *WebAppsClient) getWebSiteContainerLogsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/octet-stream"} return req, nil } -// GetWebSiteContainerLogsSlot - Gets the last lines of docker logs for the given site +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -12869,16 +13040,16 @@ func (client *WebAppsClient) getWebSiteContainerLogsSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/octet-stream"} return req, nil } -// BeginInstallSiteExtension - Install site extension on a web site, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // siteExtensionID - Site extension name. @@ -12896,9 +13067,9 @@ func (client *WebAppsClient) BeginInstallSiteExtension(ctx context.Context, reso } } -// InstallSiteExtension - Install site extension on a web site, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) installSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, options *WebAppsClientBeginInstallSiteExtensionOptions) (*http.Response, error) { req, err := client.installSiteExtensionCreateRequest(ctx, resourceGroupName, name, siteExtensionID, options) if err != nil { @@ -12938,15 +13109,15 @@ func (client *WebAppsClient) installSiteExtensionCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginInstallSiteExtensionSlot - Install site extension on a web site, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // siteExtensionID - Site extension name. @@ -12965,9 +13136,9 @@ func (client *WebAppsClient) BeginInstallSiteExtensionSlot(ctx context.Context, } } -// InstallSiteExtensionSlot - Install site extension on a web site, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) installSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string, options *WebAppsClientBeginInstallSiteExtensionSlotOptions) (*http.Response, error) { req, err := client.installSiteExtensionSlotCreateRequest(ctx, resourceGroupName, name, siteExtensionID, slot, options) if err != nil { @@ -13011,15 +13182,15 @@ func (client *WebAppsClient) installSiteExtensionSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// IsCloneable - Shows whether an app can be cloned to another resource group or subscription. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -13058,7 +13229,7 @@ func (client *WebAppsClient) isCloneableCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13073,9 +13244,9 @@ func (client *WebAppsClient) isCloneableHandleResponse(resp *http.Response) (Web return result, nil } -// IsCloneableSlot - Shows whether an app can be cloned to another resource group or subscription. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -13119,7 +13290,7 @@ func (client *WebAppsClient) isCloneableSlotCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13134,9 +13305,9 @@ func (client *WebAppsClient) isCloneableSlotHandleResponse(resp *http.Response) return result, nil } -// NewListPager - Get all apps for a subscription. +// NewListPager - Description for Get all apps for a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - WebAppsClientListOptions contains the optional parameters for the WebAppsClient.List method. func (client *WebAppsClient) NewListPager(options *WebAppsClientListOptions) *runtime.Pager[WebAppsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[WebAppsClientListResponse]{ @@ -13178,7 +13349,7 @@ func (client *WebAppsClient) listCreateRequest(ctx context.Context, options *Web return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13193,9 +13364,9 @@ func (client *WebAppsClient) listHandleResponse(resp *http.Response) (WebAppsCli return result, nil } -// ListApplicationSettings - Gets the application settings of an app. +// ListApplicationSettings - Description for Gets the application settings of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -13235,7 +13406,7 @@ func (client *WebAppsClient) listApplicationSettingsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13250,9 +13421,9 @@ func (client *WebAppsClient) listApplicationSettingsHandleResponse(resp *http.Re return result, nil } -// ListApplicationSettingsSlot - Gets the application settings of an app. +// ListApplicationSettingsSlot - Description for Gets the application settings of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -13298,7 +13469,7 @@ func (client *WebAppsClient) listApplicationSettingsSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13313,9 +13484,9 @@ func (client *WebAppsClient) listApplicationSettingsSlotHandleResponse(resp *htt return result, nil } -// ListAzureStorageAccounts - Gets the Azure storage account configurations of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -13355,7 +13526,7 @@ func (client *WebAppsClient) listAzureStorageAccountsCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13370,9 +13541,9 @@ func (client *WebAppsClient) listAzureStorageAccountsHandleResponse(resp *http.R return result, nil } -// ListAzureStorageAccountsSlot - Gets the Azure storage account configurations of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -13418,7 +13589,7 @@ func (client *WebAppsClient) listAzureStorageAccountsSlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13433,11 +13604,11 @@ func (client *WebAppsClient) listAzureStorageAccountsSlotHandleResponse(resp *ht return result, nil } -// ListBackupStatusSecrets - Gets status of a web app backup that may be in progress, including secrets associated with the -// backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new -// URL is passed in the request body. +// ListBackupStatusSecrets - Description for Gets status of a web app backup that may be in progress, including secrets associated +// with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the +// backup if a new URL is passed in the request body. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // backupID - ID of backup. @@ -13483,7 +13654,7 @@ func (client *WebAppsClient) listBackupStatusSecretsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -13498,11 +13669,11 @@ func (client *WebAppsClient) listBackupStatusSecretsHandleResponse(resp *http.Re return result, nil } -// ListBackupStatusSecretsSlot - Gets status of a web app backup that may be in progress, including secrets associated with -// the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new -// URL is passed in the request body. +// ListBackupStatusSecretsSlot - Description for Gets status of a web app backup that may be in progress, including secrets +// associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the +// backup if a new URL is passed in the request body. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // backupID - ID of backup. @@ -13553,7 +13724,7 @@ func (client *WebAppsClient) listBackupStatusSecretsSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -13568,9 +13739,9 @@ func (client *WebAppsClient) listBackupStatusSecretsSlotHandleResponse(resp *htt return result, nil } -// NewListBackupsPager - Gets existing backups of an app. +// NewListBackupsPager - Description for Gets existing backups of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListBackups method. @@ -13622,7 +13793,7 @@ func (client *WebAppsClient) listBackupsCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13637,9 +13808,9 @@ func (client *WebAppsClient) listBackupsHandleResponse(resp *http.Response) (Web return result, nil } -// NewListBackupsSlotPager - Gets existing backups of an app. +// NewListBackupsSlotPager - Description for Gets existing backups of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -13696,7 +13867,7 @@ func (client *WebAppsClient) listBackupsSlotCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13711,10 +13882,10 @@ func (client *WebAppsClient) listBackupsSlotHandleResponse(resp *http.Response) return result, nil } -// NewListBasicPublishingCredentialsPoliciesPager - Returns whether Scm basic auth is allowed and whether Ftp is allowed for -// a given site. +// NewListBasicPublishingCredentialsPoliciesPager - Description for Returns whether Scm basic auth is allowed and whether +// Ftp is allowed for a given site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListBasicPublishingCredentialsPolicies @@ -13767,7 +13938,7 @@ func (client *WebAppsClient) listBasicPublishingCredentialsPoliciesCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13782,10 +13953,10 @@ func (client *WebAppsClient) listBasicPublishingCredentialsPoliciesHandleRespons return result, nil } -// NewListBasicPublishingCredentialsPoliciesSlotPager - Returns whether Scm basic auth is allowed and whether Ftp is allowed -// for a given site. +// NewListBasicPublishingCredentialsPoliciesSlotPager - Description for Returns whether Scm basic auth is allowed and whether +// Ftp is allowed for a given site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListBasicPublishingCredentialsPoliciesSlot @@ -13842,7 +14013,7 @@ func (client *WebAppsClient) listBasicPublishingCredentialsPoliciesSlotCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13857,9 +14028,9 @@ func (client *WebAppsClient) listBasicPublishingCredentialsPoliciesSlotHandleRes return result, nil } -// NewListByResourceGroupPager - Gets all web, mobile, and API apps in the specified resource group. +// NewListByResourceGroupPager - Description for Gets all web, mobile, and API apps in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // options - WebAppsClientListByResourceGroupOptions contains the optional parameters for the WebAppsClient.ListByResourceGroup // method. @@ -13910,7 +14081,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", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13925,10 +14096,10 @@ func (client *WebAppsClient) listByResourceGroupHandleResponse(resp *http.Respon return result, nil } -// NewListConfigurationSnapshotInfoPager - Gets a list of web app configuration snapshots identifiers. Each element of the -// list contains a timestamp and the ID of the snapshot. +// 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. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListConfigurationSnapshotInfo @@ -13981,7 +14152,7 @@ func (client *WebAppsClient) listConfigurationSnapshotInfoCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13996,10 +14167,10 @@ func (client *WebAppsClient) listConfigurationSnapshotInfoHandleResponse(resp *h return result, nil } -// NewListConfigurationSnapshotInfoSlotPager - Gets a list of web app configuration snapshots identifiers. Each element of -// the list contains a timestamp and the ID of the snapshot. +// 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. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -14057,7 +14228,7 @@ func (client *WebAppsClient) listConfigurationSnapshotInfoSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14072,9 +14243,9 @@ func (client *WebAppsClient) listConfigurationSnapshotInfoSlotHandleResponse(res return result, nil } -// NewListConfigurationsPager - List the configurations of an app +// NewListConfigurationsPager - Description for List the configurations of an app // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListConfigurations @@ -14127,7 +14298,7 @@ func (client *WebAppsClient) listConfigurationsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14142,9 +14313,9 @@ func (client *WebAppsClient) listConfigurationsHandleResponse(resp *http.Respons return result, nil } -// NewListConfigurationsSlotPager - List the configurations of an app +// NewListConfigurationsSlotPager - Description for List the configurations of an app // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -14202,7 +14373,7 @@ func (client *WebAppsClient) listConfigurationsSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14217,9 +14388,9 @@ func (client *WebAppsClient) listConfigurationsSlotHandleResponse(resp *http.Res return result, nil } -// ListConnectionStrings - Gets the connection strings of an app. +// ListConnectionStrings - Description for Gets the connection strings of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -14259,7 +14430,7 @@ func (client *WebAppsClient) listConnectionStringsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14274,9 +14445,9 @@ func (client *WebAppsClient) listConnectionStringsHandleResponse(resp *http.Resp return result, nil } -// ListConnectionStringsSlot - Gets the connection strings of an app. +// ListConnectionStringsSlot - Description for Gets the connection strings of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -14322,7 +14493,7 @@ func (client *WebAppsClient) listConnectionStringsSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14337,9 +14508,9 @@ func (client *WebAppsClient) listConnectionStringsSlotHandleResponse(resp *http. return result, nil } -// NewListContinuousWebJobsPager - List continuous web jobs for an app, or a deployment slot. +// NewListContinuousWebJobsPager - Description for List continuous web jobs for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // options - WebAppsClientListContinuousWebJobsOptions contains the optional parameters for the WebAppsClient.ListContinuousWebJobs @@ -14392,7 +14563,7 @@ func (client *WebAppsClient) listContinuousWebJobsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14407,9 +14578,9 @@ func (client *WebAppsClient) listContinuousWebJobsHandleResponse(resp *http.Resp return result, nil } -// NewListContinuousWebJobsSlotPager - List continuous web jobs for an app, or a deployment slot. +// NewListContinuousWebJobsSlotPager - Description for List continuous web jobs for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -14467,7 +14638,7 @@ func (client *WebAppsClient) listContinuousWebJobsSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14482,9 +14653,9 @@ func (client *WebAppsClient) listContinuousWebJobsSlotHandleResponse(resp *http. return result, nil } -// ListDeploymentLog - List deployment log for specific deployment for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-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". @@ -14529,7 +14700,7 @@ func (client *WebAppsClient) listDeploymentLogCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14544,9 +14715,9 @@ func (client *WebAppsClient) listDeploymentLogHandleResponse(resp *http.Response return result, nil } -// ListDeploymentLogSlot - List deployment log for specific deployment for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-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". @@ -14596,7 +14767,7 @@ func (client *WebAppsClient) listDeploymentLogSlotCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14611,9 +14782,9 @@ func (client *WebAppsClient) listDeploymentLogSlotHandleResponse(resp *http.Resp return result, nil } -// NewListDeploymentsPager - List deployments for an app, or a deployment slot. +// NewListDeploymentsPager - Description for List deployments for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListDeployments method. @@ -14665,7 +14836,7 @@ func (client *WebAppsClient) listDeploymentsCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14680,9 +14851,9 @@ func (client *WebAppsClient) listDeploymentsHandleResponse(resp *http.Response) return result, nil } -// NewListDeploymentsSlotPager - List deployments for an app, or a deployment slot. +// NewListDeploymentsSlotPager - Description for List deployments for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -14740,7 +14911,7 @@ func (client *WebAppsClient) listDeploymentsSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14755,9 +14926,9 @@ func (client *WebAppsClient) listDeploymentsSlotHandleResponse(resp *http.Respon return result, nil } -// NewListDomainOwnershipIdentifiersPager - Lists ownership identifiers for domain associated with web app. +// NewListDomainOwnershipIdentifiersPager - Description for Lists ownership identifiers for domain associated with web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListDomainOwnershipIdentifiers @@ -14810,7 +14981,7 @@ func (client *WebAppsClient) listDomainOwnershipIdentifiersCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14825,9 +14996,10 @@ func (client *WebAppsClient) listDomainOwnershipIdentifiersHandleResponse(resp * return result, nil } -// NewListDomainOwnershipIdentifiersSlotPager - Lists ownership identifiers for domain associated with web app. +// NewListDomainOwnershipIdentifiersSlotPager - Description for Lists ownership identifiers for domain associated with web +// app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -14885,7 +15057,7 @@ func (client *WebAppsClient) listDomainOwnershipIdentifiersSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14900,9 +15072,9 @@ func (client *WebAppsClient) listDomainOwnershipIdentifiersSlotHandleResponse(re return result, nil } -// ListFunctionKeys - Get function keys for a function in a web site, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - Function name. @@ -14947,7 +15119,7 @@ func (client *WebAppsClient) listFunctionKeysCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14962,9 +15134,9 @@ func (client *WebAppsClient) listFunctionKeysHandleResponse(resp *http.Response) return result, nil } -// ListFunctionKeysSlot - Get function keys for a function in a web site, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - Function name. @@ -15014,7 +15186,7 @@ func (client *WebAppsClient) listFunctionKeysSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15029,9 +15201,9 @@ func (client *WebAppsClient) listFunctionKeysSlotHandleResponse(resp *http.Respo return result, nil } -// ListFunctionSecrets - Get function secrets for a function in a web site, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - Function name. @@ -15076,7 +15248,7 @@ func (client *WebAppsClient) listFunctionSecretsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15091,9 +15263,9 @@ func (client *WebAppsClient) listFunctionSecretsHandleResponse(resp *http.Respon return result, nil } -// ListFunctionSecretsSlot - Get function secrets for a function in a web site, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // functionName - Function name. @@ -15143,7 +15315,7 @@ func (client *WebAppsClient) listFunctionSecretsSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15158,9 +15330,9 @@ func (client *WebAppsClient) listFunctionSecretsSlotHandleResponse(resp *http.Re return result, nil } -// NewListFunctionsPager - List the functions for a web site, or a deployment slot. +// NewListFunctionsPager - Description for List the functions for a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // options - WebAppsClientListFunctionsOptions contains the optional parameters for the WebAppsClient.ListFunctions method. @@ -15212,7 +15384,7 @@ func (client *WebAppsClient) listFunctionsCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15227,9 +15399,9 @@ func (client *WebAppsClient) listFunctionsHandleResponse(resp *http.Response) (W return result, nil } -// ListHostKeys - Get host secrets for a function app. +// ListHostKeys - Description for Get host secrets for a function app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -15268,7 +15440,7 @@ func (client *WebAppsClient) listHostKeysCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15283,9 +15455,9 @@ func (client *WebAppsClient) listHostKeysHandleResponse(resp *http.Response) (We return result, nil } -// ListHostKeysSlot - Get host secrets for a function app. +// ListHostKeysSlot - Description for Get host secrets for a function app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // slot - Name of the deployment slot. @@ -15330,7 +15502,7 @@ func (client *WebAppsClient) listHostKeysSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15345,9 +15517,9 @@ func (client *WebAppsClient) listHostKeysSlotHandleResponse(resp *http.Response) return result, nil } -// NewListHostNameBindingsPager - Get hostname bindings for an app or a deployment slot. +// NewListHostNameBindingsPager - Description for Get hostname bindings for an app or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListHostNameBindings @@ -15400,7 +15572,7 @@ func (client *WebAppsClient) listHostNameBindingsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15415,9 +15587,9 @@ func (client *WebAppsClient) listHostNameBindingsHandleResponse(resp *http.Respo return result, nil } -// NewListHostNameBindingsSlotPager - Get hostname bindings for an app or a deployment slot. +// NewListHostNameBindingsSlotPager - Description for Get hostname bindings for an app or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -15475,7 +15647,7 @@ func (client *WebAppsClient) listHostNameBindingsSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15490,9 +15662,9 @@ func (client *WebAppsClient) listHostNameBindingsSlotHandleResponse(resp *http.R return result, nil } -// ListHybridConnections - Retrieves all Service Bus Hybrid Connections used by this Web App. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -15532,7 +15704,7 @@ func (client *WebAppsClient) listHybridConnectionsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15547,9 +15719,9 @@ func (client *WebAppsClient) listHybridConnectionsHandleResponse(resp *http.Resp return result, nil } -// ListHybridConnectionsSlot - Retrieves all Service Bus Hybrid Connections used by this Web App. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -15594,7 +15766,7 @@ func (client *WebAppsClient) listHybridConnectionsSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15609,9 +15781,9 @@ func (client *WebAppsClient) listHybridConnectionsSlotHandleResponse(resp *http. return result, nil } -// NewListInstanceFunctionsSlotPager - List the functions for a web site, or a deployment slot. +// NewListInstanceFunctionsSlotPager - Description for List the functions for a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // slot - Name of the deployment slot. @@ -15669,7 +15841,7 @@ func (client *WebAppsClient) listInstanceFunctionsSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15684,9 +15856,9 @@ func (client *WebAppsClient) listInstanceFunctionsSlotHandleResponse(resp *http. return result, nil } -// NewListInstanceIdentifiersPager - Gets all scale-out instances of an app. +// NewListInstanceIdentifiersPager - Description for Gets all scale-out instances of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListInstanceIdentifiers @@ -15739,7 +15911,7 @@ func (client *WebAppsClient) listInstanceIdentifiersCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15754,9 +15926,9 @@ func (client *WebAppsClient) listInstanceIdentifiersHandleResponse(resp *http.Re return result, nil } -// NewListInstanceIdentifiersSlotPager - Gets all scale-out instances of an app. +// NewListInstanceIdentifiersSlotPager - Description for Gets all scale-out instances of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -15814,7 +15986,7 @@ func (client *WebAppsClient) listInstanceIdentifiersSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15829,10 +16001,10 @@ func (client *WebAppsClient) listInstanceIdentifiersSlotHandleResponse(resp *htt return result, nil } -// NewListInstanceProcessModulesPager - List module information for a process by its ID for a specific scaled-out instance -// in a web site. +// NewListInstanceProcessModulesPager - Description for List module information for 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -15896,7 +16068,7 @@ func (client *WebAppsClient) listInstanceProcessModulesCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15911,10 +16083,10 @@ func (client *WebAppsClient) listInstanceProcessModulesHandleResponse(resp *http return result, nil } -// NewListInstanceProcessModulesSlotPager - List module information for a process by its ID for a specific scaled-out instance -// in a web site. +// NewListInstanceProcessModulesSlotPager - Description for List module information for 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -15983,7 +16155,7 @@ func (client *WebAppsClient) listInstanceProcessModulesSlotCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15998,10 +16170,10 @@ func (client *WebAppsClient) listInstanceProcessModulesSlotHandleResponse(resp * return result, nil } -// NewListInstanceProcessThreadsPager - List the threads in a process by its ID for a specific scaled-out instance in a web -// site. +// NewListInstanceProcessThreadsPager - Description for List the threads in 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -16065,7 +16237,7 @@ func (client *WebAppsClient) listInstanceProcessThreadsCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16080,10 +16252,10 @@ func (client *WebAppsClient) listInstanceProcessThreadsHandleResponse(resp *http return result, nil } -// NewListInstanceProcessThreadsSlotPager - List the threads in a process by its ID for a specific scaled-out instance in -// a web site. +// NewListInstanceProcessThreadsSlotPager - Description for List the threads in 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -16152,7 +16324,7 @@ func (client *WebAppsClient) listInstanceProcessThreadsSlotCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16167,10 +16339,10 @@ func (client *WebAppsClient) listInstanceProcessThreadsSlotHandleResponse(resp * return result, nil } -// NewListInstanceProcessesPager - Get list of processes for a web site, or a deployment slot, or for a specific scaled-out -// instance in a web site. +// 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. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -16229,7 +16401,7 @@ func (client *WebAppsClient) listInstanceProcessesCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16244,10 +16416,10 @@ func (client *WebAppsClient) listInstanceProcessesHandleResponse(resp *http.Resp return result, nil } -// NewListInstanceProcessesSlotPager - Get list of processes for a web site, or a deployment slot, or for a specific scaled-out -// instance in a web site. +// 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. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -16311,7 +16483,7 @@ func (client *WebAppsClient) listInstanceProcessesSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16326,9 +16498,9 @@ func (client *WebAppsClient) listInstanceProcessesSlotHandleResponse(resp *http. return result, nil } -// ListMetadata - Gets the metadata of an app. +// ListMetadata - Description for Gets the metadata of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -16367,7 +16539,7 @@ func (client *WebAppsClient) listMetadataCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16382,9 +16554,9 @@ func (client *WebAppsClient) listMetadataHandleResponse(resp *http.Response) (We return result, nil } -// ListMetadataSlot - Gets the metadata of an app. +// ListMetadataSlot - Description for Gets the metadata of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -16429,7 +16601,7 @@ func (client *WebAppsClient) listMetadataSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16444,9 +16616,9 @@ func (client *WebAppsClient) listMetadataSlotHandleResponse(resp *http.Response) return result, nil } -// ListNetworkFeatures - Gets all network features used by the app (or deployment slot, if specified). +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -16491,7 +16663,7 @@ func (client *WebAppsClient) listNetworkFeaturesCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16506,9 +16678,9 @@ func (client *WebAppsClient) listNetworkFeaturesHandleResponse(resp *http.Respon return result, nil } -// ListNetworkFeaturesSlot - Gets all network features used by the app (or deployment slot, if specified). +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -16558,7 +16730,7 @@ func (client *WebAppsClient) listNetworkFeaturesSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16573,9 +16745,9 @@ func (client *WebAppsClient) listNetworkFeaturesSlotHandleResponse(resp *http.Re return result, nil } -// NewListPerfMonCountersPager - Gets perfmon counters for web app. +// NewListPerfMonCountersPager - Description for Gets perfmon counters for web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListPerfMonCounters @@ -16628,7 +16800,7 @@ func (client *WebAppsClient) listPerfMonCountersCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -16648,9 +16820,9 @@ func (client *WebAppsClient) listPerfMonCountersHandleResponse(resp *http.Respon return result, nil } -// NewListPerfMonCountersSlotPager - Gets perfmon counters for web app. +// NewListPerfMonCountersSlotPager - Description for Gets perfmon counters for web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -16708,7 +16880,7 @@ func (client *WebAppsClient) listPerfMonCountersSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -16728,9 +16900,9 @@ func (client *WebAppsClient) listPerfMonCountersSlotHandleResponse(resp *http.Re return result, nil } -// ListPremierAddOns - Gets the premier add-ons of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -16770,7 +16942,7 @@ func (client *WebAppsClient) listPremierAddOnsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16785,9 +16957,9 @@ func (client *WebAppsClient) listPremierAddOnsHandleResponse(resp *http.Response return result, nil } -// ListPremierAddOnsSlot - Gets the premier add-ons of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -16833,7 +17005,7 @@ func (client *WebAppsClient) listPremierAddOnsSlotCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16848,10 +17020,10 @@ func (client *WebAppsClient) listPremierAddOnsSlotHandleResponse(resp *http.Resp return result, nil } -// NewListProcessModulesPager - List module information for a process by its ID for a specific scaled-out instance in a web -// site. +// NewListProcessModulesPager - Description for List module information for 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -16909,7 +17081,7 @@ func (client *WebAppsClient) listProcessModulesCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16924,10 +17096,10 @@ func (client *WebAppsClient) listProcessModulesHandleResponse(resp *http.Respons return result, nil } -// NewListProcessModulesSlotPager - List module information for a process by its ID for a specific scaled-out instance in -// a web site. +// NewListProcessModulesSlotPager - Description for List module information for 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -16990,7 +17162,7 @@ func (client *WebAppsClient) listProcessModulesSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17005,9 +17177,10 @@ func (client *WebAppsClient) listProcessModulesSlotHandleResponse(resp *http.Res return result, nil } -// NewListProcessThreadsPager - List the threads in a process by its ID for a specific scaled-out instance in a web site. +// NewListProcessThreadsPager - Description for List the threads in 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -17065,7 +17238,7 @@ func (client *WebAppsClient) listProcessThreadsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17080,9 +17253,10 @@ func (client *WebAppsClient) listProcessThreadsHandleResponse(resp *http.Respons return result, nil } -// NewListProcessThreadsSlotPager - List the threads in a process by its ID for a specific scaled-out instance in a web site. +// NewListProcessThreadsSlotPager - Description for List the threads in 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // processID - PID. @@ -17145,7 +17319,7 @@ func (client *WebAppsClient) listProcessThreadsSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17160,10 +17334,10 @@ func (client *WebAppsClient) listProcessThreadsSlotHandleResponse(resp *http.Res return result, nil } -// NewListProcessesPager - Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance -// in a web site. +// 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. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // options - WebAppsClientListProcessesOptions contains the optional parameters for the WebAppsClient.ListProcesses method. @@ -17215,7 +17389,7 @@ func (client *WebAppsClient) listProcessesCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17230,10 +17404,10 @@ func (client *WebAppsClient) listProcessesHandleResponse(resp *http.Response) (W return result, nil } -// NewListProcessesSlotPager - Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance -// in a web site. +// 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. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -17291,7 +17465,7 @@ func (client *WebAppsClient) listProcessesSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17306,9 +17480,79 @@ func (client *WebAppsClient) listProcessesSlotHandleResponse(resp *http.Response return result, nil } -// NewListPublicCertificatesPager - Get public certificates for an app or a deployment slot. +// NewListProductionSiteDeploymentStatusesPager - List deployment statuses for an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListProductionSiteDeploymentStatuses +// method. +func (client *WebAppsClient) NewListProductionSiteDeploymentStatusesPager(resourceGroupName string, name string, options *WebAppsClientListProductionSiteDeploymentStatusesOptions) *runtime.Pager[WebAppsClientListProductionSiteDeploymentStatusesResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListProductionSiteDeploymentStatusesResponse]{ + More: func(page WebAppsClientListProductionSiteDeploymentStatusesResponse) bool { + 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.pl.Do(req) + if err != nil { + return WebAppsClientListProductionSiteDeploymentStatusesResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WebAppsClientListProductionSiteDeploymentStatusesResponse{}, runtime.NewResponseError(resp) + } + return client.listProductionSiteDeploymentStatusesHandleResponse(resp) + }, + }) +} + +// listProductionSiteDeploymentStatusesCreateRequest creates the ListProductionSiteDeploymentStatuses request. +func (client *WebAppsClient) listProductionSiteDeploymentStatusesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListProductionSiteDeploymentStatusesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deploymentStatus" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + 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.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listProductionSiteDeploymentStatusesHandleResponse handles the ListProductionSiteDeploymentStatuses response. +func (client *WebAppsClient) listProductionSiteDeploymentStatusesHandleResponse(resp *http.Response) (WebAppsClientListProductionSiteDeploymentStatusesResponse, error) { + result := WebAppsClientListProductionSiteDeploymentStatusesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CsmDeploymentStatusCollection); err != nil { + return WebAppsClientListProductionSiteDeploymentStatusesResponse{}, err + } + return result, nil +} + +// NewListPublicCertificatesPager - Description for Get public certificates for an app or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-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.ListPublicCertificates @@ -17361,7 +17605,7 @@ func (client *WebAppsClient) listPublicCertificatesCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17376,9 +17620,9 @@ func (client *WebAppsClient) listPublicCertificatesHandleResponse(resp *http.Res return result, nil } -// NewListPublicCertificatesSlotPager - Get public certificates for an app or a deployment slot. +// NewListPublicCertificatesSlotPager - Description for Get public certificates for an app or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -17436,7 +17680,7 @@ func (client *WebAppsClient) listPublicCertificatesSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17451,9 +17695,9 @@ func (client *WebAppsClient) listPublicCertificatesSlotHandleResponse(resp *http return result, nil } -// BeginListPublishingCredentials - Gets the Git/FTP publishing credentials of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -17470,9 +17714,9 @@ func (client *WebAppsClient) BeginListPublishingCredentials(ctx context.Context, } } -// ListPublishingCredentials - Gets the Git/FTP publishing credentials of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) listPublishingCredentials(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginListPublishingCredentialsOptions) (*http.Response, error) { req, err := client.listPublishingCredentialsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { @@ -17508,15 +17752,15 @@ func (client *WebAppsClient) listPublishingCredentialsCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginListPublishingCredentialsSlot - Gets the Git/FTP publishing credentials of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -17535,9 +17779,9 @@ func (client *WebAppsClient) BeginListPublishingCredentialsSlot(ctx context.Cont } } -// ListPublishingCredentialsSlot - Gets the Git/FTP publishing credentials of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) listPublishingCredentialsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginListPublishingCredentialsSlotOptions) (*http.Response, error) { req, err := client.listPublishingCredentialsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { @@ -17577,15 +17821,15 @@ func (client *WebAppsClient) listPublishingCredentialsSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// ListPublishingProfileXMLWithSecrets - Gets the publishing profile for an app (or deployment slot, if specified). +// 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 2021-03-01 +// Generated from API version 2022-03-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"} @@ -17627,16 +17871,17 @@ func (client *WebAppsClient) listPublishingProfileXMLWithSecretsCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/xml"} return req, runtime.MarshalAsJSON(req, publishingProfileOptions) } -// ListPublishingProfileXMLWithSecretsSlot - Gets the publishing profile for an app (or deployment slot, if specified). +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -17684,16 +17929,16 @@ func (client *WebAppsClient) listPublishingProfileXMLWithSecretsSlotCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/xml"} return req, runtime.MarshalAsJSON(req, publishingProfileOptions) } -// ListRelayServiceConnections - Gets hybrid connections configured for an app (or deployment slot, if specified). +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -17733,7 +17978,7 @@ func (client *WebAppsClient) listRelayServiceConnectionsCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17748,9 +17993,10 @@ func (client *WebAppsClient) listRelayServiceConnectionsHandleResponse(resp *htt return result, nil } -// ListRelayServiceConnectionsSlot - Gets hybrid connections configured for an app (or deployment slot, if specified). +// ListRelayServiceConnectionsSlot - 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -17796,7 +18042,7 @@ func (client *WebAppsClient) listRelayServiceConnectionsSlotCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17811,9 +18057,9 @@ func (client *WebAppsClient) listRelayServiceConnectionsSlotHandleResponse(resp return result, nil } -// NewListSiteBackupsPager - Gets existing backups of an app. +// NewListSiteBackupsPager - Description for Gets existing backups of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListSiteBackups method. @@ -17865,7 +18111,7 @@ func (client *WebAppsClient) listSiteBackupsCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17880,9 +18126,9 @@ func (client *WebAppsClient) listSiteBackupsHandleResponse(resp *http.Response) return result, nil } -// NewListSiteBackupsSlotPager - Gets existing backups of an app. +// NewListSiteBackupsSlotPager - Description for Gets existing backups of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -17940,7 +18186,7 @@ func (client *WebAppsClient) listSiteBackupsSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17955,9 +18201,9 @@ func (client *WebAppsClient) listSiteBackupsSlotHandleResponse(resp *http.Respon return result, nil } -// NewListSiteExtensionsPager - Get list of siteextensions for a web site, or a deployment slot. +// NewListSiteExtensionsPager - Description for Get list of siteextensions for a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // options - WebAppsClientListSiteExtensionsOptions contains the optional parameters for the WebAppsClient.ListSiteExtensions @@ -18010,7 +18256,7 @@ func (client *WebAppsClient) listSiteExtensionsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18025,9 +18271,9 @@ func (client *WebAppsClient) listSiteExtensionsHandleResponse(resp *http.Respons return result, nil } -// NewListSiteExtensionsSlotPager - Get list of siteextensions for a web site, or a deployment slot. +// NewListSiteExtensionsSlotPager - Description for Get list of siteextensions for a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -18085,7 +18331,7 @@ func (client *WebAppsClient) listSiteExtensionsSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18100,9 +18346,9 @@ func (client *WebAppsClient) listSiteExtensionsSlotHandleResponse(resp *http.Res return result, nil } -// ListSitePushSettings - Gets the Push settings associated with web app. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -18142,7 +18388,7 @@ func (client *WebAppsClient) listSitePushSettingsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18157,9 +18403,9 @@ func (client *WebAppsClient) listSitePushSettingsHandleResponse(resp *http.Respo return result, nil } -// ListSitePushSettingsSlot - Gets the Push settings associated with web app. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -18204,7 +18450,7 @@ func (client *WebAppsClient) listSitePushSettingsSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18219,9 +18465,10 @@ func (client *WebAppsClient) listSitePushSettingsSlotHandleResponse(resp *http.R return result, nil } -// ListSlotConfigurationNames - Gets the names of app settings and connection strings that stick to the slot (not swapped). +// ListSlotConfigurationNames - Description for Gets the names of app settings and connection strings that stick to the slot +// (not swapped). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -18261,7 +18508,7 @@ func (client *WebAppsClient) listSlotConfigurationNamesCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18276,9 +18523,10 @@ func (client *WebAppsClient) listSlotConfigurationNamesHandleResponse(resp *http return result, nil } -// NewListSlotDifferencesFromProductionPager - Get the difference in configuration settings between two web app slots. +// NewListSlotDifferencesFromProductionPager - Description for Get the difference in configuration settings between two web +// app slots. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -18332,7 +18580,7 @@ func (client *WebAppsClient) listSlotDifferencesFromProductionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, slotSwapEntity) @@ -18347,9 +18595,9 @@ func (client *WebAppsClient) listSlotDifferencesFromProductionHandleResponse(res return result, nil } -// NewListSlotDifferencesSlotPager - Get the difference in configuration settings between two web app slots. +// NewListSlotDifferencesSlotPager - Description for Get the difference in configuration settings between two web app slots. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -18408,7 +18656,7 @@ func (client *WebAppsClient) listSlotDifferencesSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, slotSwapEntity) @@ -18423,9 +18671,85 @@ func (client *WebAppsClient) listSlotDifferencesSlotHandleResponse(resp *http.Re return result, nil } -// NewListSlotsPager - Gets an app's deployment slots. +// NewListSlotSiteDeploymentStatusesSlotPager - List deployment statuses for an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 +// slot. +// options - WebAppsClientListSlotSiteDeploymentStatusesSlotOptions contains the optional parameters for the WebAppsClient.ListSlotSiteDeploymentStatusesSlot +// method. +func (client *WebAppsClient) NewListSlotSiteDeploymentStatusesSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListSlotSiteDeploymentStatusesSlotOptions) *runtime.Pager[WebAppsClientListSlotSiteDeploymentStatusesSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSlotSiteDeploymentStatusesSlotResponse]{ + More: func(page WebAppsClientListSlotSiteDeploymentStatusesSlotResponse) bool { + 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) + } + if err != nil { + return WebAppsClientListSlotSiteDeploymentStatusesSlotResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WebAppsClientListSlotSiteDeploymentStatusesSlotResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WebAppsClientListSlotSiteDeploymentStatusesSlotResponse{}, runtime.NewResponseError(resp) + } + return client.listSlotSiteDeploymentStatusesSlotHandleResponse(resp) + }, + }) +} + +// listSlotSiteDeploymentStatusesSlotCreateRequest creates the ListSlotSiteDeploymentStatusesSlot request. +func (client *WebAppsClient) listSlotSiteDeploymentStatusesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSlotSiteDeploymentStatusesSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deploymentStatus" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + 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.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSlotSiteDeploymentStatusesSlotHandleResponse handles the ListSlotSiteDeploymentStatusesSlot response. +func (client *WebAppsClient) listSlotSiteDeploymentStatusesSlotHandleResponse(resp *http.Response) (WebAppsClientListSlotSiteDeploymentStatusesSlotResponse, error) { + result := WebAppsClientListSlotSiteDeploymentStatusesSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CsmDeploymentStatusCollection); err != nil { + return WebAppsClientListSlotSiteDeploymentStatusesSlotResponse{}, err + } + return result, nil +} + +// NewListSlotsPager - Description for Gets an app's deployment slots. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-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.ListSlots method. @@ -18477,7 +18801,7 @@ func (client *WebAppsClient) listSlotsCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18492,9 +18816,9 @@ func (client *WebAppsClient) listSlotsHandleResponse(resp *http.Response) (WebAp return result, nil } -// NewListSnapshotsPager - Returns all Snapshots to the user. +// NewListSnapshotsPager - Description for Returns all Snapshots to the user. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Website Name. // options - WebAppsClientListSnapshotsOptions contains the optional parameters for the WebAppsClient.ListSnapshots method. @@ -18546,7 +18870,7 @@ func (client *WebAppsClient) listSnapshotsCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18561,9 +18885,9 @@ func (client *WebAppsClient) listSnapshotsHandleResponse(resp *http.Response) (W return result, nil } -// NewListSnapshotsFromDRSecondaryPager - Returns all Snapshots to the user from DRSecondary endpoint. +// NewListSnapshotsFromDRSecondaryPager - Description for Returns all Snapshots to the user from DRSecondary endpoint. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Website Name. // options - WebAppsClientListSnapshotsFromDRSecondaryOptions contains the optional parameters for the WebAppsClient.ListSnapshotsFromDRSecondary @@ -18616,7 +18940,7 @@ func (client *WebAppsClient) listSnapshotsFromDRSecondaryCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18631,9 +18955,9 @@ func (client *WebAppsClient) listSnapshotsFromDRSecondaryHandleResponse(resp *ht return result, nil } -// NewListSnapshotsFromDRSecondarySlotPager - Returns all Snapshots to the user from DRSecondary endpoint. +// NewListSnapshotsFromDRSecondarySlotPager - Description for Returns all Snapshots to the user from DRSecondary endpoint. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Website Name. // slot - Website Slot. @@ -18691,7 +19015,7 @@ func (client *WebAppsClient) listSnapshotsFromDRSecondarySlotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18706,9 +19030,9 @@ func (client *WebAppsClient) listSnapshotsFromDRSecondarySlotHandleResponse(resp return result, nil } -// NewListSnapshotsSlotPager - Returns all Snapshots to the user. +// NewListSnapshotsSlotPager - Description for Returns all Snapshots to the user. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Website Name. // slot - Website Slot. @@ -18766,7 +19090,7 @@ func (client *WebAppsClient) listSnapshotsSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18781,9 +19105,9 @@ func (client *WebAppsClient) listSnapshotsSlotHandleResponse(resp *http.Response return result, nil } -// ListSyncFunctionTriggers - This is to allow calling via powershell and ARM template. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -18823,7 +19147,7 @@ func (client *WebAppsClient) listSyncFunctionTriggersCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18838,9 +19162,9 @@ func (client *WebAppsClient) listSyncFunctionTriggersHandleResponse(resp *http.R return result, nil } -// ListSyncFunctionTriggersSlot - This is to allow calling via powershell and ARM template. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. @@ -18885,7 +19209,7 @@ func (client *WebAppsClient) listSyncFunctionTriggersSlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18900,9 +19224,9 @@ func (client *WebAppsClient) listSyncFunctionTriggersSlotHandleResponse(resp *ht return result, nil } -// ListSyncStatus - This is to allow calling via powershell and ARM template. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -18941,15 +19265,15 @@ func (client *WebAppsClient) listSyncStatusCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// ListSyncStatusSlot - This is to allow calling via powershell and ARM template. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. @@ -18994,15 +19318,15 @@ func (client *WebAppsClient) listSyncStatusSlotCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// NewListTriggeredWebJobHistoryPager - List a triggered web job's history for an app, or a deployment slot. +// NewListTriggeredWebJobHistoryPager - Description for List a triggered web job's history for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -19060,7 +19384,7 @@ func (client *WebAppsClient) listTriggeredWebJobHistoryCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19075,9 +19399,10 @@ func (client *WebAppsClient) listTriggeredWebJobHistoryHandleResponse(resp *http return result, nil } -// NewListTriggeredWebJobHistorySlotPager - List a triggered web job's history for an app, or a deployment slot. +// NewListTriggeredWebJobHistorySlotPager - Description for List a triggered web job's history for an app, or a deployment +// slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -19140,7 +19465,7 @@ func (client *WebAppsClient) listTriggeredWebJobHistorySlotCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19155,9 +19480,9 @@ func (client *WebAppsClient) listTriggeredWebJobHistorySlotHandleResponse(resp * return result, nil } -// NewListTriggeredWebJobsPager - List triggered web jobs for an app, or a deployment slot. +// NewListTriggeredWebJobsPager - Description for List triggered web jobs for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // options - WebAppsClientListTriggeredWebJobsOptions contains the optional parameters for the WebAppsClient.ListTriggeredWebJobs @@ -19210,7 +19535,7 @@ func (client *WebAppsClient) listTriggeredWebJobsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19225,9 +19550,9 @@ func (client *WebAppsClient) listTriggeredWebJobsHandleResponse(resp *http.Respo return result, nil } -// NewListTriggeredWebJobsSlotPager - List triggered web jobs for an app, or a deployment slot. +// NewListTriggeredWebJobsSlotPager - Description for List triggered web jobs for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -19285,7 +19610,7 @@ func (client *WebAppsClient) listTriggeredWebJobsSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19300,9 +19625,9 @@ func (client *WebAppsClient) listTriggeredWebJobsSlotHandleResponse(resp *http.R return result, nil } -// NewListUsagesPager - Gets the quota usage information of an app (or deployment slot, if specified). +// NewListUsagesPager - Description for Gets the quota usage information of an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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.ListUsages method. @@ -19354,7 +19679,7 @@ func (client *WebAppsClient) listUsagesCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -19374,9 +19699,9 @@ func (client *WebAppsClient) listUsagesHandleResponse(resp *http.Response) (WebA return result, nil } -// NewListUsagesSlotPager - Gets the quota usage information of an app (or deployment slot, if specified). +// NewListUsagesSlotPager - Description for Gets the quota usage information of an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -19433,7 +19758,7 @@ func (client *WebAppsClient) listUsagesSlotCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -19453,9 +19778,9 @@ func (client *WebAppsClient) listUsagesSlotHandleResponse(resp *http.Response) ( return result, nil } -// ListVnetConnections - Gets the virtual networks the app (or deployment slot) is connected to. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -19495,7 +19820,7 @@ func (client *WebAppsClient) listVnetConnectionsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19510,9 +19835,9 @@ func (client *WebAppsClient) listVnetConnectionsHandleResponse(resp *http.Respon return result, nil } -// ListVnetConnectionsSlot - Gets the virtual networks the app (or deployment slot) is connected to. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -19558,7 +19883,7 @@ func (client *WebAppsClient) listVnetConnectionsSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19573,9 +19898,9 @@ func (client *WebAppsClient) listVnetConnectionsSlotHandleResponse(resp *http.Re return result, nil } -// NewListWebJobsPager - List webjobs for an app, or a deployment slot. +// NewListWebJobsPager - Description for List webjobs for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // options - WebAppsClientListWebJobsOptions contains the optional parameters for the WebAppsClient.ListWebJobs method. @@ -19627,7 +19952,7 @@ func (client *WebAppsClient) listWebJobsCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19642,9 +19967,9 @@ func (client *WebAppsClient) listWebJobsHandleResponse(resp *http.Response) (Web return result, nil } -// NewListWebJobsSlotPager - List webjobs for an app, or a deployment slot. +// NewListWebJobsSlotPager - Description for List webjobs for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -19701,7 +20026,7 @@ func (client *WebAppsClient) listWebJobsSlotCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19716,9 +20041,9 @@ func (client *WebAppsClient) listWebJobsSlotHandleResponse(resp *http.Response) return result, nil } -// BeginMigrateMySQL - Migrates a local (in-app) MySql database to a remote MySql database. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // migrationRequestEnvelope - MySql migration options. @@ -19736,9 +20061,9 @@ func (client *WebAppsClient) BeginMigrateMySQL(ctx context.Context, resourceGrou } } -// MigrateMySQL - Migrates a local (in-app) MySql database to a remote MySql database. +// 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 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) migrateMySQL(ctx context.Context, resourceGroupName string, name string, migrationRequestEnvelope MigrateMySQLRequest, options *WebAppsClientBeginMigrateMySQLOptions) (*http.Response, error) { req, err := client.migrateMySQLCreateRequest(ctx, resourceGroupName, name, migrationRequestEnvelope, options) if err != nil { @@ -19774,15 +20099,15 @@ func (client *WebAppsClient) migrateMySQLCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, migrationRequestEnvelope) } -// BeginMigrateStorage - Restores a web app. +// BeginMigrateStorage - Description for Restores a web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // subscriptionName - Azure subscription. // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. @@ -19801,9 +20126,9 @@ func (client *WebAppsClient) BeginMigrateStorage(ctx context.Context, subscripti } } -// MigrateStorage - Restores a web app. +// MigrateStorage - Description for Restores a web app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) migrateStorage(ctx context.Context, subscriptionName string, resourceGroupName string, name string, migrationOptions StorageMigrationOptions, options *WebAppsClientBeginMigrateStorageOptions) (*http.Response, error) { req, err := client.migrateStorageCreateRequest(ctx, subscriptionName, resourceGroupName, name, migrationOptions, options) if err != nil { @@ -19840,16 +20165,16 @@ func (client *WebAppsClient) migrateStorageCreateRequest(ctx context.Context, su } reqQP := req.Raw().URL.Query() reqQP.Set("subscriptionName", subscriptionName) - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, migrationOptions) } -// PutPrivateAccessVnet - Sets data around private site access enablement and authorized Virtual Networks that can access -// the site. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -19890,7 +20215,7 @@ func (client *WebAppsClient) putPrivateAccessVnetCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, access) @@ -19905,10 +20230,10 @@ func (client *WebAppsClient) putPrivateAccessVnetHandleResponse(resp *http.Respo return result, nil } -// PutPrivateAccessVnetSlot - Sets data around private site access enablement and authorized Virtual Networks that can access -// the site. +// PutPrivateAccessVnetSlot - 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -19954,7 +20279,7 @@ func (client *WebAppsClient) putPrivateAccessVnetSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, access) @@ -19969,9 +20294,9 @@ func (client *WebAppsClient) putPrivateAccessVnetSlotHandleResponse(resp *http.R return result, nil } -// RecoverSiteConfigurationSnapshot - Reverts the configuration of an app to a previous snapshot. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -20016,15 +20341,15 @@ func (client *WebAppsClient) recoverSiteConfigurationSnapshotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// RecoverSiteConfigurationSnapshotSlot - Reverts the configuration of an app to a previous snapshot. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -20074,16 +20399,16 @@ func (client *WebAppsClient) recoverSiteConfigurationSnapshotSlotCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// ResetProductionSlotConfig - Resets the configuration settings of the current slot if they were previously modified by calling -// the API with POST. +// ResetProductionSlotConfig - Description for Resets the configuration settings of the current slot if they were previously +// modified by calling the API with POST. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -20123,16 +20448,16 @@ func (client *WebAppsClient) resetProductionSlotConfigCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// ResetSlotConfigurationSlot - Resets the configuration settings of the current slot if they were previously modified by -// calling the API with POST. +// ResetSlotConfigurationSlot - Description for Resets the configuration settings of the current slot if they were previously +// modified by calling the API with POST. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -20178,15 +20503,15 @@ func (client *WebAppsClient) resetSlotConfigurationSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// Restart - Restarts an app (or deployment slot, if specified). +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -20231,15 +20556,15 @@ 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", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// RestartSlot - Restarts an app (or deployment slot, if specified). +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -20289,15 +20614,15 @@ 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", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginRestore - Restores a specific backup to another app (or deployment slot, if specified). +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // backupID - ID of the backup. @@ -20315,9 +20640,9 @@ func (client *WebAppsClient) BeginRestore(ctx context.Context, resourceGroupName } } -// Restore - Restores a specific backup to another app (or deployment slot, if specified). +// 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 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) restore(ctx context.Context, resourceGroupName string, name string, backupID string, request RestoreRequest, options *WebAppsClientBeginRestoreOptions) (*http.Response, error) { req, err := client.restoreCreateRequest(ctx, resourceGroupName, name, backupID, request, options) if err != nil { @@ -20357,15 +20682,15 @@ func (client *WebAppsClient) restoreCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) } -// BeginRestoreFromBackupBlob - Restores an app from a backup blob in Azure Storage. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // request - Information on restore request . @@ -20383,9 +20708,9 @@ func (client *WebAppsClient) BeginRestoreFromBackupBlob(ctx context.Context, res } } -// RestoreFromBackupBlob - Restores an app from a backup blob in Azure Storage. +// 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 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) restoreFromBackupBlob(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, options *WebAppsClientBeginRestoreFromBackupBlobOptions) (*http.Response, error) { req, err := client.restoreFromBackupBlobCreateRequest(ctx, resourceGroupName, name, request, options) if err != nil { @@ -20421,15 +20746,15 @@ func (client *WebAppsClient) restoreFromBackupBlobCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) } -// BeginRestoreFromBackupBlobSlot - Restores an app from a backup blob in Azure Storage. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -20448,9 +20773,9 @@ func (client *WebAppsClient) BeginRestoreFromBackupBlobSlot(ctx context.Context, } } -// RestoreFromBackupBlobSlot - Restores an app from a backup blob in Azure Storage. +// 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 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) restoreFromBackupBlobSlot(ctx context.Context, resourceGroupName string, name string, slot string, request RestoreRequest, options *WebAppsClientBeginRestoreFromBackupBlobSlotOptions) (*http.Response, error) { req, err := client.restoreFromBackupBlobSlotCreateRequest(ctx, resourceGroupName, name, slot, request, options) if err != nil { @@ -20490,15 +20815,15 @@ func (client *WebAppsClient) restoreFromBackupBlobSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) } -// BeginRestoreFromDeletedApp - Restores a deleted web app to this web app. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // restoreRequest - Deleted web app restore information. @@ -20516,9 +20841,9 @@ func (client *WebAppsClient) BeginRestoreFromDeletedApp(ctx context.Context, res } } -// RestoreFromDeletedApp - Restores a deleted web app to this web app. +// 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 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) restoreFromDeletedApp(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest, options *WebAppsClientBeginRestoreFromDeletedAppOptions) (*http.Response, error) { req, err := client.restoreFromDeletedAppCreateRequest(ctx, resourceGroupName, name, restoreRequest, options) if err != nil { @@ -20554,15 +20879,15 @@ func (client *WebAppsClient) restoreFromDeletedAppCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, restoreRequest) } -// BeginRestoreFromDeletedAppSlot - Restores a deleted web app to this web app. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -20581,9 +20906,9 @@ func (client *WebAppsClient) BeginRestoreFromDeletedAppSlot(ctx context.Context, } } -// RestoreFromDeletedAppSlot - Restores a deleted web app to this web app. +// 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 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) restoreFromDeletedAppSlot(ctx context.Context, resourceGroupName string, name string, slot string, restoreRequest DeletedAppRestoreRequest, options *WebAppsClientBeginRestoreFromDeletedAppSlotOptions) (*http.Response, error) { req, err := client.restoreFromDeletedAppSlotCreateRequest(ctx, resourceGroupName, name, slot, restoreRequest, options) if err != nil { @@ -20623,15 +20948,15 @@ func (client *WebAppsClient) restoreFromDeletedAppSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, restoreRequest) } -// BeginRestoreSlot - Restores a specific backup to another app (or deployment slot, if specified). +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // backupID - ID of the backup. @@ -20651,9 +20976,9 @@ func (client *WebAppsClient) BeginRestoreSlot(ctx context.Context, resourceGroup } } -// RestoreSlot - Restores a specific backup to another app (or deployment slot, if specified). +// 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 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) restoreSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, request RestoreRequest, options *WebAppsClientBeginRestoreSlotOptions) (*http.Response, error) { req, err := client.restoreSlotCreateRequest(ctx, resourceGroupName, name, backupID, slot, request, options) if err != nil { @@ -20697,15 +21022,15 @@ func (client *WebAppsClient) restoreSlotCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) } -// BeginRestoreSnapshot - Restores a web app from a snapshot. +// BeginRestoreSnapshot - Description for Restores a web app from a snapshot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -20724,9 +21049,9 @@ func (client *WebAppsClient) BeginRestoreSnapshot(ctx context.Context, resourceG } } -// RestoreSnapshot - Restores a web app from a snapshot. +// RestoreSnapshot - Description for Restores a web app from a snapshot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) restoreSnapshot(ctx context.Context, resourceGroupName string, name string, restoreRequest SnapshotRestoreRequest, options *WebAppsClientBeginRestoreSnapshotOptions) (*http.Response, error) { req, err := client.restoreSnapshotCreateRequest(ctx, resourceGroupName, name, restoreRequest, options) if err != nil { @@ -20762,15 +21087,15 @@ func (client *WebAppsClient) restoreSnapshotCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, restoreRequest) } -// BeginRestoreSnapshotSlot - Restores a web app from a snapshot. +// BeginRestoreSnapshotSlot - Description for Restores a web app from a snapshot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -20790,9 +21115,9 @@ func (client *WebAppsClient) BeginRestoreSnapshotSlot(ctx context.Context, resou } } -// RestoreSnapshotSlot - Restores a web app from a snapshot. +// RestoreSnapshotSlot - Description for Restores a web app from a snapshot. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) restoreSnapshotSlot(ctx context.Context, resourceGroupName string, name string, slot string, restoreRequest SnapshotRestoreRequest, options *WebAppsClientBeginRestoreSnapshotSlotOptions) (*http.Response, error) { req, err := client.restoreSnapshotSlotCreateRequest(ctx, resourceGroupName, name, slot, restoreRequest, options) if err != nil { @@ -20832,15 +21157,15 @@ func (client *WebAppsClient) restoreSnapshotSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, restoreRequest) } -// RunTriggeredWebJob - Run a triggered web job for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -20885,15 +21210,15 @@ func (client *WebAppsClient) runTriggeredWebJobCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// RunTriggeredWebJobSlot - Run a triggered web job for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -20943,15 +21268,15 @@ func (client *WebAppsClient) runTriggeredWebJobSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// Start - Starts an app (or deployment slot, if specified). +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -20990,15 +21315,15 @@ func (client *WebAppsClient) startCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// StartContinuousWebJob - Start a continuous web job for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -21043,15 +21368,15 @@ func (client *WebAppsClient) startContinuousWebJobCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// StartContinuousWebJobSlot - Start a continuous web job for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -21101,15 +21426,15 @@ func (client *WebAppsClient) startContinuousWebJobSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginStartNetworkTrace - Start capturing network packets for the site. +// BeginStartNetworkTrace - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -21126,9 +21451,9 @@ func (client *WebAppsClient) BeginStartNetworkTrace(ctx context.Context, resourc } } -// StartNetworkTrace - Start capturing network packets for the site. +// StartNetworkTrace - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) startNetworkTrace(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginStartNetworkTraceOptions) (*http.Response, error) { req, err := client.startNetworkTraceCreateRequest(ctx, resourceGroupName, name, options) if err != nil { @@ -21173,15 +21498,15 @@ func (client *WebAppsClient) startNetworkTraceCreateRequest(ctx context.Context, if options != nil && options.SasURL != nil { reqQP.Set("sasUrl", *options.SasURL) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginStartNetworkTraceSlot - Start capturing network packets for the site. +// BeginStartNetworkTraceSlot - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -21199,9 +21524,9 @@ func (client *WebAppsClient) BeginStartNetworkTraceSlot(ctx context.Context, res } } -// StartNetworkTraceSlot - Start capturing network packets for the site. +// StartNetworkTraceSlot - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) startNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginStartNetworkTraceSlotOptions) (*http.Response, error) { req, err := client.startNetworkTraceSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { @@ -21250,15 +21575,15 @@ func (client *WebAppsClient) startNetworkTraceSlotCreateRequest(ctx context.Cont if options != nil && options.SasURL != nil { reqQP.Set("sasUrl", *options.SasURL) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// StartSlot - Starts an app (or deployment slot, if specified). +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -21302,15 +21627,15 @@ func (client *WebAppsClient) startSlotCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// StartWebSiteNetworkTrace - Start capturing network packets for the site (To be deprecated). +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -21359,7 +21684,7 @@ func (client *WebAppsClient) startWebSiteNetworkTraceCreateRequest(ctx context.C if options != nil && options.SasURL != nil { reqQP.Set("sasUrl", *options.SasURL) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -21374,9 +21699,9 @@ func (client *WebAppsClient) startWebSiteNetworkTraceHandleResponse(resp *http.R return result, nil } -// BeginStartWebSiteNetworkTraceOperation - Start capturing network packets for the site. +// BeginStartWebSiteNetworkTraceOperation - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -21393,9 +21718,9 @@ func (client *WebAppsClient) BeginStartWebSiteNetworkTraceOperation(ctx context. } } -// StartWebSiteNetworkTraceOperation - Start capturing network packets for the site. +// StartWebSiteNetworkTraceOperation - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) startWebSiteNetworkTraceOperation(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions) (*http.Response, error) { req, err := client.startWebSiteNetworkTraceOperationCreateRequest(ctx, resourceGroupName, name, options) if err != nil { @@ -21440,15 +21765,15 @@ func (client *WebAppsClient) startWebSiteNetworkTraceOperationCreateRequest(ctx if options != nil && options.SasURL != nil { reqQP.Set("sasUrl", *options.SasURL) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginStartWebSiteNetworkTraceOperationSlot - Start capturing network packets for the site. +// BeginStartWebSiteNetworkTraceOperationSlot - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -21466,9 +21791,9 @@ func (client *WebAppsClient) BeginStartWebSiteNetworkTraceOperationSlot(ctx cont } } -// StartWebSiteNetworkTraceOperationSlot - Start capturing network packets for the site. +// StartWebSiteNetworkTraceOperationSlot - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) startWebSiteNetworkTraceOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions) (*http.Response, error) { req, err := client.startWebSiteNetworkTraceOperationSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { @@ -21517,15 +21842,15 @@ func (client *WebAppsClient) startWebSiteNetworkTraceOperationSlotCreateRequest( if options != nil && options.SasURL != nil { reqQP.Set("sasUrl", *options.SasURL) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// StartWebSiteNetworkTraceSlot - Start capturing network packets for the site (To be deprecated). +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -21579,7 +21904,7 @@ func (client *WebAppsClient) startWebSiteNetworkTraceSlotCreateRequest(ctx conte if options != nil && options.SasURL != nil { reqQP.Set("sasUrl", *options.SasURL) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -21594,9 +21919,9 @@ func (client *WebAppsClient) startWebSiteNetworkTraceSlotHandleResponse(resp *ht return result, nil } -// Stop - Stops an app (or deployment slot, if specified). +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -21635,15 +21960,15 @@ func (client *WebAppsClient) stopCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// StopContinuousWebJob - Stop a continuous web job for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -21688,15 +22013,15 @@ func (client *WebAppsClient) stopContinuousWebJobCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// StopContinuousWebJobSlot - Stop a continuous web job for an app, or a deployment slot. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Site name. // webJobName - Name of Web Job. @@ -21746,15 +22071,15 @@ func (client *WebAppsClient) stopContinuousWebJobSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// StopNetworkTrace - Stop ongoing capturing network packets for the site. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -21794,15 +22119,15 @@ func (client *WebAppsClient) stopNetworkTraceCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// StopNetworkTraceSlot - Stop ongoing capturing network packets for the site. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -21847,15 +22172,15 @@ func (client *WebAppsClient) stopNetworkTraceSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// StopSlot - Stops an app (or deployment slot, if specified). +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -21899,15 +22224,15 @@ func (client *WebAppsClient) stopSlotCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// StopWebSiteNetworkTrace - Stop ongoing capturing network packets for the site. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -21947,15 +22272,15 @@ func (client *WebAppsClient) stopWebSiteNetworkTraceCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// StopWebSiteNetworkTraceSlot - Stop ongoing capturing network packets for the site. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -22000,15 +22325,15 @@ func (client *WebAppsClient) stopWebSiteNetworkTraceSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginSwapSlot - Swaps two deployment slots of an app. +// BeginSwapSlot - Description for Swaps two deployment slots of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -22026,9 +22351,9 @@ func (client *WebAppsClient) BeginSwapSlot(ctx context.Context, resourceGroupNam } } -// SwapSlot - Swaps two deployment slots of an app. +// SwapSlot - Description for Swaps two deployment slots of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) swapSlot(ctx context.Context, resourceGroupName string, name string, slot string, slotSwapEntity CsmSlotEntity, options *WebAppsClientBeginSwapSlotOptions) (*http.Response, error) { req, err := client.swapSlotCreateRequest(ctx, resourceGroupName, name, slot, slotSwapEntity, options) if err != nil { @@ -22068,15 +22393,15 @@ func (client *WebAppsClient) swapSlotCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, slotSwapEntity) } -// BeginSwapSlotWithProduction - Swaps two deployment slots of an app. +// BeginSwapSlotWithProduction - Description for Swaps two deployment slots of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -22094,9 +22419,9 @@ func (client *WebAppsClient) BeginSwapSlotWithProduction(ctx context.Context, re } } -// SwapSlotWithProduction - Swaps two deployment slots of an app. +// SwapSlotWithProduction - Description for Swaps two deployment slots of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 func (client *WebAppsClient) swapSlotWithProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, options *WebAppsClientBeginSwapSlotWithProductionOptions) (*http.Response, error) { req, err := client.swapSlotWithProductionCreateRequest(ctx, resourceGroupName, name, slotSwapEntity, options) if err != nil { @@ -22132,15 +22457,15 @@ func (client *WebAppsClient) swapSlotWithProductionCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, slotSwapEntity) } -// SyncFunctionTriggers - Syncs function trigger metadata to the management database +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -22180,15 +22505,15 @@ func (client *WebAppsClient) syncFunctionTriggersCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// SyncFunctionTriggersSlot - Syncs function trigger metadata to the management database +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. @@ -22233,15 +22558,15 @@ func (client *WebAppsClient) syncFunctionTriggersSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// SyncFunctions - Syncs function trigger metadata to the management database +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -22280,15 +22605,15 @@ func (client *WebAppsClient) syncFunctionsCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// SyncFunctionsSlot - Syncs function trigger metadata to the management database +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // slot - Name of the deployment slot. @@ -22333,15 +22658,15 @@ func (client *WebAppsClient) syncFunctionsSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// SyncRepository - Sync web app repository. +// SyncRepository - Description for Sync web app repository. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -22380,15 +22705,15 @@ func (client *WebAppsClient) syncRepositoryCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// SyncRepositorySlot - Sync web app repository. +// SyncRepositorySlot - Description for Sync web app repository. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -22433,15 +22758,15 @@ func (client *WebAppsClient) syncRepositorySlotCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// Update - Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -22481,7 +22806,7 @@ func (client *WebAppsClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteEnvelope) @@ -22496,9 +22821,9 @@ func (client *WebAppsClient) updateHandleResponse(resp *http.Response) (WebAppsC return result, nil } -// UpdateApplicationSettings - Replaces the application settings of an app. +// UpdateApplicationSettings - Description for Replaces the application settings of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // appSettings - Application settings of the app. @@ -22539,7 +22864,7 @@ func (client *WebAppsClient) updateApplicationSettingsCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appSettings) @@ -22554,9 +22879,9 @@ func (client *WebAppsClient) updateApplicationSettingsHandleResponse(resp *http. return result, nil } -// UpdateApplicationSettingsSlot - Replaces the application settings of an app. +// UpdateApplicationSettingsSlot - Description for Replaces the application settings of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -22603,7 +22928,7 @@ func (client *WebAppsClient) updateApplicationSettingsSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, appSettings) @@ -22618,9 +22943,9 @@ func (client *WebAppsClient) updateApplicationSettingsSlotHandleResponse(resp *h return result, nil } -// UpdateAuthSettings - Updates the Authentication / Authorization settings associated with web app. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // siteAuthSettings - Auth settings associated with web app. @@ -22661,7 +22986,7 @@ func (client *WebAppsClient) updateAuthSettingsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteAuthSettings) @@ -22676,9 +23001,9 @@ func (client *WebAppsClient) updateAuthSettingsHandleResponse(resp *http.Respons return result, nil } -// UpdateAuthSettingsSlot - Updates the Authentication / Authorization settings associated with web app. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -22724,7 +23049,7 @@ func (client *WebAppsClient) updateAuthSettingsSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteAuthSettings) @@ -22739,9 +23064,9 @@ func (client *WebAppsClient) updateAuthSettingsSlotHandleResponse(resp *http.Res return result, nil } -// UpdateAuthSettingsV2 - Updates site's Authentication / Authorization settings for apps via the V2 format +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // siteAuthSettingsV2 - Auth settings associated with web app. @@ -22782,7 +23107,7 @@ func (client *WebAppsClient) updateAuthSettingsV2CreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteAuthSettingsV2) @@ -22797,9 +23122,9 @@ func (client *WebAppsClient) updateAuthSettingsV2HandleResponse(resp *http.Respo return result, nil } -// UpdateAuthSettingsV2Slot - Updates site's Authentication / Authorization settings for apps via the V2 format +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -22845,7 +23170,7 @@ func (client *WebAppsClient) updateAuthSettingsV2SlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteAuthSettingsV2) @@ -22860,9 +23185,9 @@ func (client *WebAppsClient) updateAuthSettingsV2SlotHandleResponse(resp *http.R return result, nil } -// UpdateAzureStorageAccounts - Updates the Azure storage account configurations of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // azureStorageAccounts - Azure storage accounts of the app. @@ -22903,7 +23228,7 @@ func (client *WebAppsClient) updateAzureStorageAccountsCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, azureStorageAccounts) @@ -22918,9 +23243,9 @@ func (client *WebAppsClient) updateAzureStorageAccountsHandleResponse(resp *http return result, nil } -// UpdateAzureStorageAccountsSlot - Updates the Azure storage account configurations of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -22967,7 +23292,7 @@ func (client *WebAppsClient) updateAzureStorageAccountsSlotCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, azureStorageAccounts) @@ -22982,9 +23307,9 @@ func (client *WebAppsClient) updateAzureStorageAccountsSlotHandleResponse(resp * return result, nil } -// UpdateBackupConfiguration - Updates the backup configuration of an app. +// UpdateBackupConfiguration - Description for Updates the backup configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // request - Edited backup configuration. @@ -23025,7 +23350,7 @@ func (client *WebAppsClient) updateBackupConfigurationCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -23040,9 +23365,9 @@ func (client *WebAppsClient) updateBackupConfigurationHandleResponse(resp *http. return result, nil } -// UpdateBackupConfigurationSlot - Updates the backup configuration of an app. +// UpdateBackupConfigurationSlot - Description for Updates the backup configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -23089,7 +23414,7 @@ func (client *WebAppsClient) updateBackupConfigurationSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -23104,9 +23429,9 @@ func (client *WebAppsClient) updateBackupConfigurationSlotHandleResponse(resp *h return result, nil } -// UpdateConfiguration - Updates the configuration of an app. +// UpdateConfiguration - Description for Updates the configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -23147,7 +23472,7 @@ func (client *WebAppsClient) updateConfigurationCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteConfig) @@ -23162,9 +23487,9 @@ func (client *WebAppsClient) updateConfigurationHandleResponse(resp *http.Respon return result, nil } -// UpdateConfigurationSlot - Updates the configuration of an app. +// UpdateConfigurationSlot - Description for Updates the configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -23210,7 +23535,7 @@ func (client *WebAppsClient) updateConfigurationSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteConfig) @@ -23225,9 +23550,9 @@ func (client *WebAppsClient) updateConfigurationSlotHandleResponse(resp *http.Re return result, nil } -// UpdateConnectionStrings - Replaces the connection strings of an app. +// UpdateConnectionStrings - Description for Replaces the connection strings of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -23268,7 +23593,7 @@ func (client *WebAppsClient) updateConnectionStringsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionStrings) @@ -23283,9 +23608,9 @@ func (client *WebAppsClient) updateConnectionStringsHandleResponse(resp *http.Re return result, nil } -// UpdateConnectionStringsSlot - Replaces the connection strings of an app. +// UpdateConnectionStringsSlot - Description for Replaces the connection strings of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -23332,7 +23657,7 @@ func (client *WebAppsClient) updateConnectionStringsSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionStrings) @@ -23347,9 +23672,9 @@ func (client *WebAppsClient) updateConnectionStringsSlotHandleResponse(resp *htt return result, nil } -// UpdateDiagnosticLogsConfig - Updates the logging configuration of an app. +// UpdateDiagnosticLogsConfig - Description for Updates the logging configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -23390,7 +23715,7 @@ func (client *WebAppsClient) updateDiagnosticLogsConfigCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteLogsConfig) @@ -23405,9 +23730,9 @@ func (client *WebAppsClient) updateDiagnosticLogsConfigHandleResponse(resp *http return result, nil } -// UpdateDiagnosticLogsConfigSlot - Updates the logging configuration of an app. +// UpdateDiagnosticLogsConfigSlot - Description for Updates the logging configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -23454,7 +23779,7 @@ func (client *WebAppsClient) updateDiagnosticLogsConfigSlotCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteLogsConfig) @@ -23469,9 +23794,10 @@ func (client *WebAppsClient) updateDiagnosticLogsConfigSlotHandleResponse(resp * return result, nil } -// UpdateDomainOwnershipIdentifier - Creates a domain ownership identifier for web app, or updates an existing ownership identifier. +// UpdateDomainOwnershipIdentifier - Description for Creates a domain ownership identifier for web app, or updates an existing +// ownership identifier. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // domainOwnershipIdentifierName - Name of domain ownership identifier. @@ -23517,7 +23843,7 @@ func (client *WebAppsClient) updateDomainOwnershipIdentifierCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) @@ -23532,10 +23858,10 @@ func (client *WebAppsClient) updateDomainOwnershipIdentifierHandleResponse(resp return result, nil } -// UpdateDomainOwnershipIdentifierSlot - Creates a domain ownership identifier for web app, or updates an existing ownership -// identifier. +// UpdateDomainOwnershipIdentifierSlot - Description for Creates a domain ownership identifier for web app, or updates an +// existing ownership identifier. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // domainOwnershipIdentifierName - Name of domain ownership identifier. @@ -23586,7 +23912,7 @@ func (client *WebAppsClient) updateDomainOwnershipIdentifierSlotCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) @@ -23601,9 +23927,9 @@ func (client *WebAppsClient) updateDomainOwnershipIdentifierSlotHandleResponse(r return result, nil } -// UpdateFtpAllowed - Updates whether FTP is allowed on the site or not. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -23643,7 +23969,7 @@ func (client *WebAppsClient) updateFtpAllowedCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity) @@ -23658,9 +23984,9 @@ func (client *WebAppsClient) updateFtpAllowedHandleResponse(resp *http.Response) return result, nil } -// UpdateFtpAllowedSlot - Updates whether FTP is allowed on the site or not. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -23704,7 +24030,7 @@ func (client *WebAppsClient) updateFtpAllowedSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity) @@ -23719,9 +24045,9 @@ func (client *WebAppsClient) updateFtpAllowedSlotHandleResponse(resp *http.Respo return result, nil } -// UpdateHybridConnection - Creates a new Hybrid Connection using a Service Bus relay. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -23772,7 +24098,7 @@ func (client *WebAppsClient) updateHybridConnectionCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -23787,9 +24113,9 @@ func (client *WebAppsClient) updateHybridConnectionHandleResponse(resp *http.Res return result, nil } -// UpdateHybridConnectionSlot - Creates a new Hybrid Connection using a Service Bus relay. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -23845,7 +24171,7 @@ func (client *WebAppsClient) updateHybridConnectionSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -23860,9 +24186,9 @@ func (client *WebAppsClient) updateHybridConnectionSlotHandleResponse(resp *http return result, nil } -// UpdateMetadata - Replaces the metadata of an app. +// UpdateMetadata - Description for Replaces the metadata of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -23902,7 +24228,7 @@ func (client *WebAppsClient) updateMetadataCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, metadata) @@ -23917,9 +24243,9 @@ func (client *WebAppsClient) updateMetadataHandleResponse(resp *http.Response) ( return result, nil } -// UpdateMetadataSlot - Replaces the metadata of an app. +// UpdateMetadataSlot - Description for Replaces the metadata of an app. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -23965,7 +24291,7 @@ func (client *WebAppsClient) updateMetadataSlotCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, metadata) @@ -23980,9 +24306,9 @@ func (client *WebAppsClient) updateMetadataSlotHandleResponse(resp *http.Respons return result, nil } -// UpdatePremierAddOn - Updates a named add-on of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // premierAddOnName - Add-on name. @@ -24028,7 +24354,7 @@ func (client *WebAppsClient) updatePremierAddOnCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, premierAddOn) @@ -24043,9 +24369,9 @@ func (client *WebAppsClient) updatePremierAddOnHandleResponse(resp *http.Respons return result, nil } -// UpdatePremierAddOnSlot - Updates a named add-on of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // premierAddOnName - Add-on name. @@ -24097,7 +24423,7 @@ func (client *WebAppsClient) updatePremierAddOnSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, premierAddOn) @@ -24112,9 +24438,10 @@ func (client *WebAppsClient) updatePremierAddOnSlotHandleResponse(resp *http.Res return result, nil } -// UpdateRelayServiceConnection - Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). +// UpdateRelayServiceConnection - Description for Creates a new hybrid connection configuration (PUT), or updates an existing +// one (PATCH). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // entityName - Name of the hybrid connection configuration. @@ -24160,7 +24487,7 @@ func (client *WebAppsClient) updateRelayServiceConnectionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -24175,9 +24502,10 @@ func (client *WebAppsClient) updateRelayServiceConnectionHandleResponse(resp *ht return result, nil } -// UpdateRelayServiceConnectionSlot - Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). +// UpdateRelayServiceConnectionSlot - Description for Creates a new hybrid connection configuration (PUT), or updates an existing +// one (PATCH). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // entityName - Name of the hybrid connection configuration. @@ -24229,7 +24557,7 @@ func (client *WebAppsClient) updateRelayServiceConnectionSlotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -24244,9 +24572,9 @@ func (client *WebAppsClient) updateRelayServiceConnectionSlotHandleResponse(resp return result, nil } -// UpdateScmAllowed - Updates whether user publishing credentials are allowed on the site or not. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -24286,7 +24614,7 @@ func (client *WebAppsClient) updateScmAllowedCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity) @@ -24301,9 +24629,9 @@ func (client *WebAppsClient) updateScmAllowedHandleResponse(resp *http.Response) return result, nil } -// UpdateScmAllowedSlot - Updates whether user publishing credentials are allowed on the site or not. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -24347,7 +24675,7 @@ func (client *WebAppsClient) updateScmAllowedSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity) @@ -24362,9 +24690,9 @@ func (client *WebAppsClient) updateScmAllowedSlotHandleResponse(resp *http.Respo return result, nil } -// UpdateSitePushSettings - Updates the Push settings associated with web app. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of web app. // pushSettings - Push settings associated with web app. @@ -24405,7 +24733,7 @@ func (client *WebAppsClient) updateSitePushSettingsCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, pushSettings) @@ -24420,9 +24748,9 @@ func (client *WebAppsClient) updateSitePushSettingsHandleResponse(resp *http.Res return result, nil } -// UpdateSitePushSettingsSlot - Updates the Push settings associated with web app. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -24468,7 +24796,7 @@ func (client *WebAppsClient) updateSitePushSettingsSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, pushSettings) @@ -24483,9 +24811,10 @@ func (client *WebAppsClient) updateSitePushSettingsSlotHandleResponse(resp *http return result, nil } -// UpdateSlot - Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. +// UpdateSlot - 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -24531,7 +24860,7 @@ func (client *WebAppsClient) updateSlotCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteEnvelope) @@ -24546,10 +24875,10 @@ func (client *WebAppsClient) updateSlotHandleResponse(resp *http.Response) (WebA return result, nil } -// UpdateSlotConfigurationNames - Updates the names of application settings and connection string that remain with the slot -// during swap operation. +// UpdateSlotConfigurationNames - Description for Updates the names of application settings and connection string that remain +// with the slot during swap operation. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -24590,7 +24919,7 @@ func (client *WebAppsClient) updateSlotConfigurationNamesCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, slotConfigNames) @@ -24605,9 +24934,9 @@ func (client *WebAppsClient) updateSlotConfigurationNamesHandleResponse(resp *ht return result, nil } -// UpdateSourceControl - Updates the source control configuration of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -24648,7 +24977,7 @@ func (client *WebAppsClient) updateSourceControlCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteSourceControl) @@ -24663,9 +24992,9 @@ func (client *WebAppsClient) updateSourceControlHandleResponse(resp *http.Respon return result, nil } -// UpdateSourceControlSlot - Updates the source control configuration of an app. +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -24712,7 +25041,7 @@ func (client *WebAppsClient) updateSourceControlSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, siteSourceControl) @@ -24727,11 +25056,11 @@ func (client *WebAppsClient) updateSourceControlSlotHandleResponse(resp *http.Re return result, nil } -// UpdateSwiftVirtualNetworkConnectionWithCheck - Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" -// is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is -// not in use by another App Service Plan other than the one this App is in. +// UpdateSwiftVirtualNetworkConnectionWithCheck - Description for Integrates this Web App with a Virtual Network. This requires +// that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been +// 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 2021-03-01 +// Generated from API version 2022-03-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. @@ -24772,7 +25101,7 @@ func (client *WebAppsClient) updateSwiftVirtualNetworkConnectionWithCheckCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -24787,12 +25116,12 @@ func (client *WebAppsClient) updateSwiftVirtualNetworkConnectionWithCheckHandleR return result, nil } -// UpdateSwiftVirtualNetworkConnectionWithCheckSlot - Integrates this Web App with a Virtual Network. This requires that 1) -// "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, -// and is -// not in use by another App Service Plan other than the one this App is in. +// UpdateSwiftVirtualNetworkConnectionWithCheckSlot - Description for Integrates this Web App with a Virtual Network. This +// requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already +// been +// 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 2021-03-01 +// Generated from API version 2022-03-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 @@ -24839,7 +25168,7 @@ func (client *WebAppsClient) updateSwiftVirtualNetworkConnectionWithCheckSlotCre return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -24854,9 +25183,10 @@ func (client *WebAppsClient) updateSwiftVirtualNetworkConnectionWithCheckSlotHan return result, nil } -// UpdateVnetConnection - Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). +// UpdateVnetConnection - Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection +// properties (PATCH). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of an existing Virtual Network. @@ -24902,7 +25232,7 @@ func (client *WebAppsClient) updateVnetConnectionCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -24917,9 +25247,9 @@ func (client *WebAppsClient) updateVnetConnectionHandleResponse(resp *http.Respo return result, nil } -// UpdateVnetConnectionGateway - Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of the Virtual Network. @@ -24970,7 +25300,7 @@ func (client *WebAppsClient) updateVnetConnectionGatewayCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -24985,9 +25315,9 @@ func (client *WebAppsClient) updateVnetConnectionGatewayHandleResponse(resp *htt return result, nil } -// UpdateVnetConnectionGatewaySlot - Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). +// 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 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of the Virtual Network. @@ -25044,7 +25374,7 @@ func (client *WebAppsClient) updateVnetConnectionGatewaySlotCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) @@ -25059,10 +25389,10 @@ func (client *WebAppsClient) updateVnetConnectionGatewaySlotHandleResponse(resp return result, nil } -// UpdateVnetConnectionSlot - Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties -// (PATCH). +// UpdateVnetConnectionSlot - Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection +// properties (PATCH). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // resourceGroupName - Name of the resource group to which the resource belongs. // name - Name of the app. // vnetName - Name of an existing Virtual Network. @@ -25114,7 +25444,7 @@ func (client *WebAppsClient) updateVnetConnectionSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectionEnvelope) diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_websitemanagement_client.go b/sdk/resourcemanager/appservice/armappservice/websitemanagement_client.go similarity index 94% rename from sdk/resourcemanager/appservice/armappservice/zz_generated_websitemanagement_client.go rename to sdk/resourcemanager/appservice/armappservice/websitemanagement_client.go index 26448ca1c748..d4418db45019 100644 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_websitemanagement_client.go +++ b/sdk/resourcemanager/appservice/armappservice/websitemanagement_client.go @@ -5,6 +5,7 @@ // 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 @@ -55,9 +56,9 @@ func NewWebSiteManagementClient(subscriptionID string, credential azcore.TokenCr return client, nil } -// CheckNameAvailability - Check if a resource name is available. +// CheckNameAvailability - Description for Check if a resource name is available. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // request - Name availability request. // options - WebSiteManagementClientCheckNameAvailabilityOptions contains the optional parameters for the WebSiteManagementClient.CheckNameAvailability // method. @@ -88,7 +89,7 @@ func (client *WebSiteManagementClient) checkNameAvailabilityCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -103,9 +104,9 @@ func (client *WebSiteManagementClient) checkNameAvailabilityHandleResponse(resp return result, nil } -// GetPublishingUser - Gets publishing user +// GetPublishingUser - Description for Gets publishing user // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - WebSiteManagementClientGetPublishingUserOptions contains the optional parameters for the WebSiteManagementClient.GetPublishingUser // method. func (client *WebSiteManagementClient) GetPublishingUser(ctx context.Context, options *WebSiteManagementClientGetPublishingUserOptions) (WebSiteManagementClientGetPublishingUserResponse, error) { @@ -131,7 +132,7 @@ func (client *WebSiteManagementClient) getPublishingUserCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -146,9 +147,9 @@ func (client *WebSiteManagementClient) getPublishingUserHandleResponse(resp *htt return result, nil } -// GetSourceControl - Gets source control token +// GetSourceControl - Description for Gets source control token // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // sourceControlType - Type of source control // options - WebSiteManagementClientGetSourceControlOptions contains the optional parameters for the WebSiteManagementClient.GetSourceControl // method. @@ -179,7 +180,7 @@ func (client *WebSiteManagementClient) getSourceControlCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -194,9 +195,9 @@ func (client *WebSiteManagementClient) getSourceControlHandleResponse(resp *http return result, nil } -// GetSubscriptionDeploymentLocations - Gets list of available geo regions plus ministamps +// 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 2021-03-01 +// Generated from API version 2022-03-01 // options - WebSiteManagementClientGetSubscriptionDeploymentLocationsOptions contains the optional parameters for the WebSiteManagementClient.GetSubscriptionDeploymentLocations // method. func (client *WebSiteManagementClient) GetSubscriptionDeploymentLocations(ctx context.Context, options *WebSiteManagementClientGetSubscriptionDeploymentLocationsOptions) (WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse, error) { @@ -226,7 +227,7 @@ func (client *WebSiteManagementClient) getSubscriptionDeploymentLocationsCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -241,9 +242,9 @@ func (client *WebSiteManagementClient) getSubscriptionDeploymentLocationsHandleR return result, nil } -// NewListBillingMetersPager - Gets a list of meters for a given location. +// NewListBillingMetersPager - Description for Gets a list of meters for a given location. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - WebSiteManagementClientListBillingMetersOptions contains the optional parameters for the WebSiteManagementClient.ListBillingMeters // method. func (client *WebSiteManagementClient) NewListBillingMetersPager(options *WebSiteManagementClientListBillingMetersOptions) *runtime.Pager[WebSiteManagementClientListBillingMetersResponse] { @@ -292,7 +293,7 @@ func (client *WebSiteManagementClient) listBillingMetersCreateRequest(ctx contex if options != nil && options.OSType != nil { reqQP.Set("osType", *options.OSType) } - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -309,7 +310,7 @@ func (client *WebSiteManagementClient) listBillingMetersHandleResponse(resp *htt // NewListCustomHostNameSitesPager - Get custom hostnames under this subscription // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - WebSiteManagementClientListCustomHostNameSitesOptions contains the optional parameters for the WebSiteManagementClient.ListCustomHostNameSites // method. func (client *WebSiteManagementClient) NewListCustomHostNameSitesPager(options *WebSiteManagementClientListCustomHostNameSitesOptions) *runtime.Pager[WebSiteManagementClientListCustomHostNameSitesResponse] { @@ -352,7 +353,10 @@ func (client *WebSiteManagementClient) listCustomHostNameSitesCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + if options != nil && options.Hostname != nil { + reqQP.Set("hostname", *options.Hostname) + } + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -367,9 +371,9 @@ func (client *WebSiteManagementClient) listCustomHostNameSitesHandleResponse(res return result, nil } -// NewListGeoRegionsPager - Get a list of available geographical regions. +// NewListGeoRegionsPager - Description for Get a list of available geographical regions. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - WebSiteManagementClientListGeoRegionsOptions contains the optional parameters for the WebSiteManagementClient.ListGeoRegions // method. func (client *WebSiteManagementClient) NewListGeoRegionsPager(options *WebSiteManagementClientListGeoRegionsOptions) *runtime.Pager[WebSiteManagementClientListGeoRegionsResponse] { @@ -424,7 +428,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", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -439,9 +443,9 @@ func (client *WebSiteManagementClient) listGeoRegionsHandleResponse(resp *http.R return result, nil } -// NewListPremierAddOnOffersPager - List all premier add-on offers. +// NewListPremierAddOnOffersPager - Description for List all premier add-on offers. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - WebSiteManagementClientListPremierAddOnOffersOptions contains the optional parameters for the WebSiteManagementClient.ListPremierAddOnOffers // method. func (client *WebSiteManagementClient) NewListPremierAddOnOffersPager(options *WebSiteManagementClientListPremierAddOnOffersOptions) *runtime.Pager[WebSiteManagementClientListPremierAddOnOffersResponse] { @@ -484,7 +488,7 @@ func (client *WebSiteManagementClient) listPremierAddOnOffersCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -499,9 +503,9 @@ func (client *WebSiteManagementClient) listPremierAddOnOffersHandleResponse(resp return result, nil } -// ListSKUs - List all SKUs. +// ListSKUs - Description for List all SKUs. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - WebSiteManagementClientListSKUsOptions contains the optional parameters for the WebSiteManagementClient.ListSKUs // method. func (client *WebSiteManagementClient) ListSKUs(ctx context.Context, options *WebSiteManagementClientListSKUsOptions) (WebSiteManagementClientListSKUsResponse, error) { @@ -531,7 +535,7 @@ func (client *WebSiteManagementClient) listSKUsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -546,9 +550,9 @@ func (client *WebSiteManagementClient) listSKUsHandleResponse(resp *http.Respons return result, nil } -// NewListSiteIdentifiersAssignedToHostNamePager - List all apps that are assigned to a hostname. +// NewListSiteIdentifiersAssignedToHostNamePager - Description for List all apps that are assigned to a hostname. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // nameIdentifier - Hostname information. // options - WebSiteManagementClientListSiteIdentifiersAssignedToHostNameOptions contains the optional parameters for the // WebSiteManagementClient.ListSiteIdentifiersAssignedToHostName method. @@ -592,7 +596,7 @@ func (client *WebSiteManagementClient) listSiteIdentifiersAssignedToHostNameCrea return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, nameIdentifier) @@ -607,9 +611,9 @@ func (client *WebSiteManagementClient) listSiteIdentifiersAssignedToHostNameHand return result, nil } -// NewListSourceControlsPager - Gets the source controls available for Azure websites. +// NewListSourceControlsPager - Description for Gets the source controls available for Azure websites. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // options - WebSiteManagementClientListSourceControlsOptions contains the optional parameters for the WebSiteManagementClient.ListSourceControls // method. func (client *WebSiteManagementClient) NewListSourceControlsPager(options *WebSiteManagementClientListSourceControlsOptions) *runtime.Pager[WebSiteManagementClientListSourceControlsResponse] { @@ -648,7 +652,7 @@ func (client *WebSiteManagementClient) listSourceControlsCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -663,9 +667,9 @@ func (client *WebSiteManagementClient) listSourceControlsHandleResponse(resp *ht return result, nil } -// Move - Move resources between resource groups. +// Move - Description for Move resources between resource groups. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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. @@ -700,15 +704,15 @@ func (client *WebSiteManagementClient) moveCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, moveResourceEnvelope) } -// UpdatePublishingUser - Updates publishing user +// UpdatePublishingUser - Description for Updates publishing user // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // userDetails - Details of publishing user // options - WebSiteManagementClientUpdatePublishingUserOptions contains the optional parameters for the WebSiteManagementClient.UpdatePublishingUser // method. @@ -735,7 +739,7 @@ func (client *WebSiteManagementClient) updatePublishingUserCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, userDetails) @@ -750,9 +754,9 @@ func (client *WebSiteManagementClient) updatePublishingUserHandleResponse(resp * return result, nil } -// UpdateSourceControl - Updates source control token +// UpdateSourceControl - Description for Updates source control token // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-01 // sourceControlType - Type of source control // requestMessage - Source control token information // options - WebSiteManagementClientUpdateSourceControlOptions contains the optional parameters for the WebSiteManagementClient.UpdateSourceControl @@ -784,7 +788,7 @@ func (client *WebSiteManagementClient) updateSourceControlCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, requestMessage) @@ -799,9 +803,9 @@ func (client *WebSiteManagementClient) updateSourceControlHandleResponse(resp *h return result, nil } -// Validate - Validate if a resource can be created. +// Validate - Description for Validate if a resource can be created. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -837,7 +841,7 @@ func (client *WebSiteManagementClient) validateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, validateRequest) @@ -852,9 +856,9 @@ func (client *WebSiteManagementClient) validateHandleResponse(resp *http.Respons return result, nil } -// ValidateMove - Validate whether a resource can be moved. +// ValidateMove - Description for Validate whether a resource can be moved. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 +// Generated from API version 2022-03-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 @@ -890,16 +894,16 @@ func (client *WebSiteManagementClient) validateMoveCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, moveResourceEnvelope) } -// VerifyHostingEnvironmentVnet - Verifies if this VNET is compatible with an App Service Environment by analyzing the Network -// Security Group rules. +// 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 2021-03-01 +// Generated from API version 2022-03-01 // parameters - VNET information // options - WebSiteManagementClientVerifyHostingEnvironmentVnetOptions contains the optional parameters for the WebSiteManagementClient.VerifyHostingEnvironmentVnet // method. @@ -930,7 +934,7 @@ func (client *WebSiteManagementClient) verifyHostingEnvironmentVnetCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") + reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitions_client.go b/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitions_client.go new file mode 100644 index 000000000000..17844b8d6e24 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitions_client.go @@ -0,0 +1,308 @@ +//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 + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "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" +) + +// WorkflowRunActionRepetitionsClient contains the methods for the WorkflowRunActionRepetitions group. +// Don't use this type directly, use NewWorkflowRunActionRepetitionsClient() instead. +type WorkflowRunActionRepetitionsClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewWorkflowRunActionRepetitionsClient creates a new instance of WorkflowRunActionRepetitionsClient 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 NewWorkflowRunActionRepetitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowRunActionRepetitionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &WorkflowRunActionRepetitionsClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// Get - Get a workflow run action repetition. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Site name. +// workflowName - The workflow name. +// runName - The workflow run name. +// actionName - The workflow action name. +// repetitionName - The workflow repetition. +// 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) { + req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, repetitionName, options) + if err != nil { + return WorkflowRunActionRepetitionsClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowRunActionRepetitionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowRunActionRepetitionsClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *WorkflowRunActionRepetitionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, options *WorkflowRunActionRepetitionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + if actionName == "" { + return nil, errors.New("parameter actionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{actionName}", url.PathEscape(actionName)) + if repetitionName == "" { + return nil, errors.New("parameter repetitionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{repetitionName}", url.PathEscape(repetitionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkflowRunActionRepetitionsClient) getHandleResponse(resp *http.Response) (WorkflowRunActionRepetitionsClientGetResponse, error) { + result := WorkflowRunActionRepetitionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowRunActionRepetitionDefinition); err != nil { + return WorkflowRunActionRepetitionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Get all of a workflow run action repetitions. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Site name. +// workflowName - The workflow name. +// runName - The workflow run name. +// actionName - The workflow action name. +// options - WorkflowRunActionRepetitionsClientListOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.List +// method. +func (client *WorkflowRunActionRepetitionsClient) NewListPager(resourceGroupName string, name string, workflowName string, runName string, actionName string, options *WorkflowRunActionRepetitionsClientListOptions) *runtime.Pager[WorkflowRunActionRepetitionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkflowRunActionRepetitionsClientListResponse]{ + More: func(page WorkflowRunActionRepetitionsClientListResponse) bool { + 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) + } + if err != nil { + return WorkflowRunActionRepetitionsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowRunActionRepetitionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowRunActionRepetitionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *WorkflowRunActionRepetitionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, options *WorkflowRunActionRepetitionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + if actionName == "" { + return nil, errors.New("parameter actionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{actionName}", url.PathEscape(actionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *WorkflowRunActionRepetitionsClient) listHandleResponse(resp *http.Response) (WorkflowRunActionRepetitionsClientListResponse, error) { + result := WorkflowRunActionRepetitionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowRunActionRepetitionDefinitionCollection); err != nil { + return WorkflowRunActionRepetitionsClientListResponse{}, err + } + return result, nil +} + +// NewListExpressionTracesPager - Lists a workflow run expression trace. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Site name. +// workflowName - The workflow name. +// runName - The workflow run name. +// actionName - The workflow action name. +// repetitionName - The workflow repetition. +// options - WorkflowRunActionRepetitionsClientListExpressionTracesOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.ListExpressionTraces +// method. +func (client *WorkflowRunActionRepetitionsClient) NewListExpressionTracesPager(resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, options *WorkflowRunActionRepetitionsClientListExpressionTracesOptions) *runtime.Pager[WorkflowRunActionRepetitionsClientListExpressionTracesResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkflowRunActionRepetitionsClientListExpressionTracesResponse]{ + More: func(page WorkflowRunActionRepetitionsClientListExpressionTracesResponse) bool { + 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) + } + if err != nil { + return WorkflowRunActionRepetitionsClientListExpressionTracesResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowRunActionRepetitionsClientListExpressionTracesResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowRunActionRepetitionsClientListExpressionTracesResponse{}, runtime.NewResponseError(resp) + } + return client.listExpressionTracesHandleResponse(resp) + }, + }) +} + +// listExpressionTracesCreateRequest creates the ListExpressionTraces request. +func (client *WorkflowRunActionRepetitionsClient) listExpressionTracesCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, options *WorkflowRunActionRepetitionsClientListExpressionTracesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + if actionName == "" { + return nil, errors.New("parameter actionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{actionName}", url.PathEscape(actionName)) + if repetitionName == "" { + return nil, errors.New("parameter repetitionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{repetitionName}", url.PathEscape(repetitionName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listExpressionTracesHandleResponse handles the ListExpressionTraces response. +func (client *WorkflowRunActionRepetitionsClient) listExpressionTracesHandleResponse(resp *http.Response) (WorkflowRunActionRepetitionsClientListExpressionTracesResponse, error) { + result := WorkflowRunActionRepetitionsClientListExpressionTracesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressionTraces); err != nil { + return WorkflowRunActionRepetitionsClientListExpressionTracesResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitionsrequesthistories_client.go b/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitionsrequesthistories_client.go new file mode 100644 index 000000000000..785dea56be6f --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitionsrequesthistories_client.go @@ -0,0 +1,228 @@ +//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 + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "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" +) + +// WorkflowRunActionRepetitionsRequestHistoriesClient contains the methods for the WorkflowRunActionRepetitionsRequestHistories group. +// Don't use this type directly, use NewWorkflowRunActionRepetitionsRequestHistoriesClient() instead. +type WorkflowRunActionRepetitionsRequestHistoriesClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewWorkflowRunActionRepetitionsRequestHistoriesClient creates a new instance of WorkflowRunActionRepetitionsRequestHistoriesClient 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 NewWorkflowRunActionRepetitionsRequestHistoriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowRunActionRepetitionsRequestHistoriesClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &WorkflowRunActionRepetitionsRequestHistoriesClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// Get - Gets a workflow run repetition request history. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Site name. +// workflowName - The workflow name. +// runName - The workflow run name. +// actionName - The workflow action name. +// repetitionName - The workflow repetition. +// requestHistoryName - The request history name. +// 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) { + req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, repetitionName, requestHistoryName, options) + if err != nil { + return WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *WorkflowRunActionRepetitionsRequestHistoriesClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, requestHistoryName string, options *WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + if actionName == "" { + return nil, errors.New("parameter actionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{actionName}", url.PathEscape(actionName)) + if repetitionName == "" { + return nil, errors.New("parameter repetitionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{repetitionName}", url.PathEscape(repetitionName)) + if requestHistoryName == "" { + return nil, errors.New("parameter requestHistoryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{requestHistoryName}", url.PathEscape(requestHistoryName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkflowRunActionRepetitionsRequestHistoriesClient) getHandleResponse(resp *http.Response) (WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse, error) { + result := WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RequestHistory); err != nil { + return WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List a workflow run repetition request history. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Site name. +// workflowName - The workflow name. +// runName - The workflow run name. +// actionName - The workflow action name. +// repetitionName - The workflow repetition. +// options - WorkflowRunActionRepetitionsRequestHistoriesClientListOptions contains the optional parameters for the WorkflowRunActionRepetitionsRequestHistoriesClient.List +// method. +func (client *WorkflowRunActionRepetitionsRequestHistoriesClient) NewListPager(resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, options *WorkflowRunActionRepetitionsRequestHistoriesClientListOptions) *runtime.Pager[WorkflowRunActionRepetitionsRequestHistoriesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkflowRunActionRepetitionsRequestHistoriesClientListResponse]{ + More: func(page WorkflowRunActionRepetitionsRequestHistoriesClientListResponse) bool { + 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) + } + if err != nil { + return WorkflowRunActionRepetitionsRequestHistoriesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowRunActionRepetitionsRequestHistoriesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowRunActionRepetitionsRequestHistoriesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *WorkflowRunActionRepetitionsRequestHistoriesClient) listCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, options *WorkflowRunActionRepetitionsRequestHistoriesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + if actionName == "" { + return nil, errors.New("parameter actionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{actionName}", url.PathEscape(actionName)) + if repetitionName == "" { + return nil, errors.New("parameter repetitionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{repetitionName}", url.PathEscape(repetitionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *WorkflowRunActionRepetitionsRequestHistoriesClient) listHandleResponse(resp *http.Response) (WorkflowRunActionRepetitionsRequestHistoriesClientListResponse, error) { + result := WorkflowRunActionRepetitionsRequestHistoriesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RequestHistoryListResult); err != nil { + return WorkflowRunActionRepetitionsRequestHistoriesClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/workflowrunactions_client.go b/sdk/resourcemanager/appservice/armappservice/workflowrunactions_client.go new file mode 100644 index 000000000000..c2d90de9f635 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/workflowrunactions_client.go @@ -0,0 +1,298 @@ +//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 + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkflowRunActionsClient contains the methods for the WorkflowRunActions group. +// Don't use this type directly, use NewWorkflowRunActionsClient() instead. +type WorkflowRunActionsClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewWorkflowRunActionsClient creates a new instance of WorkflowRunActionsClient 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 NewWorkflowRunActionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowRunActionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &WorkflowRunActionsClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// Get - Gets a workflow run action. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Site name. +// workflowName - The workflow name. +// runName - The workflow run name. +// 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) { + req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, options) + if err != nil { + return WorkflowRunActionsClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowRunActionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowRunActionsClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *WorkflowRunActionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, options *WorkflowRunActionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + if actionName == "" { + return nil, errors.New("parameter actionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{actionName}", url.PathEscape(actionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkflowRunActionsClient) getHandleResponse(resp *http.Response) (WorkflowRunActionsClientGetResponse, error) { + result := WorkflowRunActionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowRunAction); err != nil { + return WorkflowRunActionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets a list of workflow run actions. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-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 - WorkflowRunActionsClientListOptions contains the optional parameters for the WorkflowRunActionsClient.List method. +func (client *WorkflowRunActionsClient) NewListPager(resourceGroupName string, name string, workflowName string, runName string, options *WorkflowRunActionsClientListOptions) *runtime.Pager[WorkflowRunActionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkflowRunActionsClientListResponse]{ + More: func(page WorkflowRunActionsClientListResponse) bool { + 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) + } + if err != nil { + return WorkflowRunActionsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowRunActionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowRunActionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *WorkflowRunActionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, options *WorkflowRunActionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *WorkflowRunActionsClient) listHandleResponse(resp *http.Response) (WorkflowRunActionsClientListResponse, error) { + result := WorkflowRunActionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowRunActionListResult); err != nil { + return WorkflowRunActionsClientListResponse{}, err + } + return result, nil +} + +// NewListExpressionTracesPager - Lists a workflow run expression trace. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Site name. +// workflowName - The workflow name. +// runName - The workflow run name. +// actionName - The workflow action name. +// options - WorkflowRunActionsClientListExpressionTracesOptions contains the optional parameters for the WorkflowRunActionsClient.ListExpressionTraces +// method. +func (client *WorkflowRunActionsClient) NewListExpressionTracesPager(resourceGroupName string, name string, workflowName string, runName string, actionName string, options *WorkflowRunActionsClientListExpressionTracesOptions) *runtime.Pager[WorkflowRunActionsClientListExpressionTracesResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkflowRunActionsClientListExpressionTracesResponse]{ + More: func(page WorkflowRunActionsClientListExpressionTracesResponse) bool { + 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) + } + if err != nil { + return WorkflowRunActionsClientListExpressionTracesResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowRunActionsClientListExpressionTracesResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowRunActionsClientListExpressionTracesResponse{}, runtime.NewResponseError(resp) + } + return client.listExpressionTracesHandleResponse(resp) + }, + }) +} + +// listExpressionTracesCreateRequest creates the ListExpressionTraces request. +func (client *WorkflowRunActionsClient) listExpressionTracesCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, options *WorkflowRunActionsClientListExpressionTracesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + if actionName == "" { + return nil, errors.New("parameter actionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{actionName}", url.PathEscape(actionName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listExpressionTracesHandleResponse handles the ListExpressionTraces response. +func (client *WorkflowRunActionsClient) listExpressionTracesHandleResponse(resp *http.Response) (WorkflowRunActionsClientListExpressionTracesResponse, error) { + result := WorkflowRunActionsClientListExpressionTracesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressionTraces); err != nil { + return WorkflowRunActionsClientListExpressionTracesResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/workflowrunactionscoperepetitions_client.go b/sdk/resourcemanager/appservice/armappservice/workflowrunactionscoperepetitions_client.go new file mode 100644 index 000000000000..ca76b5607a61 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/workflowrunactionscoperepetitions_client.go @@ -0,0 +1,218 @@ +//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 + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "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" +) + +// WorkflowRunActionScopeRepetitionsClient contains the methods for the WorkflowRunActionScopeRepetitions group. +// Don't use this type directly, use NewWorkflowRunActionScopeRepetitionsClient() instead. +type WorkflowRunActionScopeRepetitionsClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewWorkflowRunActionScopeRepetitionsClient creates a new instance of WorkflowRunActionScopeRepetitionsClient 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 NewWorkflowRunActionScopeRepetitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowRunActionScopeRepetitionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &WorkflowRunActionScopeRepetitionsClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// Get - Get a workflow run action scoped repetition. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Site name. +// workflowName - The workflow name. +// runName - The workflow run name. +// actionName - The workflow action name. +// repetitionName - The workflow repetition. +// 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) { + req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, repetitionName, options) + if err != nil { + return WorkflowRunActionScopeRepetitionsClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowRunActionScopeRepetitionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowRunActionScopeRepetitionsClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *WorkflowRunActionScopeRepetitionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, options *WorkflowRunActionScopeRepetitionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + if actionName == "" { + return nil, errors.New("parameter actionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{actionName}", url.PathEscape(actionName)) + if repetitionName == "" { + return nil, errors.New("parameter repetitionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{repetitionName}", url.PathEscape(repetitionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkflowRunActionScopeRepetitionsClient) getHandleResponse(resp *http.Response) (WorkflowRunActionScopeRepetitionsClientGetResponse, error) { + result := WorkflowRunActionScopeRepetitionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowRunActionRepetitionDefinition); err != nil { + return WorkflowRunActionScopeRepetitionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List the workflow run action scoped repetitions. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Site name. +// workflowName - The workflow name. +// runName - The workflow run name. +// actionName - The workflow action name. +// options - WorkflowRunActionScopeRepetitionsClientListOptions contains the optional parameters for the WorkflowRunActionScopeRepetitionsClient.List +// method. +func (client *WorkflowRunActionScopeRepetitionsClient) NewListPager(resourceGroupName string, name string, workflowName string, runName string, actionName string, options *WorkflowRunActionScopeRepetitionsClientListOptions) *runtime.Pager[WorkflowRunActionScopeRepetitionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkflowRunActionScopeRepetitionsClientListResponse]{ + More: func(page WorkflowRunActionScopeRepetitionsClientListResponse) bool { + 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) + } + if err != nil { + return WorkflowRunActionScopeRepetitionsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowRunActionScopeRepetitionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowRunActionScopeRepetitionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *WorkflowRunActionScopeRepetitionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, options *WorkflowRunActionScopeRepetitionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + if actionName == "" { + return nil, errors.New("parameter actionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{actionName}", url.PathEscape(actionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *WorkflowRunActionScopeRepetitionsClient) listHandleResponse(resp *http.Response) (WorkflowRunActionScopeRepetitionsClientListResponse, error) { + result := WorkflowRunActionScopeRepetitionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowRunActionRepetitionDefinitionCollection); err != nil { + return WorkflowRunActionScopeRepetitionsClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/workflowruns_client.go b/sdk/resourcemanager/appservice/armappservice/workflowruns_client.go new file mode 100644 index 000000000000..64bc205dc1f0 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/workflowruns_client.go @@ -0,0 +1,260 @@ +//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 + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkflowRunsClient contains the methods for the WorkflowRuns group. +// Don't use this type directly, use NewWorkflowRunsClient() instead. +type WorkflowRunsClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewWorkflowRunsClient creates a new instance of WorkflowRunsClient 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 NewWorkflowRunsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowRunsClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &WorkflowRunsClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// Cancel - Cancels a workflow run. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-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) { + req, err := client.cancelCreateRequest(ctx, resourceGroupName, name, workflowName, runName, options) + if err != nil { + return WorkflowRunsClientCancelResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowRunsClientCancelResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowRunsClientCancelResponse{}, runtime.NewResponseError(resp) + } + return WorkflowRunsClientCancelResponse{}, nil +} + +// cancelCreateRequest creates the Cancel request. +func (client *WorkflowRunsClient) cancelCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, options *WorkflowRunsClientCancelOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/cancel" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets a workflow run. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-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) { + req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, runName, options) + if err != nil { + return WorkflowRunsClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowRunsClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowRunsClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *WorkflowRunsClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, options *WorkflowRunsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkflowRunsClient) getHandleResponse(resp *http.Response) (WorkflowRunsClientGetResponse, error) { + result := WorkflowRunsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowRun); err != nil { + return WorkflowRunsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets a list of workflow runs. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Site name. +// workflowName - The workflow name. +// options - WorkflowRunsClientListOptions contains the optional parameters for the WorkflowRunsClient.List method. +func (client *WorkflowRunsClient) NewListPager(resourceGroupName string, name string, workflowName string, options *WorkflowRunsClientListOptions) *runtime.Pager[WorkflowRunsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkflowRunsClientListResponse]{ + More: func(page WorkflowRunsClientListResponse) bool { + 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 + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowRunsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowRunsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *WorkflowRunsClient) listCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, options *WorkflowRunsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *WorkflowRunsClient) listHandleResponse(resp *http.Response) (WorkflowRunsClientListResponse, error) { + result := WorkflowRunsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowRunListResult); err != nil { + return WorkflowRunsClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/workflows_client.go b/sdk/resourcemanager/appservice/armappservice/workflows_client.go new file mode 100644 index 000000000000..a5e8403c1ff2 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/workflows_client.go @@ -0,0 +1,163 @@ +//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 + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "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" +) + +// WorkflowsClient contains the methods for the Workflows group. +// Don't use this type directly, use NewWorkflowsClient() instead. +type WorkflowsClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewWorkflowsClient creates a new instance of WorkflowsClient 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 NewWorkflowsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowsClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &WorkflowsClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// 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-03-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Site name. +// workflowName - The workflow name. +// keyType - The access key type. +// 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) { + req, err := client.regenerateAccessKeyCreateRequest(ctx, resourceGroupName, name, workflowName, keyType, options) + if err != nil { + return WorkflowsClientRegenerateAccessKeyResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowsClientRegenerateAccessKeyResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowsClientRegenerateAccessKeyResponse{}, runtime.NewResponseError(resp) + } + return WorkflowsClientRegenerateAccessKeyResponse{}, nil +} + +// regenerateAccessKeyCreateRequest creates the RegenerateAccessKey request. +func (client *WorkflowsClient) regenerateAccessKeyCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, keyType RegenerateActionParameter, options *WorkflowsClientRegenerateAccessKeyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/regenerateAccessKey" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, keyType) +} + +// Validate - Validates the workflow definition. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-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) { + req, err := client.validateCreateRequest(ctx, resourceGroupName, name, workflowName, validate, options) + if err != nil { + return WorkflowsClientValidateResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowsClientValidateResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowsClientValidateResponse{}, runtime.NewResponseError(resp) + } + return WorkflowsClientValidateResponse{}, nil +} + +// validateCreateRequest creates the Validate request. +func (client *WorkflowsClient) validateCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, validate Workflow, options *WorkflowsClientValidateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/validate" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, validate) +} diff --git a/sdk/resourcemanager/appservice/armappservice/workflowtriggerhistories_client.go b/sdk/resourcemanager/appservice/armappservice/workflowtriggerhistories_client.go new file mode 100644 index 000000000000..78b2e65cdedd --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/workflowtriggerhistories_client.go @@ -0,0 +1,293 @@ +//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 + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkflowTriggerHistoriesClient contains the methods for the WorkflowTriggerHistories group. +// Don't use this type directly, use NewWorkflowTriggerHistoriesClient() instead. +type WorkflowTriggerHistoriesClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewWorkflowTriggerHistoriesClient creates a new instance of WorkflowTriggerHistoriesClient 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 NewWorkflowTriggerHistoriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowTriggerHistoriesClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &WorkflowTriggerHistoriesClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// Get - Gets a workflow trigger history. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Site name. +// workflowName - The workflow name. +// triggerName - The workflow trigger name. +// historyName - The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. +// 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) { + req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, historyName, options) + if err != nil { + return WorkflowTriggerHistoriesClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowTriggerHistoriesClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowTriggerHistoriesClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *WorkflowTriggerHistoriesClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, historyName string, options *WorkflowTriggerHistoriesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if triggerName == "" { + return nil, errors.New("parameter triggerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{triggerName}", url.PathEscape(triggerName)) + if historyName == "" { + return nil, errors.New("parameter historyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{historyName}", url.PathEscape(historyName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkflowTriggerHistoriesClient) getHandleResponse(resp *http.Response) (WorkflowTriggerHistoriesClientGetResponse, error) { + result := WorkflowTriggerHistoriesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowTriggerHistory); err != nil { + return WorkflowTriggerHistoriesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets a list of workflow trigger histories. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-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 - WorkflowTriggerHistoriesClientListOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.List +// method. +func (client *WorkflowTriggerHistoriesClient) NewListPager(resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggerHistoriesClientListOptions) *runtime.Pager[WorkflowTriggerHistoriesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkflowTriggerHistoriesClientListResponse]{ + More: func(page WorkflowTriggerHistoriesClientListResponse) bool { + 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 + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowTriggerHistoriesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowTriggerHistoriesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *WorkflowTriggerHistoriesClient) listCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggerHistoriesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if triggerName == "" { + return nil, errors.New("parameter triggerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{triggerName}", url.PathEscape(triggerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *WorkflowTriggerHistoriesClient) listHandleResponse(resp *http.Response) (WorkflowTriggerHistoriesClientListResponse, error) { + result := WorkflowTriggerHistoriesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowTriggerHistoryListResult); err != nil { + return WorkflowTriggerHistoriesClientListResponse{}, err + } + return result, nil +} + +// 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-03-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Site name. +// workflowName - The workflow name. +// triggerName - The workflow trigger name. +// historyName - The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. +// options - WorkflowTriggerHistoriesClientBeginResubmitOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.BeginResubmit +// method. +func (client *WorkflowTriggerHistoriesClient) BeginResubmit(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, historyName string, options *WorkflowTriggerHistoriesClientBeginResubmitOptions) (*runtime.Poller[WorkflowTriggerHistoriesClientResubmitResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.resubmit(ctx, resourceGroupName, name, workflowName, triggerName, historyName, options) + if err != nil { + return nil, err + } + return runtime.NewPoller[WorkflowTriggerHistoriesClientResubmitResponse](resp, client.pl, nil) + } else { + return runtime.NewPollerFromResumeToken[WorkflowTriggerHistoriesClientResubmitResponse](options.ResumeToken, client.pl, nil) + } +} + +// 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-03-01 +func (client *WorkflowTriggerHistoriesClient) resubmit(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, historyName string, options *WorkflowTriggerHistoriesClientBeginResubmitOptions) (*http.Response, error) { + req, err := client.resubmitCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, historyName, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusAccepted) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// resubmitCreateRequest creates the Resubmit request. +func (client *WorkflowTriggerHistoriesClient) resubmitCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, historyName string, options *WorkflowTriggerHistoriesClientBeginResubmitOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if triggerName == "" { + return nil, errors.New("parameter triggerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{triggerName}", url.PathEscape(triggerName)) + if historyName == "" { + return nil, errors.New("parameter historyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{historyName}", url.PathEscape(historyName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-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.go b/sdk/resourcemanager/appservice/armappservice/workflowtriggers_client.go new file mode 100644 index 000000000000..93fd0d967d14 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/workflowtriggers_client.go @@ -0,0 +1,410 @@ +//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 + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkflowTriggersClient contains the methods for the WorkflowTriggers group. +// Don't use this type directly, use NewWorkflowTriggersClient() instead. +type WorkflowTriggersClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewWorkflowTriggersClient creates a new instance of WorkflowTriggersClient 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 NewWorkflowTriggersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowTriggersClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &WorkflowTriggersClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// Get - Gets a workflow trigger. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-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) { + req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, options) + if err != nil { + return WorkflowTriggersClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowTriggersClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowTriggersClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *WorkflowTriggersClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if triggerName == "" { + return nil, errors.New("parameter triggerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{triggerName}", url.PathEscape(triggerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkflowTriggersClient) getHandleResponse(resp *http.Response) (WorkflowTriggersClientGetResponse, error) { + result := WorkflowTriggersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowTrigger); err != nil { + return WorkflowTriggersClientGetResponse{}, err + } + return result, nil +} + +// GetSchemaJSON - Get the trigger schema as JSON. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-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 - 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) { + req, err := client.getSchemaJSONCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, options) + if err != nil { + return WorkflowTriggersClientGetSchemaJSONResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowTriggersClientGetSchemaJSONResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowTriggersClientGetSchemaJSONResponse{}, runtime.NewResponseError(resp) + } + return client.getSchemaJSONHandleResponse(resp) +} + +// getSchemaJSONCreateRequest creates the GetSchemaJSON request. +func (client *WorkflowTriggersClient) getSchemaJSONCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggersClientGetSchemaJSONOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/schemas/json" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if triggerName == "" { + return nil, errors.New("parameter triggerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{triggerName}", url.PathEscape(triggerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSchemaJSONHandleResponse handles the GetSchemaJSON response. +func (client *WorkflowTriggersClient) getSchemaJSONHandleResponse(resp *http.Response) (WorkflowTriggersClientGetSchemaJSONResponse, error) { + result := WorkflowTriggersClientGetSchemaJSONResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JSONSchema); err != nil { + return WorkflowTriggersClientGetSchemaJSONResponse{}, err + } + return result, nil +} + +// NewListPager - Gets a list of workflow triggers. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Site name. +// workflowName - The workflow name. +// options - WorkflowTriggersClientListOptions contains the optional parameters for the WorkflowTriggersClient.List method. +func (client *WorkflowTriggersClient) NewListPager(resourceGroupName string, name string, workflowName string, options *WorkflowTriggersClientListOptions) *runtime.Pager[WorkflowTriggersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkflowTriggersClientListResponse]{ + More: func(page WorkflowTriggersClientListResponse) bool { + 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 + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowTriggersClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowTriggersClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *WorkflowTriggersClient) listCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, options *WorkflowTriggersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *WorkflowTriggersClient) listHandleResponse(resp *http.Response) (WorkflowTriggersClientListResponse, error) { + result := WorkflowTriggersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowTriggerListResult); err != nil { + return WorkflowTriggersClientListResponse{}, err + } + return result, nil +} + +// ListCallbackURL - Get the callback URL for a workflow trigger. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-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 - 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) { + req, err := client.listCallbackURLCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, options) + if err != nil { + return WorkflowTriggersClientListCallbackURLResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowTriggersClientListCallbackURLResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowTriggersClientListCallbackURLResponse{}, runtime.NewResponseError(resp) + } + return client.listCallbackURLHandleResponse(resp) +} + +// listCallbackURLCreateRequest creates the ListCallbackURL request. +func (client *WorkflowTriggersClient) listCallbackURLCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggersClientListCallbackURLOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if triggerName == "" { + return nil, errors.New("parameter triggerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{triggerName}", url.PathEscape(triggerName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listCallbackURLHandleResponse handles the ListCallbackURL response. +func (client *WorkflowTriggersClient) listCallbackURLHandleResponse(resp *http.Response) (WorkflowTriggersClientListCallbackURLResponse, error) { + result := WorkflowTriggersClientListCallbackURLResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowTriggerCallbackURL); err != nil { + return WorkflowTriggersClientListCallbackURLResponse{}, err + } + return result, nil +} + +// BeginRun - Runs a workflow trigger. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-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 - WorkflowTriggersClientBeginRunOptions contains the optional parameters for the WorkflowTriggersClient.BeginRun +// method. +func (client *WorkflowTriggersClient) BeginRun(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggersClientBeginRunOptions) (*runtime.Poller[WorkflowTriggersClientRunResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.run(ctx, resourceGroupName, name, workflowName, triggerName, options) + if err != nil { + return nil, err + } + return runtime.NewPoller[WorkflowTriggersClientRunResponse](resp, client.pl, nil) + } else { + return runtime.NewPollerFromResumeToken[WorkflowTriggersClientRunResponse](options.ResumeToken, client.pl, nil) + } +} + +// Run - Runs a workflow trigger. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 +func (client *WorkflowTriggersClient) run(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggersClientBeginRunOptions) (*http.Response, error) { + req, err := client.runCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// runCreateRequest creates the Run request. +func (client *WorkflowTriggersClient) runCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggersClientBeginRunOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/run" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if triggerName == "" { + return nil, errors.New("parameter triggerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{triggerName}", url.PathEscape(triggerName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/workflowversions_client.go b/sdk/resourcemanager/appservice/armappservice/workflowversions_client.go new file mode 100644 index 000000000000..01ccc17530eb --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/workflowversions_client.go @@ -0,0 +1,200 @@ +//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 + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkflowVersionsClient contains the methods for the WorkflowVersions group. +// Don't use this type directly, use NewWorkflowVersionsClient() instead. +type WorkflowVersionsClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewWorkflowVersionsClient creates a new instance of WorkflowVersionsClient 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 NewWorkflowVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowVersionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &WorkflowVersionsClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// Get - Gets a workflow version. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-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) { + req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, versionID, options) + if err != nil { + return WorkflowVersionsClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowVersionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowVersionsClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *WorkflowVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, versionID string, options *WorkflowVersionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if versionID == "" { + return nil, errors.New("parameter versionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{versionId}", url.PathEscape(versionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkflowVersionsClient) getHandleResponse(resp *http.Response) (WorkflowVersionsClientGetResponse, error) { + result := WorkflowVersionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowVersion); err != nil { + return WorkflowVersionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets a list of workflow versions. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 +// resourceGroupName - Name of the resource group to which the resource belongs. +// name - Site name. +// workflowName - The workflow name. +// options - WorkflowVersionsClientListOptions contains the optional parameters for the WorkflowVersionsClient.List method. +func (client *WorkflowVersionsClient) NewListPager(resourceGroupName string, name string, workflowName string, options *WorkflowVersionsClientListOptions) *runtime.Pager[WorkflowVersionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkflowVersionsClientListResponse]{ + More: func(page WorkflowVersionsClientListResponse) bool { + 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) + } + if err != nil { + return WorkflowVersionsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WorkflowVersionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WorkflowVersionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *WorkflowVersionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, options *WorkflowVersionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-03-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *WorkflowVersionsClient) listHandleResponse(resp *http.Response) (WorkflowVersionsClientListResponse, error) { + result := WorkflowVersionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowVersionListResult); err != nil { + return WorkflowVersionsClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_appserviceenvironments_client_test.go b/sdk/resourcemanager/appservice/armappservice/ze_generated_example_appserviceenvironments_client_test.go deleted file mode 100644 index 77fea1158edc..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_appserviceenvironments_client_test.go +++ /dev/null @@ -1,69 +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. - -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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetInboundNetworkDependenciesEndpointsPager("Sample-WestUSResourceGroup", - "SampleAse", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetOutboundNetworkDependenciesEndpointsPager("Sample-WestUSResourceGroup", - "SampleAse", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_appserviceplans_client_test.go b/sdk/resourcemanager/appservice/armappservice/ze_generated_example_appserviceplans_client_test.go deleted file mode 100644 index cca27f928f24..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_appserviceplans_client_test.go +++ /dev/null @@ -1,173 +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. - -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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewPlansClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(&armappservice.PlansClientListOptions{Detailed: nil}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewPlansClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("testrg123", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewPlansClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testrg123", - "testsf6141", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewPlansClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewPlansClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.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/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewPlansClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.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) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_certificateordersdiagnostics_client_test.go b/sdk/resourcemanager/appservice/armappservice/ze_generated_example_certificateordersdiagnostics_client_test.go deleted file mode 100644 index 201a77656a64..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_certificateordersdiagnostics_client_test.go +++ /dev/null @@ -1,69 +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. - -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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-03-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() - client, err := armappservice.NewCertificateOrdersDiagnosticsClient("5700fc96-77b4-4f8d-afce-c353d8c443bd", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAppServiceCertificateOrderDetectorResponsePager("Sample-WestUSResourceGroup", - "SampleCertificateOrderName", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-03-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() - client, err := armappservice.NewCertificateOrdersDiagnosticsClient("5700fc96-77b4-4f8d-afce-c353d8c443bd", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.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) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_certificateregistrationprovider_client_test.go b/sdk/resourcemanager/appservice/armappservice/ze_generated_example_certificateregistrationprovider_client_test.go deleted file mode 100644 index b8c997369266..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_certificateregistrationprovider_client_test.go +++ /dev/null @@ -1,41 +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. - -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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-03-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() - client, err := armappservice.NewCertificateRegistrationProviderClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListOperationsPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_certificates_client_test.go b/sdk/resourcemanager/appservice/armappservice/ze_generated_example_certificates_client_test.go deleted file mode 100644 index d6dfb90b850c..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_certificates_client_test.go +++ /dev/null @@ -1,166 +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. - -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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewCertificatesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(&armappservice.CertificatesClientListOptions{Filter: nil}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewCertificatesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("testrg123", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewCertificatesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testrg123", - "testc6282", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewCertificatesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewCertificatesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.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/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewCertificatesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.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) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_containerapps_client_test.go b/sdk/resourcemanager/appservice/armappservice/ze_generated_example_containerapps_client_test.go deleted file mode 100644 index 2428623d20e0..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_containerapps_client_test.go +++ /dev/null @@ -1,198 +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. - -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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewContainerAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBySubscriptionPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewContainerAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewContainerAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "rg", - "testcontainerApp0", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewContainerAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewContainerAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewContainerAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListSecrets(ctx, - "testcontainerApp0", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_containerappsrevisions_client_test.go b/sdk/resourcemanager/appservice/armappservice/ze_generated_example_containerappsrevisions_client_test.go deleted file mode 100644 index 59d0344d5aa7..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_containerappsrevisions_client_test.go +++ /dev/null @@ -1,129 +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. - -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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewContainerAppsRevisionsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListRevisionsPager("rg", - "testcontainerApp0", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewContainerAppsRevisionsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetRevision(ctx, - "rg", - "testcontainerApp0", - "testcontainerApp0-pjxhsye", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewContainerAppsRevisionsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.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/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewContainerAppsRevisionsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.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/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewContainerAppsRevisionsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.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/ze_generated_example_deletedwebapps_client_test.go b/sdk/resourcemanager/appservice/armappservice/ze_generated_example_deletedwebapps_client_test.go deleted file mode 100644 index 1022e65cb926..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_deletedwebapps_client_test.go +++ /dev/null @@ -1,64 +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. - -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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewDeletedWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByLocationPager("West US 2", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewDeletedWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetDeletedWebAppByLocation(ctx, - "West US 2", - "9", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_diagnostics_client_test.go b/sdk/resourcemanager/appservice/armappservice/ze_generated_example_diagnostics_client_test.go deleted file mode 100644 index eafc6a99021e..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_diagnostics_client_test.go +++ /dev/null @@ -1,593 +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. - -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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListHostingEnvironmentDetectorResponsesPager("Sample-WestUSResourceGroup", - "SampleAppServiceEnvironment", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDetectorResponses.json -func ExampleDiagnosticsClient_NewListSiteDetectorResponsesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListSiteDetectorResponsesPager("Sample-WestUSResourceGroup", - "SampleApp", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDetectorResponse.json -func ExampleDiagnosticsClient_GetSiteDetectorResponse() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDiagnosticCategories.json -func ExampleDiagnosticsClient_NewListSiteDiagnosticCategoriesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListSiteDiagnosticCategoriesPager("Sample-WestUSResourceGroup", - "SampleApp", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDiagnosticCategory.json -func ExampleDiagnosticsClient_GetSiteDiagnosticCategory() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetSiteDiagnosticCategory(ctx, - "Sample-WestUSResourceGroup", - "SampleApp", - "availability", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteAnalyses.json -func ExampleDiagnosticsClient_NewListSiteAnalysesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListSiteAnalysesPager("Sample-WestUSResourceGroup", - "SampleApp", - "availability", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteAnalysis.json -func ExampleDiagnosticsClient_GetSiteAnalysis() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetSiteAnalysis(ctx, - "Sample-WestUSResourceGroup", - "SampleApp", - "availability", - "appanalysis", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ExecuteSiteAnalysis.json -func ExampleDiagnosticsClient_ExecuteSiteAnalysis() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDetectors.json -func ExampleDiagnosticsClient_NewListSiteDetectorsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListSiteDetectorsPager("Sample-WestUSResourceGroup", - "SampleApp", - "availability", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDetector.json -func ExampleDiagnosticsClient_GetSiteDetector() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetSiteDetector(ctx, - "Sample-WestUSResourceGroup", - "SampleApp", - "availability", - "sitecrashes", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ExecuteSiteDetector.json -func ExampleDiagnosticsClient_ExecuteSiteDetector() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDetectorResponses.json -func ExampleDiagnosticsClient_NewListSiteDetectorResponsesSlotPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListSiteDetectorResponsesSlotPager("Sample-WestUSResourceGroup", - "SampleApp", - "staging", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDetectorResponse.json -func ExampleDiagnosticsClient_GetSiteDetectorResponseSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetSiteDetectorResponseSlot(ctx, - "Sample-WestUSResourceGroup", - "SampleApp", - "runtimeavailability", - "staging", - &armappservice.DiagnosticsClientGetSiteDetectorResponseSlotOptions{StartTime: nil, - EndTime: nil, - TimeGrain: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDiagnosticCategories.json -func ExampleDiagnosticsClient_NewListSiteDiagnosticCategoriesSlotPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListSiteDiagnosticCategoriesSlotPager("Sample-WestUSResourceGroup", - "SampleApp", - "Production", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDiagnosticCategory.json -func ExampleDiagnosticsClient_GetSiteDiagnosticCategorySlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetSiteDiagnosticCategorySlot(ctx, - "Sample-WestUSResourceGroup", - "SampleApp", - "availability", - "Production", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteAnalyses.json -func ExampleDiagnosticsClient_NewListSiteAnalysesSlotPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListSiteAnalysesSlotPager("Sample-WestUSResourceGroup", - "SampleApp", - "availability", - "Production", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteAnalysis.json -func ExampleDiagnosticsClient_GetSiteAnalysisSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetSiteAnalysisSlot(ctx, - "Sample-WestUSResourceGroup", - "SampleApp", - "availability", - "appanalysis", - "Production", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ExecuteSiteAnalysis.json -func ExampleDiagnosticsClient_ExecuteSiteAnalysisSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ExecuteSiteAnalysisSlot(ctx, - "Sample-WestUSResourceGroup", - "SampleApp", - "availability", - "apprestartanalyses", - "Production", - &armappservice.DiagnosticsClientExecuteSiteAnalysisSlotOptions{StartTime: nil, - EndTime: nil, - TimeGrain: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDetectors.json -func ExampleDiagnosticsClient_NewListSiteDetectorsSlotPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListSiteDetectorsSlotPager("Sample-WestUSResourceGroup", - "SampleApp", - "availability", - "Production", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDetector.json -func ExampleDiagnosticsClient_GetSiteDetectorSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetSiteDetectorSlot(ctx, - "Sample-WestUSResourceGroup", - "SampleApp", - "availability", - "sitecrashes", - "Production", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ExecuteSiteDetector.json -func ExampleDiagnosticsClient_ExecuteSiteDetectorSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewDiagnosticsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ExecuteSiteDetectorSlot(ctx, - "Sample-WestUSResourceGroup", - "SampleApp", - "sitecrashes", - "availability", - "Production", - &armappservice.DiagnosticsClientExecuteSiteDetectorSlotOptions{StartTime: nil, - EndTime: nil, - TimeGrain: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_domainregistrationprovider_client_test.go b/sdk/resourcemanager/appservice/armappservice/ze_generated_example_domainregistrationprovider_client_test.go deleted file mode 100644 index 5168287755b2..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_domainregistrationprovider_client_test.go +++ /dev/null @@ -1,41 +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. - -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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-03-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() - client, err := armappservice.NewDomainRegistrationProviderClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListOperationsPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_domains_client_test.go b/sdk/resourcemanager/appservice/armappservice/ze_generated_example_domains_client_test.go deleted file mode 100644 index 28cef258f68e..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_domains_client_test.go +++ /dev/null @@ -1,59 +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. - -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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-03-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() - client, err := armappservice.NewDomainsClient("3dddfa4f-cedf-4dc0-ba29-b6d1a69ab545", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.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/tree/main/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-03-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() - client, err := armappservice.NewDomainsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.TransferOut(ctx, - "testrg123", - "example.com", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_global_client_test.go b/sdk/resourcemanager/appservice/armappservice/ze_generated_example_global_client_test.go deleted file mode 100644 index 079ef4cbe10c..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_global_client_test.go +++ /dev/null @@ -1,79 +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. - -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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewGlobalClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetDeletedWebApp(ctx, - "9", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewGlobalClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetDeletedWebAppSnapshots(ctx, - "9", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewGlobalClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.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/ze_generated_example_kubeenvironments_client_test.go b/sdk/resourcemanager/appservice/armappservice/ze_generated_example_kubeenvironments_client_test.go deleted file mode 100644 index 97f7771ecde7..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_kubeenvironments_client_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. - -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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewKubeEnvironmentsClient("8efdecc5-919e-44eb-b179-915dca89ebf9", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBySubscriptionPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewKubeEnvironmentsClient("8efdecc5-919e-44eb-b179-915dca89ebf9", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("examplerg", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewKubeEnvironmentsClient("8efdecc5-919e-44eb-b179-915dca89ebf9", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "examplerg", - "jlaw-demo1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewKubeEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewKubeEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewKubeEnvironmentsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.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) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_provider_client_test.go b/sdk/resourcemanager/appservice/armappservice/ze_generated_example_provider_client_test.go deleted file mode 100644 index 70d872720bef..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_provider_client_test.go +++ /dev/null @@ -1,139 +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. - -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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewProviderClient("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetFunctionAppStacksPager(&armappservice.ProviderClientGetFunctionAppStacksOptions{StackOsType: nil}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewProviderClient("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetFunctionAppStacksForLocationPager("westus", - &armappservice.ProviderClientGetFunctionAppStacksForLocationOptions{StackOsType: nil}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewProviderClient("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetWebAppStacksForLocationPager("westus", - &armappservice.ProviderClientGetWebAppStacksForLocationOptions{StackOsType: nil}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewProviderClient("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListOperationsPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewProviderClient("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetWebAppStacksPager(&armappservice.ProviderClientGetWebAppStacksOptions{StackOsType: nil}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_resourcehealthmetadata_client_test.go b/sdk/resourcemanager/appservice/armappservice/ze_generated_example_resourcehealthmetadata_client_test.go deleted file mode 100644 index b4f6379b3165..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_resourcehealthmetadata_client_test.go +++ /dev/null @@ -1,164 +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. - -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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewResourceHealthMetadataClient("4adb32ad-8327-4cbb-b775-b84b4465bb38", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewResourceHealthMetadataClient("4adb32ad-8327-4cbb-b775-b84b4465bb38", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("Default-Web-NorthCentralUS", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewResourceHealthMetadataClient("4adb32ad-8327-4cbb-b775-b84b4465bb38", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBySitePager("Default-Web-NorthCentralUS", - "newsiteinnewASE-NCUS", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewResourceHealthMetadataClient("4adb32ad-8327-4cbb-b775-b84b4465bb38", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetBySite(ctx, - "Default-Web-NorthCentralUS", - "newsiteinnewASE-NCUS", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListResourceHealthMetadataBySite.json -func ExampleResourceHealthMetadataClient_NewListBySiteSlotPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewResourceHealthMetadataClient("4adb32ad-8327-4cbb-b775-b84b4465bb38", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBySiteSlotPager("Default-Web-NorthCentralUS", - "newsiteinnewASE-NCUS", - "Production", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetResourceHealthMetadataBySite.json -func ExampleResourceHealthMetadataClient_GetBySiteSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewResourceHealthMetadataClient("4adb32ad-8327-4cbb-b775-b84b4465bb38", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetBySiteSlot(ctx, - "Default-Web-NorthCentralUS", - "newsiteinnewASE-NCUS", - "Production", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_staticsites_client_test.go b/sdk/resourcemanager/appservice/armappservice/ze_generated_example_staticsites_client_test.go deleted file mode 100644 index 1b157465e3ee..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_staticsites_client_test.go +++ /dev/null @@ -1,1264 +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. - -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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetStaticSitesByResourceGroupPager("rg", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetStaticSite(ctx, - "rg", - "testStaticSite0", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateStaticSite(ctx, - "rg", - "testStaticSite0", - armappservice.StaticSitePatchResource{ - Properties: &armappservice.StaticSite{}, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListStaticSiteUsersPager("rg", - "testStaticSite0", - "all", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.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/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetStaticSiteBuildsPager("rg", - "testStaticSite0", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetStaticSiteBuild(ctx, - "rg", - "testStaticSite0", - "12", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListStaticSiteBuildFunctionsPager("rg", - "testStaticSite0", - "default", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListStaticSiteBuildAppSettings(ctx, - "rg", - "testStaticSite0", - "12", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListStaticSiteBuildFunctionAppSettings(ctx, - "rg", - "testStaticSite0", - "12", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetUserProvidedFunctionAppsForStaticSiteBuildPager("rg", - "testStaticSite0", - "default", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetUserProvidedFunctionAppForStaticSiteBuild(ctx, - "rg", - "testStaticSite0", - "default", - "testFunctionApp", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.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/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListStaticSiteCustomDomainsPager("rg", - "testStaticSite0", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetStaticSiteCustomDomain(ctx, - "rg", - "testStaticSite0", - "custom.domain.net", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListStaticSiteFunctionsPager("rg", - "testStaticSite0", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListStaticSiteAppSettings(ctx, - "rg", - "testStaticSite0", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListStaticSiteConfiguredRoles(ctx, - "rg", - "testStaticSite0", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListStaticSiteFunctionAppSettings(ctx, - "rg", - "testStaticSite0", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListStaticSiteSecrets(ctx, - "rg", - "testStaticSite0", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetPrivateEndpointConnectionListPager("rg", - "testStaticSite0", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetPrivateEndpointConnection(ctx, - "rg", - "testSite", - "connection", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetPrivateLinkResources(ctx, - "rg", - "testSite", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetUserProvidedFunctionAppsForStaticSitePager("rg", - "testStaticSite0", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetUserProvidedFunctionAppForStaticSite(ctx, - "rg", - "testStaticSite0", - "testFunctionApp", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.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/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewStaticSitesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_topleveldomains_client_test.go b/sdk/resourcemanager/appservice/armappservice/ze_generated_example_topleveldomains_client_test.go deleted file mode 100644 index 6e2bb55a2818..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_topleveldomains_client_test.go +++ /dev/null @@ -1,92 +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. - -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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-03-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() - client, err := armappservice.NewTopLevelDomainsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-03-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() - client, err := armappservice.NewTopLevelDomainsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "com", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-03-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() - client, err := armappservice.NewTopLevelDomainsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAgreementsPager("in", - armappservice.TopLevelDomainAgreementOption{ - ForTransfer: to.Ptr(false), - IncludePrivacy: to.Ptr(true), - }, - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_webapps_client_test.go b/sdk/resourcemanager/appservice/armappservice/ze_generated_example_webapps_client_test.go deleted file mode 100644 index 482cf335f46e..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_webapps_client_test.go +++ /dev/null @@ -1,1079 +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. - -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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("3fb8d758-2e2c-42e9-a528-a8acdfe87237", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBasicPublishingCredentialsPoliciesPager("testrg123", - "testsite", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetFtpAllowed(ctx, - "rg", - "testSite", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetPublishingCredentialsPolicy.json -func ExampleWebAppsClient_GetScmAllowed() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetScmAllowed(ctx, - "rg", - "testSite", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/UpdatePublishingCredentialsPolicy.json -func ExampleWebAppsClient_UpdateScmAllowed() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateScmAllowed(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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetAppSettingsKeyVaultReferencesPager("testrg123", - "testc6282", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetAppSettingKeyVaultReference(ctx, - "testrg123", - "testc6282", - "setting", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetInstanceInfo(ctx, - "testrg123", - "tests346", - "134987120", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListSiteBackupsPager("testrg123", - "tests346", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetNetworkTraceOperation(ctx, - "testrg123", - "SampleApp", - "c291433b-53ad-4c49-8cae-0a293eae1c6d", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.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/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetNetworkTraces(ctx, - "testrg123", - "SampleApp", - "c291433b-53ad-4c49-8cae-0a293eae1c6d", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebSiteNetworkTraceOperation.json -func ExampleWebAppsClient_GetNetworkTraceOperationV2() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetNetworkTraceOperationV2(ctx, - "testrg123", - "SampleApp", - "c291433b-53ad-4c49-8cae-0a293eae1c6d", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebSiteNetworkTraces.json -func ExampleWebAppsClient_GetNetworkTracesV2() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetNetworkTracesV2(ctx, - "testrg123", - "SampleApp", - "c291433b-53ad-4c49-8cae-0a293eae1c6d", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetPrivateEndpointConnection(ctx, - "rg", - "testSite", - "connection", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetPrivateLinkResources(ctx, - "rg", - "testSite", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("3fb8d758-2e2c-42e9-a528-a8acdfe87237", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBasicPublishingCredentialsPoliciesSlotPager("testrg123", - "testsite", - "staging", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetFtpAllowedSlot(ctx, - "rg", - "testSite", - "stage", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetPublishingCredentialsPolicySlot.json -func ExampleWebAppsClient_GetScmAllowedSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetScmAllowedSlot(ctx, - "rg", - "testSite", - "stage", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/UpdatePublishingCredentialsPolicySlot.json -func ExampleWebAppsClient_UpdateScmAllowedSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateScmAllowedSlot(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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetAppSettingsKeyVaultReferencesSlotPager("testrg123", - "testc6282", - "stage", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetAppSettingKeyVaultReferenceSlot(ctx, - "testrg123", - "testc6282", - "setting", - "stage", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetSiteInstanceInfo.json -func ExampleWebAppsClient_GetInstanceInfoSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetInstanceInfoSlot(ctx, - "testrg123", - "tests346", - "134987120", - "staging", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListSlotBackups.json -func ExampleWebAppsClient_NewListSiteBackupsSlotPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListSiteBackupsSlotPager("testrg123", - "tests346", - "staging", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebSiteNetworkTraceOperation.json -func ExampleWebAppsClient_GetNetworkTraceOperationSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetNetworkTraceOperationSlot(ctx, - "testrg123", - "SampleApp", - "c291433b-53ad-4c49-8cae-0a293eae1c6d", - "Production", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StartWebSiteNetworkTraceOperation.json -func ExampleWebAppsClient_BeginStartWebSiteNetworkTraceOperationSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStartWebSiteNetworkTraceOperationSlot(ctx, - "testrg123", - "SampleApp", - "Production", - &armappservice.WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions{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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StopWebSiteNetworkTrace.json -func ExampleWebAppsClient_StopWebSiteNetworkTraceSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.StopWebSiteNetworkTraceSlot(ctx, - "testrg123", - "SampleApp", - "Production", - 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/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebSiteNetworkTraces.json -func ExampleWebAppsClient_GetNetworkTracesSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetNetworkTracesSlot(ctx, - "testrg123", - "SampleApp", - "c291433b-53ad-4c49-8cae-0a293eae1c6d", - "Production", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebSiteNetworkTraceOperation.json -func ExampleWebAppsClient_GetNetworkTraceOperationSlotV2() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetNetworkTraceOperationSlotV2(ctx, - "testrg123", - "SampleApp", - "c291433b-53ad-4c49-8cae-0a293eae1c6d", - "Production", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebSiteNetworkTraces.json -func ExampleWebAppsClient_GetNetworkTracesSlotV2() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetNetworkTracesSlotV2(ctx, - "testrg123", - "SampleApp", - "c291433b-53ad-4c49-8cae-0a293eae1c6d", - "Production", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetPrivateEndpointConnectionSlot(ctx, - "rg", - "testSite", - "connection", - "stage", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetPrivateLinkResourcesSlot(ctx, - "rg", - "testSite", - "stage", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StartWebSiteNetworkTraceOperation.json -func ExampleWebAppsClient_BeginStartNetworkTraceSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStartNetworkTraceSlot(ctx, - "testrg123", - "SampleApp", - "Production", - &armappservice.WebAppsClientBeginStartNetworkTraceSlotOptions{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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StopWebSiteNetworkTrace.json -func ExampleWebAppsClient_StopNetworkTraceSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.StopNetworkTraceSlot(ctx, - "testrg123", - "SampleApp", - "Production", - 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/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StartWebSiteNetworkTraceOperation.json -func ExampleWebAppsClient_BeginStartNetworkTrace() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStartNetworkTrace(ctx, - "testrg123", - "SampleApp", - &armappservice.WebAppsClientBeginStartNetworkTraceOptions{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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StopWebSiteNetworkTrace.json -func ExampleWebAppsClient_StopNetworkTrace() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebAppsClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.StopNetworkTrace(ctx, - "testrg123", - "SampleApp", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_websitemanagementclient_client_test.go b/sdk/resourcemanager/appservice/armappservice/ze_generated_example_websitemanagementclient_client_test.go deleted file mode 100644 index 029a0704fd70..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/ze_generated_example_websitemanagementclient_client_test.go +++ /dev/null @@ -1,69 +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. - -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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListCustomHostNameSites.json -func ExampleWebSiteManagementClient_NewListCustomHostNameSitesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armappservice.NewWebSiteManagementClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListCustomHostNameSitesPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/web/resource-manager/Microsoft.Web/stable/2021-03-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() - client, err := armappservice.NewWebSiteManagementClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.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) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/appservice/armappservice/zz_generated_models_serde.go b/sdk/resourcemanager/appservice/armappservice/zz_generated_models_serde.go deleted file mode 100644 index 006f013621eb..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/zz_generated_models_serde.go +++ /dev/null @@ -1,5042 +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. - -package armappservice - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "reflect" -) - -// MarshalJSON implements the json.Marshaller interface for type AbnormalTimePeriod. -func (a AbnormalTimePeriod) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "endTime", a.EndTime) - populate(objectMap, "events", a.Events) - populate(objectMap, "solutions", a.Solutions) - populateTimeRFC3339(objectMap, "startTime", a.StartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AbnormalTimePeriod. -func (a *AbnormalTimePeriod) 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 "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &a.EndTime) - delete(rawMsg, key) - case "events": - err = unpopulate(val, "Events", &a.Events) - delete(rawMsg, key) - case "solutions": - err = unpopulate(val, "Solutions", &a.Solutions) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &a.StartTime) - 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 AddressResponseProperties. -func (a AddressResponseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "internalIpAddress", a.InternalIPAddress) - populate(objectMap, "outboundIpAddresses", a.OutboundIPAddresses) - populate(objectMap, "serviceIpAddress", a.ServiceIPAddress) - populate(objectMap, "vipMappings", a.VipMappings) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AllowedAudiencesValidation. -func (a AllowedAudiencesValidation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedAudiences", a.AllowedAudiences) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AllowedPrincipals. -func (a AllowedPrincipals) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "groups", a.Groups) - populate(objectMap, "identities", a.Identities) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AnalysisData. -func (a AnalysisData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "data", a.Data) - populate(objectMap, "detectorDefinition", a.DetectorDefinition) - populate(objectMap, "detectorMetaData", a.DetectorMetaData) - populate(objectMap, "metrics", a.Metrics) - populate(objectMap, "source", a.Source) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AppCertificate. -func (a AppCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "kind", a.Kind) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AppCertificatePatchResource. -func (a AppCertificatePatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - 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) -} - -// MarshalJSON implements the json.Marshaller interface for type AppCertificatePatchResourceProperties. -func (a AppCertificatePatchResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "canonicalName", a.CanonicalName) - populateByteArray(objectMap, "cerBlob", a.CerBlob, runtime.Base64StdFormat) - populate(objectMap, "domainValidationMethod", a.DomainValidationMethod) - populateTimeRFC3339(objectMap, "expirationDate", a.ExpirationDate) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "hostNames", a.HostNames) - populate(objectMap, "hostingEnvironmentProfile", a.HostingEnvironmentProfile) - populateTimeRFC3339(objectMap, "issueDate", a.IssueDate) - populate(objectMap, "issuer", a.Issuer) - populate(objectMap, "keyVaultId", a.KeyVaultID) - populate(objectMap, "keyVaultSecretName", a.KeyVaultSecretName) - populate(objectMap, "keyVaultSecretStatus", a.KeyVaultSecretStatus) - populate(objectMap, "password", a.Password) - populateByteArray(objectMap, "pfxBlob", a.PfxBlob, runtime.Base64StdFormat) - populate(objectMap, "publicKeyHash", a.PublicKeyHash) - populate(objectMap, "selfLink", a.SelfLink) - populate(objectMap, "serverFarmId", a.ServerFarmID) - populate(objectMap, "siteName", a.SiteName) - populate(objectMap, "subjectName", a.SubjectName) - populate(objectMap, "thumbprint", a.Thumbprint) - populate(objectMap, "valid", a.Valid) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AppCertificatePatchResourceProperties. -func (a *AppCertificatePatchResourceProperties) 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 "canonicalName": - err = unpopulate(val, "CanonicalName", &a.CanonicalName) - delete(rawMsg, key) - case "cerBlob": - err = runtime.DecodeByteArray(string(val), &a.CerBlob, runtime.Base64StdFormat) - delete(rawMsg, key) - case "domainValidationMethod": - err = unpopulate(val, "DomainValidationMethod", &a.DomainValidationMethod) - delete(rawMsg, key) - case "expirationDate": - err = unpopulateTimeRFC3339(val, "ExpirationDate", &a.ExpirationDate) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "hostNames": - err = unpopulate(val, "HostNames", &a.HostNames) - delete(rawMsg, key) - case "hostingEnvironmentProfile": - err = unpopulate(val, "HostingEnvironmentProfile", &a.HostingEnvironmentProfile) - delete(rawMsg, key) - case "issueDate": - err = unpopulateTimeRFC3339(val, "IssueDate", &a.IssueDate) - delete(rawMsg, key) - case "issuer": - err = unpopulate(val, "Issuer", &a.Issuer) - delete(rawMsg, key) - case "keyVaultId": - err = unpopulate(val, "KeyVaultID", &a.KeyVaultID) - delete(rawMsg, key) - case "keyVaultSecretName": - err = unpopulate(val, "KeyVaultSecretName", &a.KeyVaultSecretName) - delete(rawMsg, key) - case "keyVaultSecretStatus": - err = unpopulate(val, "KeyVaultSecretStatus", &a.KeyVaultSecretStatus) - delete(rawMsg, key) - case "password": - err = unpopulate(val, "Password", &a.Password) - delete(rawMsg, key) - case "pfxBlob": - err = runtime.DecodeByteArray(string(val), &a.PfxBlob, runtime.Base64StdFormat) - delete(rawMsg, key) - case "publicKeyHash": - err = unpopulate(val, "PublicKeyHash", &a.PublicKeyHash) - delete(rawMsg, key) - case "selfLink": - err = unpopulate(val, "SelfLink", &a.SelfLink) - delete(rawMsg, key) - case "serverFarmId": - err = unpopulate(val, "ServerFarmID", &a.ServerFarmID) - delete(rawMsg, key) - case "siteName": - err = unpopulate(val, "SiteName", &a.SiteName) - delete(rawMsg, key) - case "subjectName": - err = unpopulate(val, "SubjectName", &a.SubjectName) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &a.Thumbprint) - delete(rawMsg, key) - case "valid": - err = unpopulate(val, "Valid", &a.Valid) - 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 AppCertificateProperties. -func (a AppCertificateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "canonicalName", a.CanonicalName) - populateByteArray(objectMap, "cerBlob", a.CerBlob, runtime.Base64StdFormat) - populate(objectMap, "domainValidationMethod", a.DomainValidationMethod) - populateTimeRFC3339(objectMap, "expirationDate", a.ExpirationDate) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "hostNames", a.HostNames) - populate(objectMap, "hostingEnvironmentProfile", a.HostingEnvironmentProfile) - populateTimeRFC3339(objectMap, "issueDate", a.IssueDate) - populate(objectMap, "issuer", a.Issuer) - populate(objectMap, "keyVaultId", a.KeyVaultID) - populate(objectMap, "keyVaultSecretName", a.KeyVaultSecretName) - populate(objectMap, "keyVaultSecretStatus", a.KeyVaultSecretStatus) - populate(objectMap, "password", a.Password) - populateByteArray(objectMap, "pfxBlob", a.PfxBlob, runtime.Base64StdFormat) - populate(objectMap, "publicKeyHash", a.PublicKeyHash) - populate(objectMap, "selfLink", a.SelfLink) - populate(objectMap, "serverFarmId", a.ServerFarmID) - populate(objectMap, "siteName", a.SiteName) - populate(objectMap, "subjectName", a.SubjectName) - populate(objectMap, "thumbprint", a.Thumbprint) - populate(objectMap, "valid", a.Valid) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AppCertificateProperties. -func (a *AppCertificateProperties) 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 "canonicalName": - err = unpopulate(val, "CanonicalName", &a.CanonicalName) - delete(rawMsg, key) - case "cerBlob": - err = runtime.DecodeByteArray(string(val), &a.CerBlob, runtime.Base64StdFormat) - delete(rawMsg, key) - case "domainValidationMethod": - err = unpopulate(val, "DomainValidationMethod", &a.DomainValidationMethod) - delete(rawMsg, key) - case "expirationDate": - err = unpopulateTimeRFC3339(val, "ExpirationDate", &a.ExpirationDate) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "hostNames": - err = unpopulate(val, "HostNames", &a.HostNames) - delete(rawMsg, key) - case "hostingEnvironmentProfile": - err = unpopulate(val, "HostingEnvironmentProfile", &a.HostingEnvironmentProfile) - delete(rawMsg, key) - case "issueDate": - err = unpopulateTimeRFC3339(val, "IssueDate", &a.IssueDate) - delete(rawMsg, key) - case "issuer": - err = unpopulate(val, "Issuer", &a.Issuer) - delete(rawMsg, key) - case "keyVaultId": - err = unpopulate(val, "KeyVaultID", &a.KeyVaultID) - delete(rawMsg, key) - case "keyVaultSecretName": - err = unpopulate(val, "KeyVaultSecretName", &a.KeyVaultSecretName) - delete(rawMsg, key) - case "keyVaultSecretStatus": - err = unpopulate(val, "KeyVaultSecretStatus", &a.KeyVaultSecretStatus) - delete(rawMsg, key) - case "password": - err = unpopulate(val, "Password", &a.Password) - delete(rawMsg, key) - case "pfxBlob": - err = runtime.DecodeByteArray(string(val), &a.PfxBlob, runtime.Base64StdFormat) - delete(rawMsg, key) - case "publicKeyHash": - err = unpopulate(val, "PublicKeyHash", &a.PublicKeyHash) - delete(rawMsg, key) - case "selfLink": - err = unpopulate(val, "SelfLink", &a.SelfLink) - delete(rawMsg, key) - case "serverFarmId": - err = unpopulate(val, "ServerFarmID", &a.ServerFarmID) - delete(rawMsg, key) - case "siteName": - err = unpopulate(val, "SiteName", &a.SiteName) - delete(rawMsg, key) - case "subjectName": - err = unpopulate(val, "SubjectName", &a.SubjectName) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &a.Thumbprint) - delete(rawMsg, key) - case "valid": - err = unpopulate(val, "Valid", &a.Valid) - 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 ApplicationStack. -func (a ApplicationStack) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dependency", a.Dependency) - populate(objectMap, "display", a.Display) - populate(objectMap, "frameworks", a.Frameworks) - populate(objectMap, "isDeprecated", a.IsDeprecated) - populate(objectMap, "majorVersions", a.MajorVersions) - populate(objectMap, "name", a.Name) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AseV3NetworkingConfigurationProperties. -func (a AseV3NetworkingConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowNewPrivateEndpointConnections", a.AllowNewPrivateEndpointConnections) - populate(objectMap, "externalInboundIpAddresses", a.ExternalInboundIPAddresses) - populate(objectMap, "internalInboundIpAddresses", a.InternalInboundIPAddresses) - populate(objectMap, "linuxOutboundIpAddresses", a.LinuxOutboundIPAddresses) - populate(objectMap, "windowsOutboundIpAddresses", a.WindowsOutboundIPAddresses) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AutoHealTriggers. -func (a AutoHealTriggers) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "privateBytesInKB", a.PrivateBytesInKB) - populate(objectMap, "requests", a.Requests) - populate(objectMap, "slowRequests", a.SlowRequests) - populate(objectMap, "slowRequestsWithPath", a.SlowRequestsWithPath) - populate(objectMap, "statusCodes", a.StatusCodes) - populate(objectMap, "statusCodesRange", a.StatusCodesRange) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzureActiveDirectoryLogin. -func (a AzureActiveDirectoryLogin) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "disableWWWAuthenticate", a.DisableWWWAuthenticate) - populate(objectMap, "loginParameters", a.LoginParameters) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzureActiveDirectoryValidation. -func (a AzureActiveDirectoryValidation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedAudiences", a.AllowedAudiences) - populate(objectMap, "defaultAuthorizationPolicy", a.DefaultAuthorizationPolicy) - populate(objectMap, "jwtClaimChecks", a.JwtClaimChecks) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzureStoragePropertyDictionaryResource. -func (a AzureStoragePropertyDictionaryResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - 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) -} - -// MarshalJSON implements the json.Marshaller interface for type BackupItemProperties. -func (b BackupItemProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", b.BackupID) - populate(objectMap, "blobName", b.BlobName) - populate(objectMap, "correlationId", b.CorrelationID) - populateTimeRFC3339(objectMap, "created", b.Created) - populate(objectMap, "databases", b.Databases) - populateTimeRFC3339(objectMap, "finishedTimeStamp", b.FinishedTimeStamp) - populateTimeRFC3339(objectMap, "lastRestoreTimeStamp", b.LastRestoreTimeStamp) - populate(objectMap, "log", b.Log) - populate(objectMap, "name", b.Name) - populate(objectMap, "scheduled", b.Scheduled) - populate(objectMap, "sizeInBytes", b.SizeInBytes) - populate(objectMap, "status", b.Status) - populate(objectMap, "storageAccountUrl", b.StorageAccountURL) - populate(objectMap, "websiteSizeInBytes", b.WebsiteSizeInBytes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackupItemProperties. -func (b *BackupItemProperties) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "BackupID", &b.BackupID) - delete(rawMsg, key) - case "blobName": - err = unpopulate(val, "BlobName", &b.BlobName) - delete(rawMsg, key) - case "correlationId": - err = unpopulate(val, "CorrelationID", &b.CorrelationID) - delete(rawMsg, key) - case "created": - err = unpopulateTimeRFC3339(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) - delete(rawMsg, key) - case "lastRestoreTimeStamp": - err = unpopulateTimeRFC3339(val, "LastRestoreTimeStamp", &b.LastRestoreTimeStamp) - delete(rawMsg, key) - case "log": - err = unpopulate(val, "Log", &b.Log) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "scheduled": - err = unpopulate(val, "Scheduled", &b.Scheduled) - delete(rawMsg, key) - case "sizeInBytes": - err = unpopulate(val, "SizeInBytes", &b.SizeInBytes) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &b.Status) - delete(rawMsg, key) - case "storageAccountUrl": - err = unpopulate(val, "StorageAccountURL", &b.StorageAccountURL) - delete(rawMsg, key) - case "websiteSizeInBytes": - err = unpopulate(val, "WebsiteSizeInBytes", &b.WebsiteSizeInBytes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackupRequestProperties. -func (b BackupRequestProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupName", b.BackupName) - populate(objectMap, "backupSchedule", b.BackupSchedule) - populate(objectMap, "databases", b.Databases) - populate(objectMap, "enabled", b.Enabled) - populate(objectMap, "storageAccountUrl", b.StorageAccountURL) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BackupSchedule. -func (b BackupSchedule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "frequencyInterval", b.FrequencyInterval) - populate(objectMap, "frequencyUnit", b.FrequencyUnit) - populate(objectMap, "keepAtLeastOneBackup", b.KeepAtLeastOneBackup) - populateTimeRFC3339(objectMap, "lastExecutionTime", b.LastExecutionTime) - populate(objectMap, "retentionPeriodInDays", b.RetentionPeriodInDays) - populateTimeRFC3339(objectMap, "startTime", b.StartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackupSchedule. -func (b *BackupSchedule) 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", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "frequencyInterval": - err = unpopulate(val, "FrequencyInterval", &b.FrequencyInterval) - delete(rawMsg, key) - case "frequencyUnit": - err = unpopulate(val, "FrequencyUnit", &b.FrequencyUnit) - delete(rawMsg, key) - case "keepAtLeastOneBackup": - err = unpopulate(val, "KeepAtLeastOneBackup", &b.KeepAtLeastOneBackup) - delete(rawMsg, key) - case "lastExecutionTime": - err = unpopulateTimeRFC3339(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) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateDetails. -func (c CertificateDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "issuer", c.Issuer) - populateTimeRFC3339(objectMap, "notAfter", c.NotAfter) - populateTimeRFC3339(objectMap, "notBefore", c.NotBefore) - populate(objectMap, "rawData", c.RawData) - populate(objectMap, "serialNumber", c.SerialNumber) - populate(objectMap, "signatureAlgorithm", c.SignatureAlgorithm) - populate(objectMap, "subject", c.Subject) - populate(objectMap, "thumbprint", c.Thumbprint) - populate(objectMap, "version", c.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateDetails. -func (c *CertificateDetails) 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", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "issuer": - err = unpopulate(val, "Issuer", &c.Issuer) - delete(rawMsg, key) - case "notAfter": - err = unpopulateTimeRFC3339(val, "NotAfter", &c.NotAfter) - delete(rawMsg, key) - case "notBefore": - err = unpopulateTimeRFC3339(val, "NotBefore", &c.NotBefore) - delete(rawMsg, key) - case "rawData": - err = unpopulate(val, "RawData", &c.RawData) - delete(rawMsg, key) - case "serialNumber": - err = unpopulate(val, "SerialNumber", &c.SerialNumber) - delete(rawMsg, key) - case "signatureAlgorithm": - err = unpopulate(val, "SignatureAlgorithm", &c.SignatureAlgorithm) - delete(rawMsg, key) - case "subject": - err = unpopulate(val, "Subject", &c.Subject) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &c.Thumbprint) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &c.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateEmailProperties. -func (c CertificateEmailProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "emailId", c.EmailID) - populateTimeRFC3339(objectMap, "timeStamp", c.TimeStamp) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateEmailProperties. -func (c *CertificateEmailProperties) 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", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "emailId": - err = unpopulate(val, "EmailID", &c.EmailID) - delete(rawMsg, key) - case "timeStamp": - err = unpopulateTimeRFC3339(val, "TimeStamp", &c.TimeStamp) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateOrder. -func (c CertificateOrder) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", c.ID) - populate(objectMap, "kind", c.Kind) - populate(objectMap, "location", c.Location) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "tags", c.Tags) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateOrderActionProperties. -func (c CertificateOrderActionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actionType", c.ActionType) - populateTimeRFC3339(objectMap, "createdAt", c.CreatedAt) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateOrderActionProperties. -func (c *CertificateOrderActionProperties) 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", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actionType": - err = unpopulate(val, "ActionType", &c.ActionType) - delete(rawMsg, key) - case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &c.CreatedAt) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateOrderPatchResource. -func (c CertificateOrderPatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", c.ID) - populate(objectMap, "kind", c.Kind) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateOrderPatchResourceProperties. -func (c CertificateOrderPatchResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appServiceCertificateNotRenewableReasons", c.AppServiceCertificateNotRenewableReasons) - populate(objectMap, "autoRenew", c.AutoRenew) - populate(objectMap, "certificates", c.Certificates) - populate(objectMap, "contact", c.Contact) - populate(objectMap, "csr", c.Csr) - populate(objectMap, "distinguishedName", c.DistinguishedName) - populate(objectMap, "domainVerificationToken", c.DomainVerificationToken) - populateTimeRFC3339(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) - populate(objectMap, "productType", c.ProductType) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "root", c.Root) - populate(objectMap, "serialNumber", c.SerialNumber) - populate(objectMap, "signedCertificate", c.SignedCertificate) - populate(objectMap, "status", c.Status) - populate(objectMap, "validityInYears", c.ValidityInYears) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateOrderPatchResourceProperties. -func (c *CertificateOrderPatchResourceProperties) 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", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appServiceCertificateNotRenewableReasons": - err = unpopulate(val, "AppServiceCertificateNotRenewableReasons", &c.AppServiceCertificateNotRenewableReasons) - delete(rawMsg, key) - case "autoRenew": - err = unpopulate(val, "AutoRenew", &c.AutoRenew) - delete(rawMsg, key) - case "certificates": - err = unpopulate(val, "Certificates", &c.Certificates) - delete(rawMsg, key) - case "contact": - err = unpopulate(val, "Contact", &c.Contact) - delete(rawMsg, key) - case "csr": - err = unpopulate(val, "Csr", &c.Csr) - delete(rawMsg, key) - case "distinguishedName": - err = unpopulate(val, "DistinguishedName", &c.DistinguishedName) - delete(rawMsg, key) - case "domainVerificationToken": - err = unpopulate(val, "DomainVerificationToken", &c.DomainVerificationToken) - delete(rawMsg, key) - case "expirationTime": - err = unpopulateTimeRFC3339(val, "ExpirationTime", &c.ExpirationTime) - delete(rawMsg, key) - case "intermediate": - err = unpopulate(val, "Intermediate", &c.Intermediate) - delete(rawMsg, key) - case "isPrivateKeyExternal": - err = unpopulate(val, "IsPrivateKeyExternal", &c.IsPrivateKeyExternal) - delete(rawMsg, key) - case "keySize": - err = unpopulate(val, "KeySize", &c.KeySize) - delete(rawMsg, key) - case "lastCertificateIssuanceTime": - err = unpopulateTimeRFC3339(val, "LastCertificateIssuanceTime", &c.LastCertificateIssuanceTime) - delete(rawMsg, key) - case "nextAutoRenewalTimeStamp": - err = unpopulateTimeRFC3339(val, "NextAutoRenewalTimeStamp", &c.NextAutoRenewalTimeStamp) - delete(rawMsg, key) - case "productType": - err = unpopulate(val, "ProductType", &c.ProductType) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "root": - err = unpopulate(val, "Root", &c.Root) - delete(rawMsg, key) - case "serialNumber": - err = unpopulate(val, "SerialNumber", &c.SerialNumber) - delete(rawMsg, key) - case "signedCertificate": - err = unpopulate(val, "SignedCertificate", &c.SignedCertificate) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &c.Status) - delete(rawMsg, key) - case "validityInYears": - err = unpopulate(val, "ValidityInYears", &c.ValidityInYears) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateOrderProperties. -func (c CertificateOrderProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appServiceCertificateNotRenewableReasons", c.AppServiceCertificateNotRenewableReasons) - populate(objectMap, "autoRenew", c.AutoRenew) - populate(objectMap, "certificates", c.Certificates) - populate(objectMap, "contact", c.Contact) - populate(objectMap, "csr", c.Csr) - populate(objectMap, "distinguishedName", c.DistinguishedName) - populate(objectMap, "domainVerificationToken", c.DomainVerificationToken) - populateTimeRFC3339(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) - populate(objectMap, "productType", c.ProductType) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "root", c.Root) - populate(objectMap, "serialNumber", c.SerialNumber) - populate(objectMap, "signedCertificate", c.SignedCertificate) - populate(objectMap, "status", c.Status) - populate(objectMap, "validityInYears", c.ValidityInYears) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateOrderProperties. -func (c *CertificateOrderProperties) 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", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appServiceCertificateNotRenewableReasons": - err = unpopulate(val, "AppServiceCertificateNotRenewableReasons", &c.AppServiceCertificateNotRenewableReasons) - delete(rawMsg, key) - case "autoRenew": - err = unpopulate(val, "AutoRenew", &c.AutoRenew) - delete(rawMsg, key) - case "certificates": - err = unpopulate(val, "Certificates", &c.Certificates) - delete(rawMsg, key) - case "contact": - err = unpopulate(val, "Contact", &c.Contact) - delete(rawMsg, key) - case "csr": - err = unpopulate(val, "Csr", &c.Csr) - delete(rawMsg, key) - case "distinguishedName": - err = unpopulate(val, "DistinguishedName", &c.DistinguishedName) - delete(rawMsg, key) - case "domainVerificationToken": - err = unpopulate(val, "DomainVerificationToken", &c.DomainVerificationToken) - delete(rawMsg, key) - case "expirationTime": - err = unpopulateTimeRFC3339(val, "ExpirationTime", &c.ExpirationTime) - delete(rawMsg, key) - case "intermediate": - err = unpopulate(val, "Intermediate", &c.Intermediate) - delete(rawMsg, key) - case "isPrivateKeyExternal": - err = unpopulate(val, "IsPrivateKeyExternal", &c.IsPrivateKeyExternal) - delete(rawMsg, key) - case "keySize": - err = unpopulate(val, "KeySize", &c.KeySize) - delete(rawMsg, key) - case "lastCertificateIssuanceTime": - err = unpopulateTimeRFC3339(val, "LastCertificateIssuanceTime", &c.LastCertificateIssuanceTime) - delete(rawMsg, key) - case "nextAutoRenewalTimeStamp": - err = unpopulateTimeRFC3339(val, "NextAutoRenewalTimeStamp", &c.NextAutoRenewalTimeStamp) - delete(rawMsg, key) - case "productType": - err = unpopulate(val, "ProductType", &c.ProductType) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "root": - err = unpopulate(val, "Root", &c.Root) - delete(rawMsg, key) - case "serialNumber": - err = unpopulate(val, "SerialNumber", &c.SerialNumber) - delete(rawMsg, key) - case "signedCertificate": - err = unpopulate(val, "SignedCertificate", &c.SignedCertificate) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &c.Status) - delete(rawMsg, key) - case "validityInYears": - err = unpopulate(val, "ValidityInYears", &c.ValidityInYears) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificatePatchResource. -func (c CertificatePatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", c.ID) - populate(objectMap, "kind", c.Kind) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateResource. -func (c CertificateResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", c.ID) - populate(objectMap, "kind", c.Kind) - populate(objectMap, "location", c.Location) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "tags", c.Tags) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CloningInfo. -func (c CloningInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appSettingsOverrides", c.AppSettingsOverrides) - populate(objectMap, "cloneCustomHostNames", c.CloneCustomHostNames) - populate(objectMap, "cloneSourceControl", c.CloneSourceControl) - populate(objectMap, "configureLoadBalancing", c.ConfigureLoadBalancing) - populate(objectMap, "correlationId", c.CorrelationID) - populate(objectMap, "hostingEnvironment", c.HostingEnvironment) - populate(objectMap, "overwrite", c.Overwrite) - populate(objectMap, "sourceWebAppId", c.SourceWebAppID) - populate(objectMap, "sourceWebAppLocation", c.SourceWebAppLocation) - populate(objectMap, "trafficManagerProfileId", c.TrafficManagerProfileID) - populate(objectMap, "trafficManagerProfileName", c.TrafficManagerProfileName) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Configuration. -func (c Configuration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "activeRevisionsMode", c.ActiveRevisionsMode) - populate(objectMap, "ingress", c.Ingress) - populate(objectMap, "registries", c.Registries) - populate(objectMap, "secrets", c.Secrets) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionStringDictionary. -func (c ConnectionStringDictionary) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", c.ID) - populate(objectMap, "kind", c.Kind) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Container. -func (c Container) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "args", c.Args) - populate(objectMap, "command", c.Command) - populate(objectMap, "env", c.Env) - populate(objectMap, "image", c.Image) - populate(objectMap, "name", c.Name) - populate(objectMap, "resources", c.Resources) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ContainerApp. -func (c ContainerApp) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", c.ID) - populate(objectMap, "kind", c.Kind) - populate(objectMap, "location", c.Location) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "tags", c.Tags) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ContainerCPUUsage. -func (c ContainerCPUUsage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "kernelModeUsage", c.KernelModeUsage) - populate(objectMap, "perCpuUsage", c.PerCPUUsage) - populate(objectMap, "totalUsage", c.TotalUsage) - populate(objectMap, "userModeUsage", c.UserModeUsage) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ContainerInfo. -func (c ContainerInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "currentCpuStats", c.CurrentCPUStats) - populateTimeRFC3339(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) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerInfo. -func (c *ContainerInfo) 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", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "currentCpuStats": - err = unpopulate(val, "CurrentCPUStats", &c.CurrentCPUStats) - delete(rawMsg, key) - case "currentTimeStamp": - err = unpopulateTimeRFC3339(val, "CurrentTimeStamp", &c.CurrentTimeStamp) - delete(rawMsg, key) - case "eth0": - err = unpopulate(val, "Eth0", &c.Eth0) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "memoryStats": - err = unpopulate(val, "MemoryStats", &c.MemoryStats) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "previousCpuStats": - err = unpopulate(val, "PreviousCPUStats", &c.PreviousCPUStats) - delete(rawMsg, key) - case "previousTimeStamp": - err = unpopulateTimeRFC3339(val, "PreviousTimeStamp", &c.PreviousTimeStamp) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ContinuousWebJobProperties. -func (c ContinuousWebJobProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "detailed_status", c.DetailedStatus) - populate(objectMap, "error", c.Error) - populate(objectMap, "extra_info_url", c.ExtraInfoURL) - populate(objectMap, "log_url", c.LogURL) - populate(objectMap, "run_command", c.RunCommand) - populate(objectMap, "settings", c.Settings) - populate(objectMap, "status", c.Status) - populate(objectMap, "url", c.URL) - populate(objectMap, "using_sdk", c.UsingSdk) - populate(objectMap, "web_job_type", c.WebJobType) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CorsSettings. -func (c CorsSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedOrigins", c.AllowedOrigins) - populate(objectMap, "supportCredentials", c.SupportCredentials) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CsmMoveResourceEnvelope. -func (c CsmMoveResourceEnvelope) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "resources", c.Resources) - populate(objectMap, "targetResourceGroup", c.TargetResourceGroup) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CsmUsageQuota. -func (c *CsmUsageQuota) 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", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "currentValue": - err = unpopulate(val, "CurrentValue", &c.CurrentValue) - delete(rawMsg, key) - case "limit": - err = unpopulate(val, "Limit", &c.Limit) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "nextResetTime": - err = unpopulateTimeRFC3339(val, "NextResetTime", &c.NextResetTime) - delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &c.Unit) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CustomHostnameAnalysisResultProperties. -func (c CustomHostnameAnalysisResultProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "aRecords", c.ARecords) - populate(objectMap, "alternateCNameRecords", c.AlternateCNameRecords) - populate(objectMap, "alternateTxtRecords", c.AlternateTxtRecords) - populate(objectMap, "cNameRecords", c.CNameRecords) - populate(objectMap, "conflictingAppResourceId", c.ConflictingAppResourceID) - populate(objectMap, "customDomainVerificationFailureInfo", c.CustomDomainVerificationFailureInfo) - populate(objectMap, "customDomainVerificationTest", c.CustomDomainVerificationTest) - populate(objectMap, "hasConflictAcrossSubscription", c.HasConflictAcrossSubscription) - populate(objectMap, "hasConflictOnScaleUnit", c.HasConflictOnScaleUnit) - populate(objectMap, "isHostnameAlreadyVerified", c.IsHostnameAlreadyVerified) - populate(objectMap, "txtRecords", c.TxtRecords) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CustomHostnameSitesProperties. -func (c CustomHostnameSitesProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customHostname", c.CustomHostname) - populate(objectMap, "region", c.Region) - populate(objectMap, "siteResourceIds", c.SiteResourceIDs) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CustomScaleRule. -func (c CustomScaleRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "auth", c.Auth) - populate(objectMap, "metadata", c.Metadata) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Dapr. -func (d Dapr) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appId", d.AppID) - populate(objectMap, "appPort", d.AppPort) - populate(objectMap, "components", d.Components) - populate(objectMap, "enabled", d.Enabled) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DaprComponent. -func (d DaprComponent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "metadata", d.Metadata) - populate(objectMap, "name", d.Name) - populate(objectMap, "type", d.Type) - populate(objectMap, "version", d.Version) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DataProviderMetadata. -func (d DataProviderMetadata) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "propertyBag", d.PropertyBag) - populate(objectMap, "providerName", d.ProviderName) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DataSource. -func (d DataSource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dataSourceUri", d.DataSourceURI) - populate(objectMap, "instructions", d.Instructions) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DataTableResponseObject. -func (d DataTableResponseObject) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "columns", d.Columns) - populate(objectMap, "rows", d.Rows) - populate(objectMap, "tableName", d.TableName) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DefaultAuthorizationPolicy. -func (d DefaultAuthorizationPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedApplications", d.AllowedApplications) - populate(objectMap, "allowedPrincipals", d.AllowedPrincipals) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DeploymentProperties. -func (d DeploymentProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "active", d.Active) - populate(objectMap, "author", d.Author) - populate(objectMap, "author_email", d.AuthorEmail) - populate(objectMap, "deployer", d.Deployer) - populate(objectMap, "details", d.Details) - populateTimeRFC3339(objectMap, "end_time", d.EndTime) - populate(objectMap, "message", d.Message) - populateTimeRFC3339(objectMap, "start_time", d.StartTime) - populate(objectMap, "status", d.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentProperties. -func (d *DeploymentProperties) 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 "active": - err = unpopulate(val, "Active", &d.Active) - delete(rawMsg, key) - case "author": - err = unpopulate(val, "Author", &d.Author) - delete(rawMsg, key) - case "author_email": - err = unpopulate(val, "AuthorEmail", &d.AuthorEmail) - delete(rawMsg, key) - case "deployer": - err = unpopulate(val, "Deployer", &d.Deployer) - delete(rawMsg, key) - case "details": - err = unpopulate(val, "Details", &d.Details) - delete(rawMsg, key) - case "end_time": - err = unpopulateTimeRFC3339(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) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &d.Status) - 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 DetectorAbnormalTimePeriod. -func (d DetectorAbnormalTimePeriod) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(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) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DetectorAbnormalTimePeriod. -func (d *DetectorAbnormalTimePeriod) 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 "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &d.EndTime) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &d.Message) - delete(rawMsg, key) - case "metaData": - err = unpopulate(val, "MetaData", &d.MetaData) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &d.Priority) - delete(rawMsg, key) - case "solutions": - err = unpopulate(val, "Solutions", &d.Solutions) - delete(rawMsg, key) - case "source": - err = unpopulate(val, "Source", &d.Source) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &d.StartTime) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - 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 DetectorInfo. -func (d DetectorInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "analysisType", d.AnalysisType) - populate(objectMap, "author", d.Author) - populate(objectMap, "category", d.Category) - populate(objectMap, "description", d.Description) - populate(objectMap, "id", d.ID) - populate(objectMap, "name", d.Name) - populate(objectMap, "score", d.Score) - populate(objectMap, "supportTopicList", d.SupportTopicList) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DetectorResponseProperties. -func (d DetectorResponseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dataProvidersMetadata", d.DataProvidersMetadata) - populate(objectMap, "dataset", d.Dataset) - populate(objectMap, "metadata", d.Metadata) - populate(objectMap, "status", d.Status) - populate(objectMap, "suggestedUtterances", d.SuggestedUtterances) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DiagnosticAnalysisProperties. -func (d DiagnosticAnalysisProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "abnormalTimePeriods", d.AbnormalTimePeriods) - populateTimeRFC3339(objectMap, "endTime", d.EndTime) - populate(objectMap, "nonCorrelatedDetectors", d.NonCorrelatedDetectors) - populate(objectMap, "payload", d.Payload) - populateTimeRFC3339(objectMap, "startTime", d.StartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticAnalysisProperties. -func (d *DiagnosticAnalysisProperties) 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 "abnormalTimePeriods": - err = unpopulate(val, "AbnormalTimePeriods", &d.AbnormalTimePeriods) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &d.EndTime) - delete(rawMsg, key) - case "nonCorrelatedDetectors": - err = unpopulate(val, "NonCorrelatedDetectors", &d.NonCorrelatedDetectors) - delete(rawMsg, key) - case "payload": - err = unpopulate(val, "Payload", &d.Payload) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &d.StartTime) - 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 DiagnosticDetectorResponseProperties. -func (d DiagnosticDetectorResponseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "abnormalTimePeriods", d.AbnormalTimePeriods) - populate(objectMap, "data", d.Data) - populate(objectMap, "detectorDefinition", d.DetectorDefinition) - populateTimeRFC3339(objectMap, "endTime", d.EndTime) - populate(objectMap, "issueDetected", d.IssueDetected) - populate(objectMap, "metrics", d.Metrics) - populate(objectMap, "responseMetaData", d.ResponseMetaData) - populateTimeRFC3339(objectMap, "startTime", d.StartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticDetectorResponseProperties. -func (d *DiagnosticDetectorResponseProperties) 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 "abnormalTimePeriods": - err = unpopulate(val, "AbnormalTimePeriods", &d.AbnormalTimePeriods) - delete(rawMsg, key) - case "data": - err = unpopulate(val, "Data", &d.Data) - delete(rawMsg, key) - case "detectorDefinition": - err = unpopulate(val, "DetectorDefinition", &d.DetectorDefinition) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &d.EndTime) - delete(rawMsg, key) - case "issueDetected": - err = unpopulate(val, "IssueDetected", &d.IssueDetected) - delete(rawMsg, key) - case "metrics": - err = unpopulate(val, "Metrics", &d.Metrics) - delete(rawMsg, key) - case "responseMetaData": - err = unpopulate(val, "ResponseMetaData", &d.ResponseMetaData) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &d.StartTime) - 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 DiagnosticMetricSample. -func (d DiagnosticMetricSample) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "isAggregated", d.IsAggregated) - populate(objectMap, "maximum", d.Maximum) - populate(objectMap, "minimum", d.Minimum) - populate(objectMap, "roleInstance", d.RoleInstance) - populateTimeRFC3339(objectMap, "timestamp", d.Timestamp) - populate(objectMap, "total", d.Total) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticMetricSample. -func (d *DiagnosticMetricSample) 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 "isAggregated": - err = unpopulate(val, "IsAggregated", &d.IsAggregated) - delete(rawMsg, key) - case "maximum": - err = unpopulate(val, "Maximum", &d.Maximum) - delete(rawMsg, key) - case "minimum": - err = unpopulate(val, "Minimum", &d.Minimum) - delete(rawMsg, key) - case "roleInstance": - err = unpopulate(val, "RoleInstance", &d.RoleInstance) - delete(rawMsg, key) - case "timestamp": - err = unpopulateTimeRFC3339(val, "Timestamp", &d.Timestamp) - delete(rawMsg, key) - case "total": - err = unpopulate(val, "Total", &d.Total) - 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 DiagnosticMetricSet. -func (d DiagnosticMetricSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "endTime", d.EndTime) - populate(objectMap, "name", d.Name) - populateTimeRFC3339(objectMap, "startTime", d.StartTime) - populate(objectMap, "timeGrain", d.TimeGrain) - populate(objectMap, "unit", d.Unit) - populate(objectMap, "values", d.Values) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticMetricSet. -func (d *DiagnosticMetricSet) 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 "endTime": - err = unpopulateTimeRFC3339(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) - delete(rawMsg, key) - case "timeGrain": - err = unpopulate(val, "TimeGrain", &d.TimeGrain) - delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &d.Unit) - delete(rawMsg, key) - case "values": - err = unpopulate(val, "Values", &d.Values) - 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 Domain. -func (d Domain) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", d.ID) - populate(objectMap, "kind", d.Kind) - populate(objectMap, "location", d.Location) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "tags", d.Tags) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DomainOwnershipIdentifier. -func (d DomainOwnershipIdentifier) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", d.ID) - populate(objectMap, "kind", d.Kind) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DomainPatchResource. -func (d DomainPatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", d.ID) - populate(objectMap, "kind", d.Kind) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DomainPatchResourceProperties. -func (d DomainPatchResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authCode", d.AuthCode) - populate(objectMap, "autoRenew", d.AutoRenew) - populate(objectMap, "consent", d.Consent) - populate(objectMap, "contactAdmin", d.ContactAdmin) - populate(objectMap, "contactBilling", d.ContactBilling) - populate(objectMap, "contactRegistrant", d.ContactRegistrant) - populate(objectMap, "contactTech", d.ContactTech) - populateTimeRFC3339(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) - populate(objectMap, "managedHostNames", d.ManagedHostNames) - populate(objectMap, "nameServers", d.NameServers) - populate(objectMap, "privacy", d.Privacy) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "readyForDnsRecordManagement", d.ReadyForDNSRecordManagement) - populate(objectMap, "registrationStatus", d.RegistrationStatus) - populate(objectMap, "targetDnsType", d.TargetDNSType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DomainPatchResourceProperties. -func (d *DomainPatchResourceProperties) 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 "authCode": - err = unpopulate(val, "AuthCode", &d.AuthCode) - delete(rawMsg, key) - case "autoRenew": - err = unpopulate(val, "AutoRenew", &d.AutoRenew) - delete(rawMsg, key) - case "consent": - err = unpopulate(val, "Consent", &d.Consent) - delete(rawMsg, key) - case "contactAdmin": - err = unpopulate(val, "ContactAdmin", &d.ContactAdmin) - delete(rawMsg, key) - case "contactBilling": - err = unpopulate(val, "ContactBilling", &d.ContactBilling) - delete(rawMsg, key) - case "contactRegistrant": - err = unpopulate(val, "ContactRegistrant", &d.ContactRegistrant) - delete(rawMsg, key) - case "contactTech": - err = unpopulate(val, "ContactTech", &d.ContactTech) - delete(rawMsg, key) - case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &d.CreatedTime) - delete(rawMsg, key) - case "dnsType": - err = unpopulate(val, "DNSType", &d.DNSType) - delete(rawMsg, key) - case "dnsZoneId": - err = unpopulate(val, "DNSZoneID", &d.DNSZoneID) - delete(rawMsg, key) - case "domainNotRenewableReasons": - err = unpopulate(val, "DomainNotRenewableReasons", &d.DomainNotRenewableReasons) - delete(rawMsg, key) - case "expirationTime": - err = unpopulateTimeRFC3339(val, "ExpirationTime", &d.ExpirationTime) - delete(rawMsg, key) - case "lastRenewedTime": - err = unpopulateTimeRFC3339(val, "LastRenewedTime", &d.LastRenewedTime) - delete(rawMsg, key) - case "managedHostNames": - err = unpopulate(val, "ManagedHostNames", &d.ManagedHostNames) - delete(rawMsg, key) - case "nameServers": - err = unpopulate(val, "NameServers", &d.NameServers) - delete(rawMsg, key) - case "privacy": - err = unpopulate(val, "Privacy", &d.Privacy) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) - delete(rawMsg, key) - case "readyForDnsRecordManagement": - err = unpopulate(val, "ReadyForDNSRecordManagement", &d.ReadyForDNSRecordManagement) - delete(rawMsg, key) - case "registrationStatus": - err = unpopulate(val, "RegistrationStatus", &d.RegistrationStatus) - delete(rawMsg, key) - case "targetDnsType": - err = unpopulate(val, "TargetDNSType", &d.TargetDNSType) - 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 DomainProperties. -func (d DomainProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authCode", d.AuthCode) - populate(objectMap, "autoRenew", d.AutoRenew) - populate(objectMap, "consent", d.Consent) - populate(objectMap, "contactAdmin", d.ContactAdmin) - populate(objectMap, "contactBilling", d.ContactBilling) - populate(objectMap, "contactRegistrant", d.ContactRegistrant) - populate(objectMap, "contactTech", d.ContactTech) - populateTimeRFC3339(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) - populate(objectMap, "managedHostNames", d.ManagedHostNames) - populate(objectMap, "nameServers", d.NameServers) - populate(objectMap, "privacy", d.Privacy) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "readyForDnsRecordManagement", d.ReadyForDNSRecordManagement) - populate(objectMap, "registrationStatus", d.RegistrationStatus) - populate(objectMap, "targetDnsType", d.TargetDNSType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DomainProperties. -func (d *DomainProperties) 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 "authCode": - err = unpopulate(val, "AuthCode", &d.AuthCode) - delete(rawMsg, key) - case "autoRenew": - err = unpopulate(val, "AutoRenew", &d.AutoRenew) - delete(rawMsg, key) - case "consent": - err = unpopulate(val, "Consent", &d.Consent) - delete(rawMsg, key) - case "contactAdmin": - err = unpopulate(val, "ContactAdmin", &d.ContactAdmin) - delete(rawMsg, key) - case "contactBilling": - err = unpopulate(val, "ContactBilling", &d.ContactBilling) - delete(rawMsg, key) - case "contactRegistrant": - err = unpopulate(val, "ContactRegistrant", &d.ContactRegistrant) - delete(rawMsg, key) - case "contactTech": - err = unpopulate(val, "ContactTech", &d.ContactTech) - delete(rawMsg, key) - case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &d.CreatedTime) - delete(rawMsg, key) - case "dnsType": - err = unpopulate(val, "DNSType", &d.DNSType) - delete(rawMsg, key) - case "dnsZoneId": - err = unpopulate(val, "DNSZoneID", &d.DNSZoneID) - delete(rawMsg, key) - case "domainNotRenewableReasons": - err = unpopulate(val, "DomainNotRenewableReasons", &d.DomainNotRenewableReasons) - delete(rawMsg, key) - case "expirationTime": - err = unpopulateTimeRFC3339(val, "ExpirationTime", &d.ExpirationTime) - delete(rawMsg, key) - case "lastRenewedTime": - err = unpopulateTimeRFC3339(val, "LastRenewedTime", &d.LastRenewedTime) - delete(rawMsg, key) - case "managedHostNames": - err = unpopulate(val, "ManagedHostNames", &d.ManagedHostNames) - delete(rawMsg, key) - case "nameServers": - err = unpopulate(val, "NameServers", &d.NameServers) - delete(rawMsg, key) - case "privacy": - err = unpopulate(val, "Privacy", &d.Privacy) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) - delete(rawMsg, key) - case "readyForDnsRecordManagement": - err = unpopulate(val, "ReadyForDNSRecordManagement", &d.ReadyForDNSRecordManagement) - delete(rawMsg, key) - case "registrationStatus": - err = unpopulate(val, "RegistrationStatus", &d.RegistrationStatus) - delete(rawMsg, key) - case "targetDnsType": - err = unpopulate(val, "TargetDNSType", &d.TargetDNSType) - 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 DomainPurchaseConsent. -func (d DomainPurchaseConsent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "agreedAt", d.AgreedAt) - populate(objectMap, "agreedBy", d.AgreedBy) - populate(objectMap, "agreementKeys", d.AgreementKeys) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DomainPurchaseConsent. -func (d *DomainPurchaseConsent) 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 "agreedAt": - err = unpopulateTimeRFC3339(val, "AgreedAt", &d.AgreedAt) - delete(rawMsg, key) - case "agreedBy": - err = unpopulate(val, "AgreedBy", &d.AgreedBy) - delete(rawMsg, key) - case "agreementKeys": - err = unpopulate(val, "AgreementKeys", &d.AgreementKeys) - 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 Environment. -func (e Environment) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "clusterSettings", e.ClusterSettings) - populate(objectMap, "dnsSuffix", e.DNSSuffix) - populate(objectMap, "dedicatedHostCount", e.DedicatedHostCount) - populate(objectMap, "frontEndScaleFactor", e.FrontEndScaleFactor) - populate(objectMap, "hasLinuxWorkers", e.HasLinuxWorkers) - populate(objectMap, "internalLoadBalancingMode", e.InternalLoadBalancingMode) - populate(objectMap, "ipsslAddressCount", e.IpsslAddressCount) - populate(objectMap, "maximumNumberOfMachines", e.MaximumNumberOfMachines) - populate(objectMap, "multiRoleCount", e.MultiRoleCount) - populate(objectMap, "multiSize", e.MultiSize) - populate(objectMap, "provisioningState", e.ProvisioningState) - populate(objectMap, "status", e.Status) - populate(objectMap, "suspended", e.Suspended) - populate(objectMap, "userWhitelistedIpRanges", e.UserWhitelistedIPRanges) - populate(objectMap, "virtualNetwork", e.VirtualNetwork) - populate(objectMap, "zoneRedundant", e.ZoneRedundant) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type EnvironmentPatchResource. -func (e EnvironmentPatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", e.ID) - populate(objectMap, "kind", e.Kind) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type EnvironmentResource. -func (e EnvironmentResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", e.ID) - populate(objectMap, "kind", e.Kind) - populate(objectMap, "location", e.Location) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "tags", e.Tags) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ErrorEntity. -func (e ErrorEntity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "code", e.Code) - populate(objectMap, "details", e.Details) - populate(objectMap, "extendedCode", e.ExtendedCode) - populate(objectMap, "innerErrors", e.InnerErrors) - populate(objectMap, "message", e.Message) - populate(objectMap, "messageTemplate", e.MessageTemplate) - populate(objectMap, "parameters", e.Parameters) - populate(objectMap, "target", e.Target) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Experiments. -func (e Experiments) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "rampUpRules", e.RampUpRules) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type FunctionAppMajorVersion. -func (f FunctionAppMajorVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "displayText", f.DisplayText) - populate(objectMap, "minorVersions", f.MinorVersions) - populate(objectMap, "value", f.Value) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type FunctionAppRuntimeSettings. -func (f FunctionAppRuntimeSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appInsightsSettings", f.AppInsightsSettings) - populate(objectMap, "appSettingsDictionary", f.AppSettingsDictionary) - populateTimeRFC3339(objectMap, "endOfLifeDate", f.EndOfLifeDate) - populate(objectMap, "gitHubActionSettings", f.GitHubActionSettings) - populate(objectMap, "isAutoUpdate", f.IsAutoUpdate) - populate(objectMap, "isDefault", f.IsDefault) - populate(objectMap, "isDeprecated", f.IsDeprecated) - populate(objectMap, "isEarlyAccess", f.IsEarlyAccess) - populate(objectMap, "isHidden", f.IsHidden) - populate(objectMap, "isPreview", f.IsPreview) - populate(objectMap, "remoteDebuggingSupported", f.RemoteDebuggingSupported) - populate(objectMap, "runtimeVersion", f.RuntimeVersion) - populate(objectMap, "siteConfigPropertiesDictionary", f.SiteConfigPropertiesDictionary) - populate(objectMap, "supportedFunctionsExtensionVersions", f.SupportedFunctionsExtensionVersions) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionAppRuntimeSettings. -func (f *FunctionAppRuntimeSettings) 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", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appInsightsSettings": - err = unpopulate(val, "AppInsightsSettings", &f.AppInsightsSettings) - delete(rawMsg, key) - case "appSettingsDictionary": - err = unpopulate(val, "AppSettingsDictionary", &f.AppSettingsDictionary) - delete(rawMsg, key) - case "endOfLifeDate": - err = unpopulateTimeRFC3339(val, "EndOfLifeDate", &f.EndOfLifeDate) - delete(rawMsg, key) - case "gitHubActionSettings": - err = unpopulate(val, "GitHubActionSettings", &f.GitHubActionSettings) - delete(rawMsg, key) - case "isAutoUpdate": - err = unpopulate(val, "IsAutoUpdate", &f.IsAutoUpdate) - delete(rawMsg, key) - case "isDefault": - err = unpopulate(val, "IsDefault", &f.IsDefault) - delete(rawMsg, key) - case "isDeprecated": - err = unpopulate(val, "IsDeprecated", &f.IsDeprecated) - delete(rawMsg, key) - case "isEarlyAccess": - err = unpopulate(val, "IsEarlyAccess", &f.IsEarlyAccess) - delete(rawMsg, key) - case "isHidden": - err = unpopulate(val, "IsHidden", &f.IsHidden) - delete(rawMsg, key) - case "isPreview": - err = unpopulate(val, "IsPreview", &f.IsPreview) - delete(rawMsg, key) - case "remoteDebuggingSupported": - err = unpopulate(val, "RemoteDebuggingSupported", &f.RemoteDebuggingSupported) - delete(rawMsg, key) - case "runtimeVersion": - err = unpopulate(val, "RuntimeVersion", &f.RuntimeVersion) - delete(rawMsg, key) - case "siteConfigPropertiesDictionary": - err = unpopulate(val, "SiteConfigPropertiesDictionary", &f.SiteConfigPropertiesDictionary) - delete(rawMsg, key) - case "supportedFunctionsExtensionVersions": - err = unpopulate(val, "SupportedFunctionsExtensionVersions", &f.SupportedFunctionsExtensionVersions) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FunctionAppStackProperties. -func (f FunctionAppStackProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "displayText", f.DisplayText) - populate(objectMap, "majorVersions", f.MajorVersions) - populate(objectMap, "preferredOs", f.PreferredOs) - populate(objectMap, "value", f.Value) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type FunctionEnvelopeProperties. -func (f FunctionEnvelopeProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "config", &f.Config) - populate(objectMap, "config_href", f.ConfigHref) - populate(objectMap, "files", f.Files) - populate(objectMap, "function_app_id", f.FunctionAppID) - populate(objectMap, "href", f.Href) - populate(objectMap, "invoke_url_template", f.InvokeURLTemplate) - populate(objectMap, "isDisabled", f.IsDisabled) - populate(objectMap, "language", f.Language) - populate(objectMap, "script_href", f.ScriptHref) - populate(objectMap, "script_root_path_href", f.ScriptRootPathHref) - populate(objectMap, "secrets_file_href", f.SecretsFileHref) - populate(objectMap, "test_data", f.TestData) - populate(objectMap, "test_data_href", f.TestDataHref) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type GlobalValidation. -func (g GlobalValidation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "excludedPaths", g.ExcludedPaths) - populate(objectMap, "redirectToProvider", g.RedirectToProvider) - populate(objectMap, "requireAuthentication", g.RequireAuthentication) - populate(objectMap, "unauthenticatedClientAction", g.UnauthenticatedClientAction) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type HTTPScaleRule. -func (h HTTPScaleRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "auth", h.Auth) - populate(objectMap, "metadata", h.Metadata) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type HostName. -func (h HostName) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "azureResourceName", h.AzureResourceName) - populate(objectMap, "azureResourceType", h.AzureResourceType) - populate(objectMap, "customHostNameDnsRecordType", h.CustomHostNameDNSRecordType) - populate(objectMap, "hostNameType", h.HostNameType) - populate(objectMap, "name", h.Name) - populate(objectMap, "siteNames", h.SiteNames) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type HybridConnection. -func (h HybridConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", h.ID) - populate(objectMap, "kind", h.Kind) - populate(objectMap, "name", h.Name) - populate(objectMap, "properties", h.Properties) - populate(objectMap, "type", h.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type IPSecurityRestriction. -func (i IPSecurityRestriction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "action", i.Action) - populate(objectMap, "description", i.Description) - populate(objectMap, "headers", i.Headers) - populate(objectMap, "ipAddress", i.IPAddress) - populate(objectMap, "name", i.Name) - populate(objectMap, "priority", i.Priority) - populate(objectMap, "subnetMask", i.SubnetMask) - populate(objectMap, "subnetTrafficTag", i.SubnetTrafficTag) - populate(objectMap, "tag", i.Tag) - populate(objectMap, "vnetSubnetResourceId", i.VnetSubnetResourceID) - populate(objectMap, "vnetTrafficTag", i.VnetTrafficTag) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Identifier. -func (i Identifier) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", i.ID) - populate(objectMap, "kind", i.Kind) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type IdentityProviders. -func (i IdentityProviders) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "apple", i.Apple) - populate(objectMap, "azureActiveDirectory", i.AzureActiveDirectory) - populate(objectMap, "azureStaticWebApps", i.AzureStaticWebApps) - populate(objectMap, "customOpenIdConnectProviders", i.CustomOpenIDConnectProviders) - populate(objectMap, "facebook", i.Facebook) - populate(objectMap, "gitHub", i.GitHub) - populate(objectMap, "google", i.Google) - populate(objectMap, "legacyMicrosoftAccount", i.LegacyMicrosoftAccount) - populate(objectMap, "twitter", i.Twitter) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Ingress. -func (i Ingress) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowInsecure", i.AllowInsecure) - populate(objectMap, "external", i.External) - populate(objectMap, "fqdn", i.Fqdn) - populate(objectMap, "targetPort", i.TargetPort) - populate(objectMap, "traffic", i.Traffic) - populate(objectMap, "transport", i.Transport) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type JwtClaimChecks. -func (j JwtClaimChecks) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedClientApplications", j.AllowedClientApplications) - populate(objectMap, "allowedGroups", j.AllowedGroups) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type KubeEnvironment. -func (k KubeEnvironment) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "extendedLocation", k.ExtendedLocation) - populate(objectMap, "id", k.ID) - populate(objectMap, "kind", k.Kind) - populate(objectMap, "location", k.Location) - populate(objectMap, "name", k.Name) - populate(objectMap, "properties", k.Properties) - populate(objectMap, "tags", k.Tags) - populate(objectMap, "type", k.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type KubeEnvironmentPatchResource. -func (k KubeEnvironmentPatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", k.ID) - populate(objectMap, "kind", k.Kind) - populate(objectMap, "name", k.Name) - populate(objectMap, "properties", k.Properties) - populate(objectMap, "type", k.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type LinuxJavaContainerSettings. -func (l LinuxJavaContainerSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "endOfLifeDate", l.EndOfLifeDate) - populate(objectMap, "isAutoUpdate", l.IsAutoUpdate) - populate(objectMap, "isDeprecated", l.IsDeprecated) - populate(objectMap, "isEarlyAccess", l.IsEarlyAccess) - populate(objectMap, "isHidden", l.IsHidden) - populate(objectMap, "isPreview", l.IsPreview) - populate(objectMap, "java11Runtime", l.Java11Runtime) - populate(objectMap, "java8Runtime", l.Java8Runtime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LinuxJavaContainerSettings. -func (l *LinuxJavaContainerSettings) 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", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endOfLifeDate": - err = unpopulateTimeRFC3339(val, "EndOfLifeDate", &l.EndOfLifeDate) - delete(rawMsg, key) - case "isAutoUpdate": - err = unpopulate(val, "IsAutoUpdate", &l.IsAutoUpdate) - delete(rawMsg, key) - case "isDeprecated": - err = unpopulate(val, "IsDeprecated", &l.IsDeprecated) - delete(rawMsg, key) - case "isEarlyAccess": - err = unpopulate(val, "IsEarlyAccess", &l.IsEarlyAccess) - delete(rawMsg, key) - case "isHidden": - err = unpopulate(val, "IsHidden", &l.IsHidden) - delete(rawMsg, key) - case "isPreview": - err = unpopulate(val, "IsPreview", &l.IsPreview) - delete(rawMsg, key) - case "java11Runtime": - err = unpopulate(val, "Java11Runtime", &l.Java11Runtime) - delete(rawMsg, key) - case "java8Runtime": - err = unpopulate(val, "Java8Runtime", &l.Java8Runtime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Login. -func (l Login) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedExternalRedirectUrls", l.AllowedExternalRedirectUrls) - populate(objectMap, "cookieExpiration", l.CookieExpiration) - populate(objectMap, "nonce", l.Nonce) - populate(objectMap, "preserveUrlFragmentsForLogins", l.PreserveURLFragmentsForLogins) - populate(objectMap, "routes", l.Routes) - populate(objectMap, "tokenStore", l.TokenStore) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type LoginScopes. -func (l LoginScopes) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "scopes", l.Scopes) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MSDeployCore. -func (m MSDeployCore) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appOffline", m.AppOffline) - populate(objectMap, "connectionString", m.ConnectionString) - populate(objectMap, "dbType", m.DbType) - populate(objectMap, "packageUri", m.PackageURI) - populate(objectMap, "setParameters", m.SetParameters) - populate(objectMap, "setParametersXmlFileUri", m.SetParametersXMLFileURI) - populate(objectMap, "skipAppData", m.SkipAppData) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MSDeployLogEntry. -func (m MSDeployLogEntry) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "message", m.Message) - populateTimeRFC3339(objectMap, "time", m.Time) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MSDeployLogEntry. -func (m *MSDeployLogEntry) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "message": - err = unpopulate(val, "Message", &m.Message) - delete(rawMsg, key) - case "time": - err = unpopulateTimeRFC3339(val, "Time", &m.Time) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MSDeployLogProperties. -func (m MSDeployLogProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "entries", m.Entries) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MSDeployStatusProperties. -func (m MSDeployStatusProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "complete", m.Complete) - populate(objectMap, "deployer", m.Deployer) - populateTimeRFC3339(objectMap, "endTime", m.EndTime) - populate(objectMap, "provisioningState", m.ProvisioningState) - populateTimeRFC3339(objectMap, "startTime", m.StartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MSDeployStatusProperties. -func (m *MSDeployStatusProperties) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "complete": - err = unpopulate(val, "Complete", &m.Complete) - delete(rawMsg, key) - case "deployer": - err = unpopulate(val, "Deployer", &m.Deployer) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(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) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. -func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "principalId", m.PrincipalID) - populate(objectMap, "tenantId", m.TenantID) - populate(objectMap, "type", m.Type) - populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkFeaturesProperties. -func (n NetworkFeaturesProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "hybridConnections", n.HybridConnections) - populate(objectMap, "hybridConnectionsV2", n.HybridConnectionsV2) - populate(objectMap, "virtualNetworkConnection", n.VirtualNetworkConnection) - populate(objectMap, "virtualNetworkName", n.VirtualNetworkName) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type OpenIDConnectLogin. -func (o OpenIDConnectLogin) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nameClaimType", o.NameClaimType) - populate(objectMap, "scopes", o.Scopes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. -func (o *Operation) 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", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdTime": - err = unpopulateTimeRFC3339(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) - delete(rawMsg, key) - case "geoMasterOperationId": - err = unpopulate(val, "GeoMasterOperationID", &o.GeoMasterOperationID) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &o.ID) - delete(rawMsg, key) - case "modifiedTime": - err = unpopulateTimeRFC3339(val, "ModifiedTime", &o.ModifiedTime) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &o.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PerfMonSample. -func (p *PerfMonSample) 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", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceName": - err = unpopulate(val, "InstanceName", &p.InstanceName) - delete(rawMsg, key) - case "time": - err = unpopulateTimeRFC3339(val, "Time", &p.Time) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PerfMonSet. -func (p *PerfMonSet) 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", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endTime": - err = unpopulateTimeRFC3339(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) - delete(rawMsg, key) - case "timeGrain": - err = unpopulate(val, "TimeGrain", &p.TimeGrain) - delete(rawMsg, key) - case "values": - err = unpopulate(val, "Values", &p.Values) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Plan. -func (p Plan) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "extendedLocation", p.ExtendedLocation) - populate(objectMap, "id", p.ID) - populate(objectMap, "kind", p.Kind) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "sku", p.SKU) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PlanPatchResource. -func (p PlanPatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", p.ID) - populate(objectMap, "kind", p.Kind) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PlanPatchResourceProperties. -func (p PlanPatchResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "elasticScaleEnabled", p.ElasticScaleEnabled) - populateTimeRFC3339(objectMap, "freeOfferExpirationTime", p.FreeOfferExpirationTime) - populate(objectMap, "geoRegion", p.GeoRegion) - populate(objectMap, "hostingEnvironmentProfile", p.HostingEnvironmentProfile) - populate(objectMap, "hyperV", p.HyperV) - populate(objectMap, "isSpot", p.IsSpot) - populate(objectMap, "isXenon", p.IsXenon) - populate(objectMap, "kubeEnvironmentProfile", p.KubeEnvironmentProfile) - populate(objectMap, "maximumElasticWorkerCount", p.MaximumElasticWorkerCount) - populate(objectMap, "maximumNumberOfWorkers", p.MaximumNumberOfWorkers) - populate(objectMap, "numberOfSites", p.NumberOfSites) - populate(objectMap, "perSiteScaling", p.PerSiteScaling) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "reserved", p.Reserved) - populate(objectMap, "resourceGroup", p.ResourceGroup) - populateTimeRFC3339(objectMap, "spotExpirationTime", p.SpotExpirationTime) - populate(objectMap, "status", p.Status) - populate(objectMap, "subscription", p.Subscription) - populate(objectMap, "targetWorkerCount", p.TargetWorkerCount) - populate(objectMap, "targetWorkerSizeId", p.TargetWorkerSizeID) - populate(objectMap, "workerTierName", p.WorkerTierName) - populate(objectMap, "zoneRedundant", p.ZoneRedundant) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PlanPatchResourceProperties. -func (p *PlanPatchResourceProperties) 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", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "elasticScaleEnabled": - err = unpopulate(val, "ElasticScaleEnabled", &p.ElasticScaleEnabled) - delete(rawMsg, key) - case "freeOfferExpirationTime": - err = unpopulateTimeRFC3339(val, "FreeOfferExpirationTime", &p.FreeOfferExpirationTime) - delete(rawMsg, key) - case "geoRegion": - err = unpopulate(val, "GeoRegion", &p.GeoRegion) - delete(rawMsg, key) - case "hostingEnvironmentProfile": - err = unpopulate(val, "HostingEnvironmentProfile", &p.HostingEnvironmentProfile) - delete(rawMsg, key) - case "hyperV": - err = unpopulate(val, "HyperV", &p.HyperV) - delete(rawMsg, key) - case "isSpot": - err = unpopulate(val, "IsSpot", &p.IsSpot) - delete(rawMsg, key) - case "isXenon": - err = unpopulate(val, "IsXenon", &p.IsXenon) - delete(rawMsg, key) - case "kubeEnvironmentProfile": - err = unpopulate(val, "KubeEnvironmentProfile", &p.KubeEnvironmentProfile) - delete(rawMsg, key) - case "maximumElasticWorkerCount": - err = unpopulate(val, "MaximumElasticWorkerCount", &p.MaximumElasticWorkerCount) - delete(rawMsg, key) - case "maximumNumberOfWorkers": - err = unpopulate(val, "MaximumNumberOfWorkers", &p.MaximumNumberOfWorkers) - delete(rawMsg, key) - case "numberOfSites": - err = unpopulate(val, "NumberOfSites", &p.NumberOfSites) - delete(rawMsg, key) - case "perSiteScaling": - err = unpopulate(val, "PerSiteScaling", &p.PerSiteScaling) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - case "reserved": - err = unpopulate(val, "Reserved", &p.Reserved) - delete(rawMsg, key) - case "resourceGroup": - err = unpopulate(val, "ResourceGroup", &p.ResourceGroup) - delete(rawMsg, key) - case "spotExpirationTime": - err = unpopulateTimeRFC3339(val, "SpotExpirationTime", &p.SpotExpirationTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &p.Status) - delete(rawMsg, key) - case "subscription": - err = unpopulate(val, "Subscription", &p.Subscription) - delete(rawMsg, key) - case "targetWorkerCount": - err = unpopulate(val, "TargetWorkerCount", &p.TargetWorkerCount) - delete(rawMsg, key) - case "targetWorkerSizeId": - err = unpopulate(val, "TargetWorkerSizeID", &p.TargetWorkerSizeID) - delete(rawMsg, key) - case "workerTierName": - err = unpopulate(val, "WorkerTierName", &p.WorkerTierName) - delete(rawMsg, key) - case "zoneRedundant": - err = unpopulate(val, "ZoneRedundant", &p.ZoneRedundant) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PlanProperties. -func (p PlanProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "elasticScaleEnabled", p.ElasticScaleEnabled) - populateTimeRFC3339(objectMap, "freeOfferExpirationTime", p.FreeOfferExpirationTime) - populate(objectMap, "geoRegion", p.GeoRegion) - populate(objectMap, "hostingEnvironmentProfile", p.HostingEnvironmentProfile) - populate(objectMap, "hyperV", p.HyperV) - populate(objectMap, "isSpot", p.IsSpot) - populate(objectMap, "isXenon", p.IsXenon) - populate(objectMap, "kubeEnvironmentProfile", p.KubeEnvironmentProfile) - populate(objectMap, "maximumElasticWorkerCount", p.MaximumElasticWorkerCount) - populate(objectMap, "maximumNumberOfWorkers", p.MaximumNumberOfWorkers) - populate(objectMap, "numberOfSites", p.NumberOfSites) - populate(objectMap, "perSiteScaling", p.PerSiteScaling) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "reserved", p.Reserved) - populate(objectMap, "resourceGroup", p.ResourceGroup) - populateTimeRFC3339(objectMap, "spotExpirationTime", p.SpotExpirationTime) - populate(objectMap, "status", p.Status) - populate(objectMap, "subscription", p.Subscription) - populate(objectMap, "targetWorkerCount", p.TargetWorkerCount) - populate(objectMap, "targetWorkerSizeId", p.TargetWorkerSizeID) - populate(objectMap, "workerTierName", p.WorkerTierName) - populate(objectMap, "zoneRedundant", p.ZoneRedundant) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PlanProperties. -func (p *PlanProperties) 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", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "elasticScaleEnabled": - err = unpopulate(val, "ElasticScaleEnabled", &p.ElasticScaleEnabled) - delete(rawMsg, key) - case "freeOfferExpirationTime": - err = unpopulateTimeRFC3339(val, "FreeOfferExpirationTime", &p.FreeOfferExpirationTime) - delete(rawMsg, key) - case "geoRegion": - err = unpopulate(val, "GeoRegion", &p.GeoRegion) - delete(rawMsg, key) - case "hostingEnvironmentProfile": - err = unpopulate(val, "HostingEnvironmentProfile", &p.HostingEnvironmentProfile) - delete(rawMsg, key) - case "hyperV": - err = unpopulate(val, "HyperV", &p.HyperV) - delete(rawMsg, key) - case "isSpot": - err = unpopulate(val, "IsSpot", &p.IsSpot) - delete(rawMsg, key) - case "isXenon": - err = unpopulate(val, "IsXenon", &p.IsXenon) - delete(rawMsg, key) - case "kubeEnvironmentProfile": - err = unpopulate(val, "KubeEnvironmentProfile", &p.KubeEnvironmentProfile) - delete(rawMsg, key) - case "maximumElasticWorkerCount": - err = unpopulate(val, "MaximumElasticWorkerCount", &p.MaximumElasticWorkerCount) - delete(rawMsg, key) - case "maximumNumberOfWorkers": - err = unpopulate(val, "MaximumNumberOfWorkers", &p.MaximumNumberOfWorkers) - delete(rawMsg, key) - case "numberOfSites": - err = unpopulate(val, "NumberOfSites", &p.NumberOfSites) - delete(rawMsg, key) - case "perSiteScaling": - err = unpopulate(val, "PerSiteScaling", &p.PerSiteScaling) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - case "reserved": - err = unpopulate(val, "Reserved", &p.Reserved) - delete(rawMsg, key) - case "resourceGroup": - err = unpopulate(val, "ResourceGroup", &p.ResourceGroup) - delete(rawMsg, key) - case "spotExpirationTime": - err = unpopulateTimeRFC3339(val, "SpotExpirationTime", &p.SpotExpirationTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &p.Status) - delete(rawMsg, key) - case "subscription": - err = unpopulate(val, "Subscription", &p.Subscription) - delete(rawMsg, key) - case "targetWorkerCount": - err = unpopulate(val, "TargetWorkerCount", &p.TargetWorkerCount) - delete(rawMsg, key) - case "targetWorkerSizeId": - err = unpopulate(val, "TargetWorkerSizeID", &p.TargetWorkerSizeID) - delete(rawMsg, key) - case "workerTierName": - err = unpopulate(val, "WorkerTierName", &p.WorkerTierName) - delete(rawMsg, key) - case "zoneRedundant": - err = unpopulate(val, "ZoneRedundant", &p.ZoneRedundant) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PremierAddOn. -func (p PremierAddOn) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", p.ID) - populate(objectMap, "kind", p.Kind) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PremierAddOnPatchResource. -func (p PremierAddOnPatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", p.ID) - populate(objectMap, "kind", p.Kind) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateAccessProperties. -func (p PrivateAccessProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "enabled", p.Enabled) - populate(objectMap, "virtualNetworks", p.VirtualNetworks) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateAccessVirtualNetwork. -func (p PrivateAccessVirtualNetwork) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "key", p.Key) - populate(objectMap, "name", p.Name) - populate(objectMap, "resourceId", p.ResourceID) - populate(objectMap, "subnets", p.Subnets) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ProcessInfoProperties. -func (p ProcessInfoProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "children", p.Children) - populate(objectMap, "command_line", p.CommandLine) - populate(objectMap, "deployment_name", p.DeploymentName) - populate(objectMap, "description", p.Description) - populate(objectMap, "environment_variables", p.EnvironmentVariables) - populate(objectMap, "file_name", p.FileName) - populate(objectMap, "handle_count", p.HandleCount) - populate(objectMap, "href", p.Href) - populate(objectMap, "identifier", p.Identifier) - populate(objectMap, "iis_profile_timeout_in_seconds", p.IisProfileTimeoutInSeconds) - populate(objectMap, "is_iis_profile_running", p.IsIisProfileRunning) - populate(objectMap, "is_profile_running", p.IsProfileRunning) - populate(objectMap, "is_scm_site", p.IsScmSite) - populate(objectMap, "is_webjob", p.IsWebjob) - populate(objectMap, "minidump", p.Minidump) - populate(objectMap, "module_count", p.ModuleCount) - populate(objectMap, "modules", p.Modules) - populate(objectMap, "non_paged_system_memory", p.NonPagedSystemMemory) - populate(objectMap, "open_file_handles", p.OpenFileHandles) - populate(objectMap, "paged_memory", p.PagedMemory) - populate(objectMap, "paged_system_memory", p.PagedSystemMemory) - populate(objectMap, "parent", p.Parent) - populate(objectMap, "peak_paged_memory", p.PeakPagedMemory) - populate(objectMap, "peak_virtual_memory", p.PeakVirtualMemory) - 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) - populate(objectMap, "thread_count", p.ThreadCount) - populate(objectMap, "threads", p.Threads) - populateTimeRFC3339(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) - populate(objectMap, "virtual_memory", p.VirtualMemory) - populate(objectMap, "working_set", p.WorkingSet) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessInfoProperties. -func (p *ProcessInfoProperties) 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", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "children": - err = unpopulate(val, "Children", &p.Children) - delete(rawMsg, key) - case "command_line": - err = unpopulate(val, "CommandLine", &p.CommandLine) - delete(rawMsg, key) - case "deployment_name": - err = unpopulate(val, "DeploymentName", &p.DeploymentName) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &p.Description) - delete(rawMsg, key) - case "environment_variables": - err = unpopulate(val, "EnvironmentVariables", &p.EnvironmentVariables) - delete(rawMsg, key) - case "file_name": - err = unpopulate(val, "FileName", &p.FileName) - delete(rawMsg, key) - case "handle_count": - err = unpopulate(val, "HandleCount", &p.HandleCount) - delete(rawMsg, key) - case "href": - err = unpopulate(val, "Href", &p.Href) - delete(rawMsg, key) - case "identifier": - err = unpopulate(val, "Identifier", &p.Identifier) - delete(rawMsg, key) - case "iis_profile_timeout_in_seconds": - err = unpopulate(val, "IisProfileTimeoutInSeconds", &p.IisProfileTimeoutInSeconds) - delete(rawMsg, key) - case "is_iis_profile_running": - err = unpopulate(val, "IsIisProfileRunning", &p.IsIisProfileRunning) - delete(rawMsg, key) - case "is_profile_running": - err = unpopulate(val, "IsProfileRunning", &p.IsProfileRunning) - delete(rawMsg, key) - case "is_scm_site": - err = unpopulate(val, "IsScmSite", &p.IsScmSite) - delete(rawMsg, key) - case "is_webjob": - err = unpopulate(val, "IsWebjob", &p.IsWebjob) - delete(rawMsg, key) - case "minidump": - err = unpopulate(val, "Minidump", &p.Minidump) - delete(rawMsg, key) - case "module_count": - err = unpopulate(val, "ModuleCount", &p.ModuleCount) - delete(rawMsg, key) - case "modules": - err = unpopulate(val, "Modules", &p.Modules) - delete(rawMsg, key) - case "non_paged_system_memory": - err = unpopulate(val, "NonPagedSystemMemory", &p.NonPagedSystemMemory) - delete(rawMsg, key) - case "open_file_handles": - err = unpopulate(val, "OpenFileHandles", &p.OpenFileHandles) - delete(rawMsg, key) - case "paged_memory": - err = unpopulate(val, "PagedMemory", &p.PagedMemory) - delete(rawMsg, key) - case "paged_system_memory": - err = unpopulate(val, "PagedSystemMemory", &p.PagedSystemMemory) - delete(rawMsg, key) - case "parent": - err = unpopulate(val, "Parent", &p.Parent) - delete(rawMsg, key) - case "peak_paged_memory": - err = unpopulate(val, "PeakPagedMemory", &p.PeakPagedMemory) - delete(rawMsg, key) - case "peak_virtual_memory": - err = unpopulate(val, "PeakVirtualMemory", &p.PeakVirtualMemory) - delete(rawMsg, key) - case "peak_working_set": - err = unpopulate(val, "PeakWorkingSet", &p.PeakWorkingSet) - delete(rawMsg, key) - case "private_memory": - err = unpopulate(val, "PrivateMemory", &p.PrivateMemory) - delete(rawMsg, key) - case "privileged_cpu_time": - err = unpopulate(val, "PrivilegedCPUTime", &p.PrivilegedCPUTime) - delete(rawMsg, key) - case "start_time": - err = unpopulateTimeRFC3339(val, "StartTime", &p.StartTime) - delete(rawMsg, key) - case "thread_count": - err = unpopulate(val, "ThreadCount", &p.ThreadCount) - delete(rawMsg, key) - case "threads": - err = unpopulate(val, "Threads", &p.Threads) - delete(rawMsg, key) - case "time_stamp": - err = unpopulateTimeRFC3339(val, "TimeStamp", &p.TimeStamp) - delete(rawMsg, key) - case "total_cpu_time": - err = unpopulate(val, "TotalCPUTime", &p.TotalCPUTime) - delete(rawMsg, key) - case "user_cpu_time": - err = unpopulate(val, "UserCPUTime", &p.UserCPUTime) - delete(rawMsg, key) - case "user_name": - err = unpopulate(val, "UserName", &p.UserName) - delete(rawMsg, key) - case "virtual_memory": - err = unpopulate(val, "VirtualMemory", &p.VirtualMemory) - delete(rawMsg, key) - case "working_set": - err = unpopulate(val, "WorkingSet", &p.WorkingSet) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProcessThreadInfoProperties. -func (p ProcessThreadInfoProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "base_priority", p.BasePriority) - populate(objectMap, "current_priority", p.CurrentPriority) - populate(objectMap, "href", p.Href) - populate(objectMap, "identifier", p.Identifier) - populate(objectMap, "priority_level", p.PriorityLevel) - populate(objectMap, "process", p.Process) - populate(objectMap, "start_address", p.StartAddress) - populateTimeRFC3339(objectMap, "start_time", p.StartTime) - populate(objectMap, "state", p.State) - populate(objectMap, "total_processor_time", p.TotalProcessorTime) - populate(objectMap, "user_processor_time", p.UserProcessorTime) - populate(objectMap, "wait_reason", p.WaitReason) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessThreadInfoProperties. -func (p *ProcessThreadInfoProperties) 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", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "base_priority": - err = unpopulate(val, "BasePriority", &p.BasePriority) - delete(rawMsg, key) - case "current_priority": - err = unpopulate(val, "CurrentPriority", &p.CurrentPriority) - delete(rawMsg, key) - case "href": - err = unpopulate(val, "Href", &p.Href) - delete(rawMsg, key) - case "identifier": - err = unpopulate(val, "Identifier", &p.Identifier) - delete(rawMsg, key) - case "priority_level": - err = unpopulate(val, "PriorityLevel", &p.PriorityLevel) - delete(rawMsg, key) - case "process": - err = unpopulate(val, "Process", &p.Process) - delete(rawMsg, key) - case "start_address": - err = unpopulate(val, "StartAddress", &p.StartAddress) - delete(rawMsg, key) - case "start_time": - err = unpopulateTimeRFC3339(val, "StartTime", &p.StartTime) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &p.State) - delete(rawMsg, key) - case "total_processor_time": - err = unpopulate(val, "TotalProcessorTime", &p.TotalProcessorTime) - delete(rawMsg, key) - case "user_processor_time": - err = unpopulate(val, "UserProcessorTime", &p.UserProcessorTime) - delete(rawMsg, key) - case "wait_reason": - err = unpopulate(val, "WaitReason", &p.WaitReason) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PublicCertificateProperties. -func (p PublicCertificateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateByteArray(objectMap, "blob", p.Blob, runtime.Base64StdFormat) - populate(objectMap, "publicCertificateLocation", p.PublicCertificateLocation) - populate(objectMap, "thumbprint", p.Thumbprint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PublicCertificateProperties. -func (p *PublicCertificateProperties) 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", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "blob": - err = runtime.DecodeByteArray(string(val), &p.Blob, runtime.Base64StdFormat) - delete(rawMsg, key) - case "publicCertificateLocation": - err = unpopulate(val, "PublicCertificateLocation", &p.PublicCertificateLocation) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &p.Thumbprint) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type QueryUtterancesResults. -func (q QueryUtterancesResults) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "query", q.Query) - populate(objectMap, "results", q.Results) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type QueueScaleRule. -func (q QueueScaleRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "auth", q.Auth) - populate(objectMap, "queueLength", q.QueueLength) - populate(objectMap, "queueName", q.QueueName) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type RecommendationProperties. -func (r RecommendationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actionName", r.ActionName) - populate(objectMap, "bladeName", r.BladeName) - populate(objectMap, "categoryTags", r.CategoryTags) - populate(objectMap, "channels", r.Channels) - populateTimeRFC3339(objectMap, "creationTime", r.CreationTime) - populate(objectMap, "displayName", r.DisplayName) - populate(objectMap, "enabled", r.Enabled) - populateTimeRFC3339(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) - 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) - populate(objectMap, "states", r.States) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendationProperties. -func (r *RecommendationProperties) 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 "actionName": - err = unpopulate(val, "ActionName", &r.ActionName) - delete(rawMsg, key) - case "bladeName": - err = unpopulate(val, "BladeName", &r.BladeName) - delete(rawMsg, key) - case "categoryTags": - err = unpopulate(val, "CategoryTags", &r.CategoryTags) - delete(rawMsg, key) - case "channels": - err = unpopulate(val, "Channels", &r.Channels) - delete(rawMsg, key) - case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &r.CreationTime) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &r.DisplayName) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &r.Enabled) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &r.EndTime) - delete(rawMsg, key) - case "extensionName": - err = unpopulate(val, "ExtensionName", &r.ExtensionName) - delete(rawMsg, key) - case "forwardLink": - err = unpopulate(val, "ForwardLink", &r.ForwardLink) - delete(rawMsg, key) - case "isDynamic": - err = unpopulate(val, "IsDynamic", &r.IsDynamic) - delete(rawMsg, key) - case "level": - err = unpopulate(val, "Level", &r.Level) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &r.Message) - delete(rawMsg, key) - case "nextNotificationTime": - err = unpopulateTimeRFC3339(val, "NextNotificationTime", &r.NextNotificationTime) - delete(rawMsg, key) - case "notificationExpirationTime": - err = unpopulateTimeRFC3339(val, "NotificationExpirationTime", &r.NotificationExpirationTime) - delete(rawMsg, key) - case "notifiedTime": - err = unpopulateTimeRFC3339(val, "NotifiedTime", &r.NotifiedTime) - delete(rawMsg, key) - case "recommendationId": - err = unpopulate(val, "RecommendationID", &r.RecommendationID) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &r.ResourceID) - delete(rawMsg, key) - case "resourceScope": - err = unpopulate(val, "ResourceScope", &r.ResourceScope) - delete(rawMsg, key) - case "ruleName": - err = unpopulate(val, "RuleName", &r.RuleName) - delete(rawMsg, key) - case "score": - err = unpopulate(val, "Score", &r.Score) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &r.StartTime) - delete(rawMsg, key) - case "states": - err = unpopulate(val, "States", &r.States) - 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 RecommendationRuleProperties. -func (r RecommendationRuleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actionName", r.ActionName) - populate(objectMap, "bladeName", r.BladeName) - populate(objectMap, "categoryTags", r.CategoryTags) - populate(objectMap, "channels", r.Channels) - populate(objectMap, "description", r.Description) - populate(objectMap, "displayName", r.DisplayName) - 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) - populate(objectMap, "recommendationId", r.RecommendationID) - populate(objectMap, "recommendationName", r.RecommendationName) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type RelayServiceConnectionEntity. -func (r RelayServiceConnectionEntity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", r.ID) - populate(objectMap, "kind", r.Kind) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type RemotePrivateEndpointConnectionARMResourceProperties. -func (r RemotePrivateEndpointConnectionARMResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ipAddresses", r.IPAddresses) - populate(objectMap, "privateEndpoint", r.PrivateEndpoint) - populate(objectMap, "privateLinkServiceConnectionState", r.PrivateLinkServiceConnectionState) - populate(objectMap, "provisioningState", r.ProvisioningState) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type RemotePrivateEndpointConnectionProperties. -func (r RemotePrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ipAddresses", r.IPAddresses) - populate(objectMap, "privateEndpoint", r.PrivateEndpoint) - populate(objectMap, "privateLinkServiceConnectionState", r.PrivateLinkServiceConnectionState) - populate(objectMap, "provisioningState", r.ProvisioningState) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", r.ID) - populate(objectMap, "kind", r.Kind) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceMetricDefinitionProperties. -func (r ResourceMetricDefinitionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "metricAvailabilities", r.MetricAvailabilities) - populate(objectMap, "primaryAggregationType", r.PrimaryAggregationType) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "resourceUri", r.ResourceURI) - populate(objectMap, "unit", r.Unit) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ResponseMessageEnvelopeRemotePrivateEndpointConnection. -func (r ResponseMessageEnvelopeRemotePrivateEndpointConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "error", r.Error) - populate(objectMap, "id", r.ID) - populate(objectMap, "identity", r.Identity) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "plan", r.Plan) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "sku", r.SKU) - populate(objectMap, "status", r.Status) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - populate(objectMap, "zones", r.Zones) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type RestoreRequestProperties. -func (r RestoreRequestProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "adjustConnectionStrings", r.AdjustConnectionStrings) - populate(objectMap, "appServicePlan", r.AppServicePlan) - populate(objectMap, "blobName", r.BlobName) - populate(objectMap, "databases", r.Databases) - populate(objectMap, "hostingEnvironment", r.HostingEnvironment) - populate(objectMap, "ignoreConflictingHostNames", r.IgnoreConflictingHostNames) - populate(objectMap, "ignoreDatabases", r.IgnoreDatabases) - populate(objectMap, "operationType", r.OperationType) - populate(objectMap, "overwrite", r.Overwrite) - populate(objectMap, "siteName", r.SiteName) - populate(objectMap, "storageAccountUrl", r.StorageAccountURL) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Revision. -func (r Revision) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", r.ID) - populate(objectMap, "kind", r.Kind) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type RevisionProperties. -func (r RevisionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "active", r.Active) - populateTimeRFC3339(objectMap, "createdTime", r.CreatedTime) - populate(objectMap, "fqdn", r.Fqdn) - populate(objectMap, "healthState", r.HealthState) - populate(objectMap, "provisioningError", r.ProvisioningError) - populate(objectMap, "provisioningState", r.ProvisioningState) - populate(objectMap, "replicas", r.Replicas) - populate(objectMap, "template", r.Template) - populate(objectMap, "trafficWeight", r.TrafficWeight) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RevisionProperties. -func (r *RevisionProperties) 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 "active": - err = unpopulate(val, "Active", &r.Active) - delete(rawMsg, key) - case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &r.CreatedTime) - delete(rawMsg, key) - case "fqdn": - err = unpopulate(val, "Fqdn", &r.Fqdn) - delete(rawMsg, key) - case "healthState": - err = unpopulate(val, "HealthState", &r.HealthState) - delete(rawMsg, key) - case "provisioningError": - err = unpopulate(val, "ProvisioningError", &r.ProvisioningError) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) - delete(rawMsg, key) - case "replicas": - err = unpopulate(val, "Replicas", &r.Replicas) - delete(rawMsg, key) - case "template": - err = unpopulate(val, "Template", &r.Template) - delete(rawMsg, key) - case "trafficWeight": - err = unpopulate(val, "TrafficWeight", &r.TrafficWeight) - 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 SKUDescription. -func (s SKUDescription) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "capabilities", s.Capabilities) - populate(objectMap, "capacity", s.Capacity) - populate(objectMap, "family", s.Family) - populate(objectMap, "locations", s.Locations) - populate(objectMap, "name", s.Name) - populate(objectMap, "skuCapacity", s.SKUCapacity) - populate(objectMap, "size", s.Size) - populate(objectMap, "tier", s.Tier) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SampleUtterance. -func (s SampleUtterance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "links", s.Links) - populate(objectMap, "qid", s.Qid) - populate(objectMap, "text", s.Text) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Scale. -func (s Scale) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "maxReplicas", s.MaxReplicas) - populate(objectMap, "minReplicas", s.MinReplicas) - populate(objectMap, "rules", s.Rules) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Site. -func (s Site) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "extendedLocation", s.ExtendedLocation) - populate(objectMap, "id", s.ID) - populate(objectMap, "identity", s.Identity) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SiteAuthSettingsProperties. -func (s SiteAuthSettingsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "aadClaimsAuthorization", s.AADClaimsAuthorization) - populate(objectMap, "additionalLoginParams", s.AdditionalLoginParams) - populate(objectMap, "allowedAudiences", s.AllowedAudiences) - populate(objectMap, "allowedExternalRedirectUrls", s.AllowedExternalRedirectUrls) - populate(objectMap, "authFilePath", s.AuthFilePath) - populate(objectMap, "clientId", s.ClientID) - populate(objectMap, "clientSecret", s.ClientSecret) - populate(objectMap, "clientSecretCertificateThumbprint", s.ClientSecretCertificateThumbprint) - populate(objectMap, "clientSecretSettingName", s.ClientSecretSettingName) - populate(objectMap, "configVersion", s.ConfigVersion) - populate(objectMap, "defaultProvider", s.DefaultProvider) - populate(objectMap, "enabled", s.Enabled) - populate(objectMap, "facebookAppId", s.FacebookAppID) - populate(objectMap, "facebookAppSecret", s.FacebookAppSecret) - populate(objectMap, "facebookAppSecretSettingName", s.FacebookAppSecretSettingName) - populate(objectMap, "facebookOAuthScopes", s.FacebookOAuthScopes) - populate(objectMap, "gitHubClientId", s.GitHubClientID) - populate(objectMap, "gitHubClientSecret", s.GitHubClientSecret) - populate(objectMap, "gitHubClientSecretSettingName", s.GitHubClientSecretSettingName) - populate(objectMap, "gitHubOAuthScopes", s.GitHubOAuthScopes) - populate(objectMap, "googleClientId", s.GoogleClientID) - populate(objectMap, "googleClientSecret", s.GoogleClientSecret) - populate(objectMap, "googleClientSecretSettingName", s.GoogleClientSecretSettingName) - populate(objectMap, "googleOAuthScopes", s.GoogleOAuthScopes) - populate(objectMap, "isAuthFromFile", s.IsAuthFromFile) - populate(objectMap, "issuer", s.Issuer) - populate(objectMap, "microsoftAccountClientId", s.MicrosoftAccountClientID) - populate(objectMap, "microsoftAccountClientSecret", s.MicrosoftAccountClientSecret) - populate(objectMap, "microsoftAccountClientSecretSettingName", s.MicrosoftAccountClientSecretSettingName) - populate(objectMap, "microsoftAccountOAuthScopes", s.MicrosoftAccountOAuthScopes) - populate(objectMap, "runtimeVersion", s.RuntimeVersion) - populate(objectMap, "tokenRefreshExtensionHours", s.TokenRefreshExtensionHours) - populate(objectMap, "tokenStoreEnabled", s.TokenStoreEnabled) - populate(objectMap, "twitterConsumerKey", s.TwitterConsumerKey) - populate(objectMap, "twitterConsumerSecret", s.TwitterConsumerSecret) - populate(objectMap, "twitterConsumerSecretSettingName", s.TwitterConsumerSecretSettingName) - populate(objectMap, "unauthenticatedClientAction", s.UnauthenticatedClientAction) - populate(objectMap, "validateIssuer", s.ValidateIssuer) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SiteConfig. -func (s SiteConfig) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "apiDefinition", s.APIDefinition) - populate(objectMap, "apiManagementConfig", s.APIManagementConfig) - populate(objectMap, "acrUseManagedIdentityCreds", s.AcrUseManagedIdentityCreds) - populate(objectMap, "acrUserManagedIdentityID", s.AcrUserManagedIdentityID) - populate(objectMap, "alwaysOn", s.AlwaysOn) - populate(objectMap, "appCommandLine", s.AppCommandLine) - populate(objectMap, "appSettings", s.AppSettings) - populate(objectMap, "autoHealEnabled", s.AutoHealEnabled) - populate(objectMap, "autoHealRules", s.AutoHealRules) - populate(objectMap, "autoSwapSlotName", s.AutoSwapSlotName) - populate(objectMap, "azureStorageAccounts", s.AzureStorageAccounts) - populate(objectMap, "connectionStrings", s.ConnectionStrings) - populate(objectMap, "cors", s.Cors) - populate(objectMap, "defaultDocuments", s.DefaultDocuments) - populate(objectMap, "detailedErrorLoggingEnabled", s.DetailedErrorLoggingEnabled) - populate(objectMap, "documentRoot", s.DocumentRoot) - populate(objectMap, "experiments", s.Experiments) - populate(objectMap, "ftpsState", s.FtpsState) - populate(objectMap, "functionAppScaleLimit", s.FunctionAppScaleLimit) - populate(objectMap, "functionsRuntimeScaleMonitoringEnabled", s.FunctionsRuntimeScaleMonitoringEnabled) - populate(objectMap, "httpLoggingEnabled", s.HTTPLoggingEnabled) - populate(objectMap, "handlerMappings", s.HandlerMappings) - populate(objectMap, "healthCheckPath", s.HealthCheckPath) - populate(objectMap, "http20Enabled", s.Http20Enabled) - populate(objectMap, "ipSecurityRestrictions", s.IPSecurityRestrictions) - populate(objectMap, "javaContainer", s.JavaContainer) - populate(objectMap, "javaContainerVersion", s.JavaContainerVersion) - populate(objectMap, "javaVersion", s.JavaVersion) - populate(objectMap, "keyVaultReferenceIdentity", s.KeyVaultReferenceIdentity) - populate(objectMap, "limits", s.Limits) - populate(objectMap, "linuxFxVersion", s.LinuxFxVersion) - populate(objectMap, "loadBalancing", s.LoadBalancing) - populate(objectMap, "localMySqlEnabled", s.LocalMySQLEnabled) - populate(objectMap, "logsDirectorySizeLimit", s.LogsDirectorySizeLimit) - populate(objectMap, "machineKey", s.MachineKey) - populate(objectMap, "managedPipelineMode", s.ManagedPipelineMode) - populate(objectMap, "managedServiceIdentityId", s.ManagedServiceIdentityID) - populate(objectMap, "minTlsVersion", s.MinTLSVersion) - populate(objectMap, "minimumElasticInstanceCount", s.MinimumElasticInstanceCount) - populate(objectMap, "netFrameworkVersion", s.NetFrameworkVersion) - populate(objectMap, "nodeVersion", s.NodeVersion) - populate(objectMap, "numberOfWorkers", s.NumberOfWorkers) - populate(objectMap, "phpVersion", s.PhpVersion) - populate(objectMap, "powerShellVersion", s.PowerShellVersion) - populate(objectMap, "preWarmedInstanceCount", s.PreWarmedInstanceCount) - populate(objectMap, "publicNetworkAccess", s.PublicNetworkAccess) - populate(objectMap, "publishingUsername", s.PublishingUsername) - populate(objectMap, "push", s.Push) - populate(objectMap, "pythonVersion", s.PythonVersion) - populate(objectMap, "remoteDebuggingEnabled", s.RemoteDebuggingEnabled) - populate(objectMap, "remoteDebuggingVersion", s.RemoteDebuggingVersion) - populate(objectMap, "requestTracingEnabled", s.RequestTracingEnabled) - populateTimeRFC3339(objectMap, "requestTracingExpirationTime", s.RequestTracingExpirationTime) - populate(objectMap, "scmIpSecurityRestrictions", s.ScmIPSecurityRestrictions) - populate(objectMap, "scmIpSecurityRestrictionsUseMain", s.ScmIPSecurityRestrictionsUseMain) - populate(objectMap, "scmMinTlsVersion", s.ScmMinTLSVersion) - populate(objectMap, "scmType", s.ScmType) - populate(objectMap, "tracingOptions", s.TracingOptions) - populate(objectMap, "use32BitWorkerProcess", s.Use32BitWorkerProcess) - populate(objectMap, "virtualApplications", s.VirtualApplications) - populate(objectMap, "vnetName", s.VnetName) - populate(objectMap, "vnetPrivatePortsCount", s.VnetPrivatePortsCount) - populate(objectMap, "vnetRouteAllEnabled", s.VnetRouteAllEnabled) - populate(objectMap, "webSocketsEnabled", s.WebSocketsEnabled) - populate(objectMap, "websiteTimeZone", s.WebsiteTimeZone) - populate(objectMap, "windowsFxVersion", s.WindowsFxVersion) - populate(objectMap, "xManagedServiceIdentityId", s.XManagedServiceIdentityID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SiteConfig. -func (s *SiteConfig) 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", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiDefinition": - err = unpopulate(val, "APIDefinition", &s.APIDefinition) - delete(rawMsg, key) - case "apiManagementConfig": - err = unpopulate(val, "APIManagementConfig", &s.APIManagementConfig) - delete(rawMsg, key) - case "acrUseManagedIdentityCreds": - err = unpopulate(val, "AcrUseManagedIdentityCreds", &s.AcrUseManagedIdentityCreds) - delete(rawMsg, key) - case "acrUserManagedIdentityID": - err = unpopulate(val, "AcrUserManagedIdentityID", &s.AcrUserManagedIdentityID) - delete(rawMsg, key) - case "alwaysOn": - err = unpopulate(val, "AlwaysOn", &s.AlwaysOn) - delete(rawMsg, key) - case "appCommandLine": - err = unpopulate(val, "AppCommandLine", &s.AppCommandLine) - delete(rawMsg, key) - case "appSettings": - err = unpopulate(val, "AppSettings", &s.AppSettings) - delete(rawMsg, key) - case "autoHealEnabled": - err = unpopulate(val, "AutoHealEnabled", &s.AutoHealEnabled) - delete(rawMsg, key) - case "autoHealRules": - err = unpopulate(val, "AutoHealRules", &s.AutoHealRules) - delete(rawMsg, key) - case "autoSwapSlotName": - err = unpopulate(val, "AutoSwapSlotName", &s.AutoSwapSlotName) - delete(rawMsg, key) - case "azureStorageAccounts": - err = unpopulate(val, "AzureStorageAccounts", &s.AzureStorageAccounts) - delete(rawMsg, key) - case "connectionStrings": - err = unpopulate(val, "ConnectionStrings", &s.ConnectionStrings) - delete(rawMsg, key) - case "cors": - err = unpopulate(val, "Cors", &s.Cors) - delete(rawMsg, key) - case "defaultDocuments": - err = unpopulate(val, "DefaultDocuments", &s.DefaultDocuments) - delete(rawMsg, key) - case "detailedErrorLoggingEnabled": - err = unpopulate(val, "DetailedErrorLoggingEnabled", &s.DetailedErrorLoggingEnabled) - delete(rawMsg, key) - case "documentRoot": - err = unpopulate(val, "DocumentRoot", &s.DocumentRoot) - delete(rawMsg, key) - case "experiments": - err = unpopulate(val, "Experiments", &s.Experiments) - delete(rawMsg, key) - case "ftpsState": - err = unpopulate(val, "FtpsState", &s.FtpsState) - delete(rawMsg, key) - case "functionAppScaleLimit": - err = unpopulate(val, "FunctionAppScaleLimit", &s.FunctionAppScaleLimit) - delete(rawMsg, key) - case "functionsRuntimeScaleMonitoringEnabled": - err = unpopulate(val, "FunctionsRuntimeScaleMonitoringEnabled", &s.FunctionsRuntimeScaleMonitoringEnabled) - delete(rawMsg, key) - case "httpLoggingEnabled": - err = unpopulate(val, "HTTPLoggingEnabled", &s.HTTPLoggingEnabled) - delete(rawMsg, key) - case "handlerMappings": - err = unpopulate(val, "HandlerMappings", &s.HandlerMappings) - delete(rawMsg, key) - case "healthCheckPath": - err = unpopulate(val, "HealthCheckPath", &s.HealthCheckPath) - delete(rawMsg, key) - case "http20Enabled": - err = unpopulate(val, "Http20Enabled", &s.Http20Enabled) - delete(rawMsg, key) - case "ipSecurityRestrictions": - err = unpopulate(val, "IPSecurityRestrictions", &s.IPSecurityRestrictions) - delete(rawMsg, key) - case "javaContainer": - err = unpopulate(val, "JavaContainer", &s.JavaContainer) - delete(rawMsg, key) - case "javaContainerVersion": - err = unpopulate(val, "JavaContainerVersion", &s.JavaContainerVersion) - delete(rawMsg, key) - case "javaVersion": - err = unpopulate(val, "JavaVersion", &s.JavaVersion) - delete(rawMsg, key) - case "keyVaultReferenceIdentity": - err = unpopulate(val, "KeyVaultReferenceIdentity", &s.KeyVaultReferenceIdentity) - delete(rawMsg, key) - case "limits": - err = unpopulate(val, "Limits", &s.Limits) - delete(rawMsg, key) - case "linuxFxVersion": - err = unpopulate(val, "LinuxFxVersion", &s.LinuxFxVersion) - delete(rawMsg, key) - case "loadBalancing": - err = unpopulate(val, "LoadBalancing", &s.LoadBalancing) - delete(rawMsg, key) - case "localMySqlEnabled": - err = unpopulate(val, "LocalMySQLEnabled", &s.LocalMySQLEnabled) - delete(rawMsg, key) - case "logsDirectorySizeLimit": - err = unpopulate(val, "LogsDirectorySizeLimit", &s.LogsDirectorySizeLimit) - delete(rawMsg, key) - case "machineKey": - err = unpopulate(val, "MachineKey", &s.MachineKey) - delete(rawMsg, key) - case "managedPipelineMode": - err = unpopulate(val, "ManagedPipelineMode", &s.ManagedPipelineMode) - delete(rawMsg, key) - case "managedServiceIdentityId": - err = unpopulate(val, "ManagedServiceIdentityID", &s.ManagedServiceIdentityID) - delete(rawMsg, key) - case "minTlsVersion": - err = unpopulate(val, "MinTLSVersion", &s.MinTLSVersion) - delete(rawMsg, key) - case "minimumElasticInstanceCount": - err = unpopulate(val, "MinimumElasticInstanceCount", &s.MinimumElasticInstanceCount) - delete(rawMsg, key) - case "netFrameworkVersion": - err = unpopulate(val, "NetFrameworkVersion", &s.NetFrameworkVersion) - delete(rawMsg, key) - case "nodeVersion": - err = unpopulate(val, "NodeVersion", &s.NodeVersion) - delete(rawMsg, key) - case "numberOfWorkers": - err = unpopulate(val, "NumberOfWorkers", &s.NumberOfWorkers) - delete(rawMsg, key) - case "phpVersion": - err = unpopulate(val, "PhpVersion", &s.PhpVersion) - delete(rawMsg, key) - case "powerShellVersion": - err = unpopulate(val, "PowerShellVersion", &s.PowerShellVersion) - delete(rawMsg, key) - case "preWarmedInstanceCount": - err = unpopulate(val, "PreWarmedInstanceCount", &s.PreWarmedInstanceCount) - delete(rawMsg, key) - case "publicNetworkAccess": - err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess) - delete(rawMsg, key) - case "publishingUsername": - err = unpopulate(val, "PublishingUsername", &s.PublishingUsername) - delete(rawMsg, key) - case "push": - err = unpopulate(val, "Push", &s.Push) - delete(rawMsg, key) - case "pythonVersion": - err = unpopulate(val, "PythonVersion", &s.PythonVersion) - delete(rawMsg, key) - case "remoteDebuggingEnabled": - err = unpopulate(val, "RemoteDebuggingEnabled", &s.RemoteDebuggingEnabled) - delete(rawMsg, key) - case "remoteDebuggingVersion": - err = unpopulate(val, "RemoteDebuggingVersion", &s.RemoteDebuggingVersion) - delete(rawMsg, key) - case "requestTracingEnabled": - err = unpopulate(val, "RequestTracingEnabled", &s.RequestTracingEnabled) - delete(rawMsg, key) - case "requestTracingExpirationTime": - err = unpopulateTimeRFC3339(val, "RequestTracingExpirationTime", &s.RequestTracingExpirationTime) - delete(rawMsg, key) - case "scmIpSecurityRestrictions": - err = unpopulate(val, "ScmIPSecurityRestrictions", &s.ScmIPSecurityRestrictions) - delete(rawMsg, key) - case "scmIpSecurityRestrictionsUseMain": - err = unpopulate(val, "ScmIPSecurityRestrictionsUseMain", &s.ScmIPSecurityRestrictionsUseMain) - delete(rawMsg, key) - case "scmMinTlsVersion": - err = unpopulate(val, "ScmMinTLSVersion", &s.ScmMinTLSVersion) - delete(rawMsg, key) - case "scmType": - err = unpopulate(val, "ScmType", &s.ScmType) - delete(rawMsg, key) - case "tracingOptions": - err = unpopulate(val, "TracingOptions", &s.TracingOptions) - delete(rawMsg, key) - case "use32BitWorkerProcess": - err = unpopulate(val, "Use32BitWorkerProcess", &s.Use32BitWorkerProcess) - delete(rawMsg, key) - case "virtualApplications": - err = unpopulate(val, "VirtualApplications", &s.VirtualApplications) - delete(rawMsg, key) - case "vnetName": - err = unpopulate(val, "VnetName", &s.VnetName) - delete(rawMsg, key) - case "vnetPrivatePortsCount": - err = unpopulate(val, "VnetPrivatePortsCount", &s.VnetPrivatePortsCount) - delete(rawMsg, key) - case "vnetRouteAllEnabled": - err = unpopulate(val, "VnetRouteAllEnabled", &s.VnetRouteAllEnabled) - delete(rawMsg, key) - case "webSocketsEnabled": - err = unpopulate(val, "WebSocketsEnabled", &s.WebSocketsEnabled) - delete(rawMsg, key) - case "websiteTimeZone": - err = unpopulate(val, "WebsiteTimeZone", &s.WebsiteTimeZone) - delete(rawMsg, key) - case "windowsFxVersion": - err = unpopulate(val, "WindowsFxVersion", &s.WindowsFxVersion) - delete(rawMsg, key) - case "xManagedServiceIdentityId": - err = unpopulate(val, "XManagedServiceIdentityID", &s.XManagedServiceIdentityID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SiteConfigResource. -func (s SiteConfigResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SiteConfigurationSnapshotInfoProperties. -func (s SiteConfigurationSnapshotInfoProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "snapshotId", s.SnapshotID) - populateTimeRFC3339(objectMap, "time", s.Time) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SiteConfigurationSnapshotInfoProperties. -func (s *SiteConfigurationSnapshotInfoProperties) 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", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "snapshotId": - err = unpopulate(val, "SnapshotID", &s.SnapshotID) - delete(rawMsg, key) - case "time": - err = unpopulateTimeRFC3339(val, "Time", &s.Time) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SiteExtensionInfoProperties. -func (s SiteExtensionInfoProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authors", s.Authors) - populate(objectMap, "comment", s.Comment) - populate(objectMap, "description", s.Description) - populate(objectMap, "download_count", s.DownloadCount) - populate(objectMap, "extension_id", s.ExtensionID) - populate(objectMap, "extension_type", s.ExtensionType) - 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) - 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) - populate(objectMap, "summary", s.Summary) - populate(objectMap, "title", s.Title) - populate(objectMap, "version", s.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SiteExtensionInfoProperties. -func (s *SiteExtensionInfoProperties) 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", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authors": - err = unpopulate(val, "Authors", &s.Authors) - delete(rawMsg, key) - case "comment": - err = unpopulate(val, "Comment", &s.Comment) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &s.Description) - delete(rawMsg, key) - case "download_count": - err = unpopulate(val, "DownloadCount", &s.DownloadCount) - delete(rawMsg, key) - case "extension_id": - err = unpopulate(val, "ExtensionID", &s.ExtensionID) - delete(rawMsg, key) - case "extension_type": - err = unpopulate(val, "ExtensionType", &s.ExtensionType) - delete(rawMsg, key) - case "extension_url": - err = unpopulate(val, "ExtensionURL", &s.ExtensionURL) - delete(rawMsg, key) - case "feed_url": - err = unpopulate(val, "FeedURL", &s.FeedURL) - delete(rawMsg, key) - case "icon_url": - err = unpopulate(val, "IconURL", &s.IconURL) - delete(rawMsg, key) - case "installed_date_time": - err = unpopulateTimeRFC3339(val, "InstalledDateTime", &s.InstalledDateTime) - delete(rawMsg, key) - case "installer_command_line_params": - err = unpopulate(val, "InstallerCommandLineParams", &s.InstallerCommandLineParams) - delete(rawMsg, key) - case "license_url": - err = unpopulate(val, "LicenseURL", &s.LicenseURL) - delete(rawMsg, key) - case "local_is_latest_version": - err = unpopulate(val, "LocalIsLatestVersion", &s.LocalIsLatestVersion) - delete(rawMsg, key) - case "local_path": - err = unpopulate(val, "LocalPath", &s.LocalPath) - delete(rawMsg, key) - case "project_url": - err = unpopulate(val, "ProjectURL", &s.ProjectURL) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - case "published_date_time": - err = unpopulateTimeRFC3339(val, "PublishedDateTime", &s.PublishedDateTime) - delete(rawMsg, key) - case "summary": - err = unpopulate(val, "Summary", &s.Summary) - delete(rawMsg, key) - case "title": - err = unpopulate(val, "Title", &s.Title) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &s.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SitePatchResource. -func (s SitePatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "identity", s.Identity) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SitePatchResourceProperties. -func (s SitePatchResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "availabilityState", s.AvailabilityState) - populate(objectMap, "clientAffinityEnabled", s.ClientAffinityEnabled) - populate(objectMap, "clientCertEnabled", s.ClientCertEnabled) - populate(objectMap, "clientCertExclusionPaths", s.ClientCertExclusionPaths) - populate(objectMap, "clientCertMode", s.ClientCertMode) - populate(objectMap, "cloningInfo", s.CloningInfo) - populate(objectMap, "containerSize", s.ContainerSize) - populate(objectMap, "customDomainVerificationId", s.CustomDomainVerificationID) - populate(objectMap, "dailyMemoryTimeQuota", s.DailyMemoryTimeQuota) - populate(objectMap, "defaultHostName", s.DefaultHostName) - populate(objectMap, "enabled", s.Enabled) - populate(objectMap, "enabledHostNames", s.EnabledHostNames) - populate(objectMap, "httpsOnly", s.HTTPSOnly) - populate(objectMap, "hostNameSslStates", s.HostNameSSLStates) - populate(objectMap, "hostNames", s.HostNames) - populate(objectMap, "hostNamesDisabled", s.HostNamesDisabled) - populate(objectMap, "hostingEnvironmentProfile", s.HostingEnvironmentProfile) - populate(objectMap, "hyperV", s.HyperV) - populate(objectMap, "inProgressOperationId", s.InProgressOperationID) - populate(objectMap, "isDefaultContainer", s.IsDefaultContainer) - populate(objectMap, "isXenon", s.IsXenon) - populate(objectMap, "keyVaultReferenceIdentity", s.KeyVaultReferenceIdentity) - populateTimeRFC3339(objectMap, "lastModifiedTimeUtc", s.LastModifiedTimeUTC) - populate(objectMap, "maxNumberOfWorkers", s.MaxNumberOfWorkers) - populate(objectMap, "outboundIpAddresses", s.OutboundIPAddresses) - populate(objectMap, "possibleOutboundIpAddresses", s.PossibleOutboundIPAddresses) - populate(objectMap, "redundancyMode", s.RedundancyMode) - populate(objectMap, "repositorySiteName", s.RepositorySiteName) - populate(objectMap, "reserved", s.Reserved) - populate(objectMap, "resourceGroup", s.ResourceGroup) - populate(objectMap, "scmSiteAlsoStopped", s.ScmSiteAlsoStopped) - populate(objectMap, "serverFarmId", s.ServerFarmID) - populate(objectMap, "siteConfig", s.SiteConfig) - populate(objectMap, "slotSwapStatus", s.SlotSwapStatus) - populate(objectMap, "state", s.State) - populate(objectMap, "storageAccountRequired", s.StorageAccountRequired) - populateTimeRFC3339(objectMap, "suspendedTill", s.SuspendedTill) - populate(objectMap, "targetSwapSlot", s.TargetSwapSlot) - populate(objectMap, "trafficManagerHostNames", s.TrafficManagerHostNames) - populate(objectMap, "usageState", s.UsageState) - populate(objectMap, "virtualNetworkSubnetId", s.VirtualNetworkSubnetID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SitePatchResourceProperties. -func (s *SitePatchResourceProperties) 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", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "availabilityState": - err = unpopulate(val, "AvailabilityState", &s.AvailabilityState) - delete(rawMsg, key) - case "clientAffinityEnabled": - err = unpopulate(val, "ClientAffinityEnabled", &s.ClientAffinityEnabled) - delete(rawMsg, key) - case "clientCertEnabled": - err = unpopulate(val, "ClientCertEnabled", &s.ClientCertEnabled) - delete(rawMsg, key) - case "clientCertExclusionPaths": - err = unpopulate(val, "ClientCertExclusionPaths", &s.ClientCertExclusionPaths) - delete(rawMsg, key) - case "clientCertMode": - err = unpopulate(val, "ClientCertMode", &s.ClientCertMode) - delete(rawMsg, key) - case "cloningInfo": - err = unpopulate(val, "CloningInfo", &s.CloningInfo) - delete(rawMsg, key) - case "containerSize": - err = unpopulate(val, "ContainerSize", &s.ContainerSize) - delete(rawMsg, key) - case "customDomainVerificationId": - err = unpopulate(val, "CustomDomainVerificationID", &s.CustomDomainVerificationID) - delete(rawMsg, key) - case "dailyMemoryTimeQuota": - err = unpopulate(val, "DailyMemoryTimeQuota", &s.DailyMemoryTimeQuota) - delete(rawMsg, key) - case "defaultHostName": - err = unpopulate(val, "DefaultHostName", &s.DefaultHostName) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &s.Enabled) - delete(rawMsg, key) - case "enabledHostNames": - err = unpopulate(val, "EnabledHostNames", &s.EnabledHostNames) - delete(rawMsg, key) - case "httpsOnly": - err = unpopulate(val, "HTTPSOnly", &s.HTTPSOnly) - delete(rawMsg, key) - case "hostNameSslStates": - err = unpopulate(val, "HostNameSSLStates", &s.HostNameSSLStates) - delete(rawMsg, key) - case "hostNames": - err = unpopulate(val, "HostNames", &s.HostNames) - delete(rawMsg, key) - case "hostNamesDisabled": - err = unpopulate(val, "HostNamesDisabled", &s.HostNamesDisabled) - delete(rawMsg, key) - case "hostingEnvironmentProfile": - err = unpopulate(val, "HostingEnvironmentProfile", &s.HostingEnvironmentProfile) - delete(rawMsg, key) - case "hyperV": - err = unpopulate(val, "HyperV", &s.HyperV) - delete(rawMsg, key) - case "inProgressOperationId": - err = unpopulate(val, "InProgressOperationID", &s.InProgressOperationID) - delete(rawMsg, key) - case "isDefaultContainer": - err = unpopulate(val, "IsDefaultContainer", &s.IsDefaultContainer) - delete(rawMsg, key) - case "isXenon": - err = unpopulate(val, "IsXenon", &s.IsXenon) - delete(rawMsg, key) - case "keyVaultReferenceIdentity": - err = unpopulate(val, "KeyVaultReferenceIdentity", &s.KeyVaultReferenceIdentity) - delete(rawMsg, key) - case "lastModifiedTimeUtc": - err = unpopulateTimeRFC3339(val, "LastModifiedTimeUTC", &s.LastModifiedTimeUTC) - delete(rawMsg, key) - case "maxNumberOfWorkers": - err = unpopulate(val, "MaxNumberOfWorkers", &s.MaxNumberOfWorkers) - delete(rawMsg, key) - case "outboundIpAddresses": - err = unpopulate(val, "OutboundIPAddresses", &s.OutboundIPAddresses) - delete(rawMsg, key) - case "possibleOutboundIpAddresses": - err = unpopulate(val, "PossibleOutboundIPAddresses", &s.PossibleOutboundIPAddresses) - delete(rawMsg, key) - case "redundancyMode": - err = unpopulate(val, "RedundancyMode", &s.RedundancyMode) - delete(rawMsg, key) - case "repositorySiteName": - err = unpopulate(val, "RepositorySiteName", &s.RepositorySiteName) - delete(rawMsg, key) - case "reserved": - err = unpopulate(val, "Reserved", &s.Reserved) - delete(rawMsg, key) - case "resourceGroup": - err = unpopulate(val, "ResourceGroup", &s.ResourceGroup) - delete(rawMsg, key) - case "scmSiteAlsoStopped": - err = unpopulate(val, "ScmSiteAlsoStopped", &s.ScmSiteAlsoStopped) - delete(rawMsg, key) - case "serverFarmId": - err = unpopulate(val, "ServerFarmID", &s.ServerFarmID) - delete(rawMsg, key) - case "siteConfig": - err = unpopulate(val, "SiteConfig", &s.SiteConfig) - delete(rawMsg, key) - case "slotSwapStatus": - err = unpopulate(val, "SlotSwapStatus", &s.SlotSwapStatus) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &s.State) - delete(rawMsg, key) - case "storageAccountRequired": - err = unpopulate(val, "StorageAccountRequired", &s.StorageAccountRequired) - delete(rawMsg, key) - case "suspendedTill": - err = unpopulateTimeRFC3339(val, "SuspendedTill", &s.SuspendedTill) - delete(rawMsg, key) - case "targetSwapSlot": - err = unpopulate(val, "TargetSwapSlot", &s.TargetSwapSlot) - delete(rawMsg, key) - case "trafficManagerHostNames": - err = unpopulate(val, "TrafficManagerHostNames", &s.TrafficManagerHostNames) - delete(rawMsg, key) - case "usageState": - err = unpopulate(val, "UsageState", &s.UsageState) - delete(rawMsg, key) - case "virtualNetworkSubnetId": - err = unpopulate(val, "VirtualNetworkSubnetID", &s.VirtualNetworkSubnetID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SiteProperties. -func (s SiteProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "availabilityState", s.AvailabilityState) - populate(objectMap, "clientAffinityEnabled", s.ClientAffinityEnabled) - populate(objectMap, "clientCertEnabled", s.ClientCertEnabled) - populate(objectMap, "clientCertExclusionPaths", s.ClientCertExclusionPaths) - populate(objectMap, "clientCertMode", s.ClientCertMode) - populate(objectMap, "cloningInfo", s.CloningInfo) - populate(objectMap, "containerSize", s.ContainerSize) - populate(objectMap, "customDomainVerificationId", s.CustomDomainVerificationID) - populate(objectMap, "dailyMemoryTimeQuota", s.DailyMemoryTimeQuota) - populate(objectMap, "defaultHostName", s.DefaultHostName) - populate(objectMap, "enabled", s.Enabled) - populate(objectMap, "enabledHostNames", s.EnabledHostNames) - populate(objectMap, "httpsOnly", s.HTTPSOnly) - populate(objectMap, "hostNameSslStates", s.HostNameSSLStates) - populate(objectMap, "hostNames", s.HostNames) - populate(objectMap, "hostNamesDisabled", s.HostNamesDisabled) - populate(objectMap, "hostingEnvironmentProfile", s.HostingEnvironmentProfile) - populate(objectMap, "hyperV", s.HyperV) - populate(objectMap, "inProgressOperationId", s.InProgressOperationID) - populate(objectMap, "isDefaultContainer", s.IsDefaultContainer) - populate(objectMap, "isXenon", s.IsXenon) - populate(objectMap, "keyVaultReferenceIdentity", s.KeyVaultReferenceIdentity) - populateTimeRFC3339(objectMap, "lastModifiedTimeUtc", s.LastModifiedTimeUTC) - populate(objectMap, "maxNumberOfWorkers", s.MaxNumberOfWorkers) - populate(objectMap, "outboundIpAddresses", s.OutboundIPAddresses) - populate(objectMap, "possibleOutboundIpAddresses", s.PossibleOutboundIPAddresses) - populate(objectMap, "redundancyMode", s.RedundancyMode) - populate(objectMap, "repositorySiteName", s.RepositorySiteName) - populate(objectMap, "reserved", s.Reserved) - populate(objectMap, "resourceGroup", s.ResourceGroup) - populate(objectMap, "scmSiteAlsoStopped", s.ScmSiteAlsoStopped) - populate(objectMap, "serverFarmId", s.ServerFarmID) - populate(objectMap, "siteConfig", s.SiteConfig) - populate(objectMap, "slotSwapStatus", s.SlotSwapStatus) - populate(objectMap, "state", s.State) - populate(objectMap, "storageAccountRequired", s.StorageAccountRequired) - populateTimeRFC3339(objectMap, "suspendedTill", s.SuspendedTill) - populate(objectMap, "targetSwapSlot", s.TargetSwapSlot) - populate(objectMap, "trafficManagerHostNames", s.TrafficManagerHostNames) - populate(objectMap, "usageState", s.UsageState) - populate(objectMap, "virtualNetworkSubnetId", s.VirtualNetworkSubnetID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SiteProperties. -func (s *SiteProperties) 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", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "availabilityState": - err = unpopulate(val, "AvailabilityState", &s.AvailabilityState) - delete(rawMsg, key) - case "clientAffinityEnabled": - err = unpopulate(val, "ClientAffinityEnabled", &s.ClientAffinityEnabled) - delete(rawMsg, key) - case "clientCertEnabled": - err = unpopulate(val, "ClientCertEnabled", &s.ClientCertEnabled) - delete(rawMsg, key) - case "clientCertExclusionPaths": - err = unpopulate(val, "ClientCertExclusionPaths", &s.ClientCertExclusionPaths) - delete(rawMsg, key) - case "clientCertMode": - err = unpopulate(val, "ClientCertMode", &s.ClientCertMode) - delete(rawMsg, key) - case "cloningInfo": - err = unpopulate(val, "CloningInfo", &s.CloningInfo) - delete(rawMsg, key) - case "containerSize": - err = unpopulate(val, "ContainerSize", &s.ContainerSize) - delete(rawMsg, key) - case "customDomainVerificationId": - err = unpopulate(val, "CustomDomainVerificationID", &s.CustomDomainVerificationID) - delete(rawMsg, key) - case "dailyMemoryTimeQuota": - err = unpopulate(val, "DailyMemoryTimeQuota", &s.DailyMemoryTimeQuota) - delete(rawMsg, key) - case "defaultHostName": - err = unpopulate(val, "DefaultHostName", &s.DefaultHostName) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &s.Enabled) - delete(rawMsg, key) - case "enabledHostNames": - err = unpopulate(val, "EnabledHostNames", &s.EnabledHostNames) - delete(rawMsg, key) - case "httpsOnly": - err = unpopulate(val, "HTTPSOnly", &s.HTTPSOnly) - delete(rawMsg, key) - case "hostNameSslStates": - err = unpopulate(val, "HostNameSSLStates", &s.HostNameSSLStates) - delete(rawMsg, key) - case "hostNames": - err = unpopulate(val, "HostNames", &s.HostNames) - delete(rawMsg, key) - case "hostNamesDisabled": - err = unpopulate(val, "HostNamesDisabled", &s.HostNamesDisabled) - delete(rawMsg, key) - case "hostingEnvironmentProfile": - err = unpopulate(val, "HostingEnvironmentProfile", &s.HostingEnvironmentProfile) - delete(rawMsg, key) - case "hyperV": - err = unpopulate(val, "HyperV", &s.HyperV) - delete(rawMsg, key) - case "inProgressOperationId": - err = unpopulate(val, "InProgressOperationID", &s.InProgressOperationID) - delete(rawMsg, key) - case "isDefaultContainer": - err = unpopulate(val, "IsDefaultContainer", &s.IsDefaultContainer) - delete(rawMsg, key) - case "isXenon": - err = unpopulate(val, "IsXenon", &s.IsXenon) - delete(rawMsg, key) - case "keyVaultReferenceIdentity": - err = unpopulate(val, "KeyVaultReferenceIdentity", &s.KeyVaultReferenceIdentity) - delete(rawMsg, key) - case "lastModifiedTimeUtc": - err = unpopulateTimeRFC3339(val, "LastModifiedTimeUTC", &s.LastModifiedTimeUTC) - delete(rawMsg, key) - case "maxNumberOfWorkers": - err = unpopulate(val, "MaxNumberOfWorkers", &s.MaxNumberOfWorkers) - delete(rawMsg, key) - case "outboundIpAddresses": - err = unpopulate(val, "OutboundIPAddresses", &s.OutboundIPAddresses) - delete(rawMsg, key) - case "possibleOutboundIpAddresses": - err = unpopulate(val, "PossibleOutboundIPAddresses", &s.PossibleOutboundIPAddresses) - delete(rawMsg, key) - case "redundancyMode": - err = unpopulate(val, "RedundancyMode", &s.RedundancyMode) - delete(rawMsg, key) - case "repositorySiteName": - err = unpopulate(val, "RepositorySiteName", &s.RepositorySiteName) - delete(rawMsg, key) - case "reserved": - err = unpopulate(val, "Reserved", &s.Reserved) - delete(rawMsg, key) - case "resourceGroup": - err = unpopulate(val, "ResourceGroup", &s.ResourceGroup) - delete(rawMsg, key) - case "scmSiteAlsoStopped": - err = unpopulate(val, "ScmSiteAlsoStopped", &s.ScmSiteAlsoStopped) - delete(rawMsg, key) - case "serverFarmId": - err = unpopulate(val, "ServerFarmID", &s.ServerFarmID) - delete(rawMsg, key) - case "siteConfig": - err = unpopulate(val, "SiteConfig", &s.SiteConfig) - delete(rawMsg, key) - case "slotSwapStatus": - err = unpopulate(val, "SlotSwapStatus", &s.SlotSwapStatus) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &s.State) - delete(rawMsg, key) - case "storageAccountRequired": - err = unpopulate(val, "StorageAccountRequired", &s.StorageAccountRequired) - delete(rawMsg, key) - case "suspendedTill": - err = unpopulateTimeRFC3339(val, "SuspendedTill", &s.SuspendedTill) - delete(rawMsg, key) - case "targetSwapSlot": - err = unpopulate(val, "TargetSwapSlot", &s.TargetSwapSlot) - delete(rawMsg, key) - case "trafficManagerHostNames": - err = unpopulate(val, "TrafficManagerHostNames", &s.TrafficManagerHostNames) - delete(rawMsg, key) - case "usageState": - err = unpopulate(val, "UsageState", &s.UsageState) - delete(rawMsg, key) - case "virtualNetworkSubnetId": - err = unpopulate(val, "VirtualNetworkSubnetID", &s.VirtualNetworkSubnetID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SiteSourceControl. -func (s SiteSourceControl) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SlotConfigNames. -func (s SlotConfigNames) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appSettingNames", s.AppSettingNames) - populate(objectMap, "azureStorageConfigNames", s.AzureStorageConfigNames) - populate(objectMap, "connectionStringNames", s.ConnectionStringNames) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SlotSwapStatus. -func (s SlotSwapStatus) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "destinationSlotName", s.DestinationSlotName) - populate(objectMap, "sourceSlotName", s.SourceSlotName) - populateTimeRFC3339(objectMap, "timestampUtc", s.TimestampUTC) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SlotSwapStatus. -func (s *SlotSwapStatus) 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", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "destinationSlotName": - err = unpopulate(val, "DestinationSlotName", &s.DestinationSlotName) - delete(rawMsg, key) - case "sourceSlotName": - err = unpopulate(val, "SourceSlotName", &s.SourceSlotName) - delete(rawMsg, key) - case "timestampUtc": - err = unpopulateTimeRFC3339(val, "TimestampUTC", &s.TimestampUTC) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Solution. -func (s Solution) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "data", s.Data) - populate(objectMap, "description", s.Description) - populate(objectMap, "displayName", s.DisplayName) - populate(objectMap, "id", s.ID) - populate(objectMap, "metadata", s.Metadata) - populate(objectMap, "order", s.Order) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SourceControlProperties. -func (s SourceControlProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "expirationTime", s.ExpirationTime) - populate(objectMap, "refreshToken", s.RefreshToken) - populate(objectMap, "token", s.Token) - populate(objectMap, "tokenSecret", s.TokenSecret) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SourceControlProperties. -func (s *SourceControlProperties) 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", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "expirationTime": - err = unpopulateTimeRFC3339(val, "ExpirationTime", &s.ExpirationTime) - delete(rawMsg, key) - case "refreshToken": - err = unpopulate(val, "RefreshToken", &s.RefreshToken) - delete(rawMsg, key) - case "token": - err = unpopulate(val, "Token", &s.Token) - delete(rawMsg, key) - case "tokenSecret": - err = unpopulate(val, "TokenSecret", &s.TokenSecret) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StackMajorVersion. -func (s StackMajorVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appSettingsDictionary", s.AppSettingsDictionary) - populate(objectMap, "applicationInsights", s.ApplicationInsights) - populate(objectMap, "displayVersion", s.DisplayVersion) - populate(objectMap, "isDefault", s.IsDefault) - populate(objectMap, "isDeprecated", s.IsDeprecated) - populate(objectMap, "isHidden", s.IsHidden) - populate(objectMap, "isPreview", s.IsPreview) - populate(objectMap, "minorVersions", s.MinorVersions) - populate(objectMap, "runtimeVersion", s.RuntimeVersion) - populate(objectMap, "siteConfigPropertiesDictionary", s.SiteConfigPropertiesDictionary) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type StaticSite. -func (s StaticSite) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowConfigFileUpdates", s.AllowConfigFileUpdates) - populate(objectMap, "branch", s.Branch) - populate(objectMap, "buildProperties", s.BuildProperties) - populate(objectMap, "contentDistributionEndpoint", s.ContentDistributionEndpoint) - populate(objectMap, "customDomains", s.CustomDomains) - populate(objectMap, "defaultHostname", s.DefaultHostname) - populate(objectMap, "enterpriseGradeCdnStatus", s.EnterpriseGradeCdnStatus) - populate(objectMap, "keyVaultReferenceIdentity", s.KeyVaultReferenceIdentity) - populate(objectMap, "privateEndpointConnections", s.PrivateEndpointConnections) - populate(objectMap, "provider", s.Provider) - populate(objectMap, "repositoryToken", s.RepositoryToken) - populate(objectMap, "repositoryUrl", s.RepositoryURL) - populate(objectMap, "stagingEnvironmentPolicy", s.StagingEnvironmentPolicy) - populate(objectMap, "templateProperties", s.TemplateProperties) - populate(objectMap, "userProvidedFunctionApps", s.UserProvidedFunctionApps) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type StaticSiteARMResource. -func (s StaticSiteARMResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "identity", s.Identity) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "sku", s.SKU) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type StaticSiteBuildARMResourceProperties. -func (s StaticSiteBuildARMResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "buildId", s.BuildID) - populateTimeRFC3339(objectMap, "createdTimeUtc", s.CreatedTimeUTC) - populate(objectMap, "hostname", s.Hostname) - populateTimeRFC3339(objectMap, "lastUpdatedOn", s.LastUpdatedOn) - populate(objectMap, "pullRequestTitle", s.PullRequestTitle) - populate(objectMap, "sourceBranch", s.SourceBranch) - populate(objectMap, "status", s.Status) - populate(objectMap, "userProvidedFunctionApps", s.UserProvidedFunctionApps) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteBuildARMResourceProperties. -func (s *StaticSiteBuildARMResourceProperties) 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", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "buildId": - err = unpopulate(val, "BuildID", &s.BuildID) - delete(rawMsg, key) - case "createdTimeUtc": - err = unpopulateTimeRFC3339(val, "CreatedTimeUTC", &s.CreatedTimeUTC) - delete(rawMsg, key) - case "hostname": - err = unpopulate(val, "Hostname", &s.Hostname) - delete(rawMsg, key) - case "lastUpdatedOn": - err = unpopulateTimeRFC3339(val, "LastUpdatedOn", &s.LastUpdatedOn) - delete(rawMsg, key) - case "pullRequestTitle": - err = unpopulate(val, "PullRequestTitle", &s.PullRequestTitle) - delete(rawMsg, key) - case "sourceBranch": - err = unpopulate(val, "SourceBranch", &s.SourceBranch) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &s.Status) - delete(rawMsg, key) - case "userProvidedFunctionApps": - err = unpopulate(val, "UserProvidedFunctionApps", &s.UserProvidedFunctionApps) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StaticSiteCustomDomainOverviewARMResourceProperties. -func (s StaticSiteCustomDomainOverviewARMResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) - populate(objectMap, "domainName", s.DomainName) - populate(objectMap, "errorMessage", s.ErrorMessage) - populate(objectMap, "status", s.Status) - populate(objectMap, "validationToken", s.ValidationToken) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteCustomDomainOverviewARMResourceProperties. -func (s *StaticSiteCustomDomainOverviewARMResourceProperties) 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", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) - delete(rawMsg, key) - case "domainName": - err = unpopulate(val, "DomainName", &s.DomainName) - delete(rawMsg, key) - case "errorMessage": - err = unpopulate(val, "ErrorMessage", &s.ErrorMessage) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &s.Status) - delete(rawMsg, key) - case "validationToken": - err = unpopulate(val, "ValidationToken", &s.ValidationToken) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StaticSitePatchResource. -func (s StaticSitePatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserARMResource. -func (s StaticSiteUserARMResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserInvitationResponseResourceProperties. -func (s StaticSiteUserInvitationResponseResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "expiresOn", s.ExpiresOn) - populate(objectMap, "invitationUrl", s.InvitationURL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserInvitationResponseResourceProperties. -func (s *StaticSiteUserInvitationResponseResourceProperties) 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", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "expiresOn": - err = unpopulateTimeRFC3339(val, "ExpiresOn", &s.ExpiresOn) - delete(rawMsg, key) - case "invitationUrl": - err = unpopulate(val, "InvitationURL", &s.InvitationURL) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserProvidedFunctionAppARMResourceProperties. -func (s StaticSiteUserProvidedFunctionAppARMResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) - populate(objectMap, "functionAppRegion", s.FunctionAppRegion) - populate(objectMap, "functionAppResourceId", s.FunctionAppResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserProvidedFunctionAppARMResourceProperties. -func (s *StaticSiteUserProvidedFunctionAppARMResourceProperties) 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", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) - delete(rawMsg, key) - case "functionAppRegion": - err = unpopulate(val, "FunctionAppRegion", &s.FunctionAppRegion) - delete(rawMsg, key) - case "functionAppResourceId": - err = unpopulate(val, "FunctionAppResourceID", &s.FunctionAppResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserProvidedFunctionAppProperties. -func (s StaticSiteUserProvidedFunctionAppProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) - populate(objectMap, "functionAppRegion", s.FunctionAppRegion) - populate(objectMap, "functionAppResourceId", s.FunctionAppResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserProvidedFunctionAppProperties. -func (s *StaticSiteUserProvidedFunctionAppProperties) 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", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) - delete(rawMsg, key) - case "functionAppRegion": - err = unpopulate(val, "FunctionAppRegion", &s.FunctionAppRegion) - delete(rawMsg, key) - case "functionAppResourceId": - err = unpopulate(val, "FunctionAppResourceID", &s.FunctionAppResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StringDictionary. -func (s StringDictionary) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type StringList. -func (s StringList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SwiftVirtualNetwork. -func (s SwiftVirtualNetwork) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Template. -func (t Template) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "containers", t.Containers) - populate(objectMap, "dapr", t.Dapr) - populate(objectMap, "revisionSuffix", t.RevisionSuffix) - populate(objectMap, "scale", t.Scale) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type TriggeredJobHistoryProperties. -func (t TriggeredJobHistoryProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "runs", t.Runs) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type TriggeredJobRun. -func (t TriggeredJobRun) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "duration", t.Duration) - populateTimeRFC3339(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) - populate(objectMap, "status", t.Status) - populate(objectMap, "trigger", t.Trigger) - populate(objectMap, "url", t.URL) - populate(objectMap, "web_job_id", t.WebJobID) - populate(objectMap, "web_job_name", t.WebJobName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TriggeredJobRun. -func (t *TriggeredJobRun) 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", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "duration": - err = unpopulate(val, "Duration", &t.Duration) - delete(rawMsg, key) - case "end_time": - err = unpopulateTimeRFC3339(val, "EndTime", &t.EndTime) - delete(rawMsg, key) - case "error_url": - err = unpopulate(val, "ErrorURL", &t.ErrorURL) - delete(rawMsg, key) - case "job_name": - err = unpopulate(val, "JobName", &t.JobName) - delete(rawMsg, key) - case "output_url": - err = unpopulate(val, "OutputURL", &t.OutputURL) - delete(rawMsg, key) - case "start_time": - err = unpopulateTimeRFC3339(val, "StartTime", &t.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &t.Status) - delete(rawMsg, key) - case "trigger": - err = unpopulate(val, "Trigger", &t.Trigger) - delete(rawMsg, key) - case "url": - err = unpopulate(val, "URL", &t.URL) - delete(rawMsg, key) - case "web_job_id": - err = unpopulate(val, "WebJobID", &t.WebJobID) - delete(rawMsg, key) - case "web_job_name": - err = unpopulate(val, "WebJobName", &t.WebJobName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TriggeredWebJobProperties. -func (t TriggeredWebJobProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "error", t.Error) - populate(objectMap, "extra_info_url", t.ExtraInfoURL) - populate(objectMap, "history_url", t.HistoryURL) - populate(objectMap, "latest_run", t.LatestRun) - populate(objectMap, "run_command", t.RunCommand) - populate(objectMap, "scheduler_logs_url", t.SchedulerLogsURL) - populate(objectMap, "settings", t.Settings) - populate(objectMap, "url", t.URL) - populate(objectMap, "using_sdk", t.UsingSdk) - populate(objectMap, "web_job_type", t.WebJobType) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type UsageProperties. -func (u UsageProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "computeMode", u.ComputeMode) - populate(objectMap, "currentValue", u.CurrentValue) - populate(objectMap, "displayName", u.DisplayName) - populate(objectMap, "limit", u.Limit) - populateTimeRFC3339(objectMap, "nextResetTime", u.NextResetTime) - populate(objectMap, "resourceName", u.ResourceName) - populate(objectMap, "siteMode", u.SiteMode) - populate(objectMap, "unit", u.Unit) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UsageProperties. -func (u *UsageProperties) 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", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "computeMode": - err = unpopulate(val, "ComputeMode", &u.ComputeMode) - delete(rawMsg, key) - case "currentValue": - err = unpopulate(val, "CurrentValue", &u.CurrentValue) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &u.DisplayName) - delete(rawMsg, key) - case "limit": - err = unpopulate(val, "Limit", &u.Limit) - delete(rawMsg, key) - case "nextResetTime": - err = unpopulateTimeRFC3339(val, "NextResetTime", &u.NextResetTime) - delete(rawMsg, key) - case "resourceName": - err = unpopulate(val, "ResourceName", &u.ResourceName) - delete(rawMsg, key) - case "siteMode": - err = unpopulate(val, "SiteMode", &u.SiteMode) - delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &u.Unit) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualApplication. -func (v VirtualApplication) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "physicalPath", v.PhysicalPath) - populate(objectMap, "preloadEnabled", v.PreloadEnabled) - populate(objectMap, "virtualDirectories", v.VirtualDirectories) - populate(objectMap, "virtualPath", v.VirtualPath) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VnetGateway. -func (v VnetGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", v.ID) - populate(objectMap, "kind", v.Kind) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VnetInfo. -func (v VnetInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "certBlob", v.CertBlob) - populate(objectMap, "certThumbprint", v.CertThumbprint) - populate(objectMap, "dnsServers", v.DNSServers) - populate(objectMap, "isSwift", v.IsSwift) - populate(objectMap, "resyncRequired", v.ResyncRequired) - populate(objectMap, "routes", v.Routes) - populate(objectMap, "vnetResourceId", v.VnetResourceID) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VnetInfoResource. -func (v VnetInfoResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", v.ID) - populate(objectMap, "kind", v.Kind) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VnetRoute. -func (v VnetRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", v.ID) - populate(objectMap, "kind", v.Kind) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VnetValidationFailureDetailsProperties. -func (v VnetValidationFailureDetailsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "failed", v.Failed) - populate(objectMap, "failedTests", v.FailedTests) - populate(objectMap, "message", v.Message) - populate(objectMap, "warnings", v.Warnings) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WebAppMajorVersion. -func (w WebAppMajorVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "displayText", w.DisplayText) - populate(objectMap, "minorVersions", w.MinorVersions) - populate(objectMap, "value", w.Value) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WebAppRuntimeSettings. -func (w WebAppRuntimeSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appInsightsSettings", w.AppInsightsSettings) - populateTimeRFC3339(objectMap, "endOfLifeDate", w.EndOfLifeDate) - populate(objectMap, "gitHubActionSettings", w.GitHubActionSettings) - populate(objectMap, "isAutoUpdate", w.IsAutoUpdate) - populate(objectMap, "isDeprecated", w.IsDeprecated) - populate(objectMap, "isEarlyAccess", w.IsEarlyAccess) - populate(objectMap, "isHidden", w.IsHidden) - populate(objectMap, "isPreview", w.IsPreview) - populate(objectMap, "remoteDebuggingSupported", w.RemoteDebuggingSupported) - populate(objectMap, "runtimeVersion", w.RuntimeVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppRuntimeSettings. -func (w *WebAppRuntimeSettings) 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", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appInsightsSettings": - err = unpopulate(val, "AppInsightsSettings", &w.AppInsightsSettings) - delete(rawMsg, key) - case "endOfLifeDate": - err = unpopulateTimeRFC3339(val, "EndOfLifeDate", &w.EndOfLifeDate) - delete(rawMsg, key) - case "gitHubActionSettings": - err = unpopulate(val, "GitHubActionSettings", &w.GitHubActionSettings) - delete(rawMsg, key) - case "isAutoUpdate": - err = unpopulate(val, "IsAutoUpdate", &w.IsAutoUpdate) - delete(rawMsg, key) - case "isDeprecated": - err = unpopulate(val, "IsDeprecated", &w.IsDeprecated) - delete(rawMsg, key) - case "isEarlyAccess": - err = unpopulate(val, "IsEarlyAccess", &w.IsEarlyAccess) - delete(rawMsg, key) - case "isHidden": - err = unpopulate(val, "IsHidden", &w.IsHidden) - delete(rawMsg, key) - case "isPreview": - err = unpopulate(val, "IsPreview", &w.IsPreview) - delete(rawMsg, key) - case "remoteDebuggingSupported": - err = unpopulate(val, "RemoteDebuggingSupported", &w.RemoteDebuggingSupported) - delete(rawMsg, key) - case "runtimeVersion": - err = unpopulate(val, "RuntimeVersion", &w.RuntimeVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WebAppStackProperties. -func (w WebAppStackProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "displayText", w.DisplayText) - populate(objectMap, "majorVersions", w.MajorVersions) - populate(objectMap, "preferredOs", w.PreferredOs) - populate(objectMap, "value", w.Value) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WebJobProperties. -func (w WebJobProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "error", w.Error) - populate(objectMap, "extra_info_url", w.ExtraInfoURL) - populate(objectMap, "run_command", w.RunCommand) - populate(objectMap, "settings", w.Settings) - populate(objectMap, "url", w.URL) - populate(objectMap, "using_sdk", w.UsingSdk) - populate(objectMap, "web_job_type", w.WebJobType) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WebSiteInstanceStatusProperties. -func (w WebSiteInstanceStatusProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "consoleUrl", w.ConsoleURL) - populate(objectMap, "containers", w.Containers) - populate(objectMap, "detectorUrl", w.DetectorURL) - populate(objectMap, "healthCheckUrl", w.HealthCheckURL) - populate(objectMap, "state", w.State) - populate(objectMap, "statusUrl", w.StatusURL) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WindowsJavaContainerSettings. -func (w WindowsJavaContainerSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "endOfLifeDate", w.EndOfLifeDate) - populate(objectMap, "isAutoUpdate", w.IsAutoUpdate) - populate(objectMap, "isDeprecated", w.IsDeprecated) - populate(objectMap, "isEarlyAccess", w.IsEarlyAccess) - populate(objectMap, "isHidden", w.IsHidden) - populate(objectMap, "isPreview", w.IsPreview) - populate(objectMap, "javaContainer", w.JavaContainer) - populate(objectMap, "javaContainerVersion", w.JavaContainerVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WindowsJavaContainerSettings. -func (w *WindowsJavaContainerSettings) 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", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endOfLifeDate": - err = unpopulateTimeRFC3339(val, "EndOfLifeDate", &w.EndOfLifeDate) - delete(rawMsg, key) - case "isAutoUpdate": - err = unpopulate(val, "IsAutoUpdate", &w.IsAutoUpdate) - delete(rawMsg, key) - case "isDeprecated": - err = unpopulate(val, "IsDeprecated", &w.IsDeprecated) - delete(rawMsg, key) - case "isEarlyAccess": - err = unpopulate(val, "IsEarlyAccess", &w.IsEarlyAccess) - delete(rawMsg, key) - case "isHidden": - err = unpopulate(val, "IsHidden", &w.IsHidden) - delete(rawMsg, key) - case "isPreview": - err = unpopulate(val, "IsPreview", &w.IsPreview) - delete(rawMsg, key) - case "javaContainer": - err = unpopulate(val, "JavaContainer", &w.JavaContainer) - delete(rawMsg, key) - case "javaContainerVersion": - err = unpopulate(val, "JavaContainerVersion", &w.JavaContainerVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WorkerPool. -func (w WorkerPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "computeMode", w.ComputeMode) - populate(objectMap, "instanceNames", w.InstanceNames) - populate(objectMap, "workerCount", w.WorkerCount) - populate(objectMap, "workerSize", w.WorkerSize) - populate(objectMap, "workerSizeId", w.WorkerSizeID) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WorkerPoolResource. -func (w WorkerPoolResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", w.ID) - populate(objectMap, "kind", w.Kind) - populate(objectMap, "name", w.Name) - populate(objectMap, "properties", w.Properties) - populate(objectMap, "sku", w.SKU) - populate(objectMap, "type", w.Type) - return json.Marshal(objectMap) -} - -func populate(m map[string]interface{}, k string, v interface{}) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} - -func populateByteArray(m map[string]interface{}, k string, b []byte, f runtime.Base64Encoding) { - if azcore.IsNullValue(b) { - m[k] = nil - } else if len(b) == 0 { - return - } else { - m[k] = runtime.EncodeByteArray(b, f) - } -} - -func unpopulate(data json.RawMessage, fn string, v interface{}) error { - if data == nil { - return nil - } - if err := json.Unmarshal(data, v); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - return nil -}