diff --git a/internal/services/appservice/client/client.go b/internal/services/appservice/client/client.go index 8989bdfcd767..011c4c83d6d8 100644 --- a/internal/services/appservice/client/client.go +++ b/internal/services/appservice/client/client.go @@ -1,8 +1,8 @@ package client import ( - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/terraform-provider-azurerm/internal/common" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type Client struct { diff --git a/internal/services/appservice/function_app_active_slot_resource.go b/internal/services/appservice/function_app_active_slot_resource.go index 71d8a16cd218..018adde71b19 100644 --- a/internal/services/appservice/function_app_active_slot_resource.go +++ b/internal/services/appservice/function_app_active_slot_resource.go @@ -5,13 +5,13 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type FunctionAppActiveSlotResource struct{} diff --git a/internal/services/appservice/function_app_function_resource.go b/internal/services/appservice/function_app_function_resource.go index f913527fadce..ad49daa3af1a 100644 --- a/internal/services/appservice/function_app_function_resource.go +++ b/internal/services/appservice/function_app_function_resource.go @@ -6,7 +6,6 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/parse" @@ -14,6 +13,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type FunctionAppFunctionResource struct{} diff --git a/internal/services/appservice/function_app_hybrid_connection_resource.go b/internal/services/appservice/function_app_hybrid_connection_resource.go index b28f9b1e74c9..0ec359649490 100644 --- a/internal/services/appservice/function_app_hybrid_connection_resource.go +++ b/internal/services/appservice/function_app_hybrid_connection_resource.go @@ -5,7 +5,6 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections" "github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces" @@ -18,6 +17,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type FunctionAppHybridConnectionResource struct{} diff --git a/internal/services/appservice/helpers/auth_v2_schema.go b/internal/services/appservice/helpers/auth_v2_schema.go index 7228c6f9c3ae..251aff38a350 100644 --- a/internal/services/appservice/helpers/auth_v2_schema.go +++ b/internal/services/appservice/helpers/auth_v2_schema.go @@ -4,11 +4,11 @@ import ( "fmt" "strings" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type AuthV2Settings struct { diff --git a/internal/services/appservice/helpers/auto_heal.go b/internal/services/appservice/helpers/auto_heal.go index af4245497c55..7cf407ebb86d 100644 --- a/internal/services/appservice/helpers/auto_heal.go +++ b/internal/services/appservice/helpers/auto_heal.go @@ -4,11 +4,11 @@ import ( "strconv" "strings" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type AutoHealSettingWindows struct { diff --git a/internal/services/appservice/helpers/common_web_app_schema.go b/internal/services/appservice/helpers/common_web_app_schema.go index 58699aeef137..7ad5e47ed4d1 100644 --- a/internal/services/appservice/helpers/common_web_app_schema.go +++ b/internal/services/appservice/helpers/common_web_app_schema.go @@ -4,11 +4,11 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/Azure/go-autorest/autorest/date" "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type VirtualApplication struct { diff --git a/internal/services/appservice/helpers/enums.go b/internal/services/appservice/helpers/enums.go new file mode 100644 index 000000000000..fba065ae51cf --- /dev/null +++ b/internal/services/appservice/helpers/enums.go @@ -0,0 +1,9 @@ +package helpers + +// publicNetworkAccess Enums are missing in api-specs +// https://github.com/Azure/azure-rest-api-specs/issues/24680 + +const ( + PublicNetworkAccessEnabled string = "Enabled" + PublicNetworkAccessDisabled string = "Disabled" +) diff --git a/internal/services/appservice/helpers/function_app_schema.go b/internal/services/appservice/helpers/function_app_schema.go index 9c2ec5f7ed34..c5c7a6e1eeb9 100644 --- a/internal/services/appservice/helpers/function_app_schema.go +++ b/internal/services/appservice/helpers/function_app_schema.go @@ -5,7 +5,6 @@ import ( "strconv" "strings" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" @@ -13,6 +12,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) const ( diff --git a/internal/services/appservice/helpers/function_app_schema_test.go b/internal/services/appservice/helpers/function_app_schema_test.go index 3b55ec3dc57f..a963b5ad389d 100644 --- a/internal/services/appservice/helpers/function_app_schema_test.go +++ b/internal/services/appservice/helpers/function_app_schema_test.go @@ -5,9 +5,9 @@ import ( "sort" "testing" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/helpers" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) func TestMergeUserAppSettings(t *testing.T) { diff --git a/internal/services/appservice/helpers/function_app_slot_schema.go b/internal/services/appservice/helpers/function_app_slot_schema.go index 9a5313cd243e..ae23f88ace55 100644 --- a/internal/services/appservice/helpers/function_app_slot_schema.go +++ b/internal/services/appservice/helpers/function_app_slot_schema.go @@ -5,13 +5,13 @@ import ( "strconv" "strings" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" apimValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type SiteConfigWindowsFunctionAppSlot struct { diff --git a/internal/services/appservice/helpers/linux_web_app_schema.go b/internal/services/appservice/helpers/linux_web_app_schema.go index b0ae31de1311..dac37e5db14d 100644 --- a/internal/services/appservice/helpers/linux_web_app_schema.go +++ b/internal/services/appservice/helpers/linux_web_app_schema.go @@ -5,13 +5,13 @@ import ( "strconv" "strings" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type SiteConfigLinux struct { diff --git a/internal/services/appservice/helpers/publish_app.go b/internal/services/appservice/helpers/publish_app.go index d82d2a1368b5..4b0ed5b4ae97 100644 --- a/internal/services/appservice/helpers/publish_app.go +++ b/internal/services/appservice/helpers/publish_app.go @@ -9,8 +9,8 @@ import ( "os" "time" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) const ( diff --git a/internal/services/appservice/helpers/shared_schema.go b/internal/services/appservice/helpers/shared_schema.go index 3ee7eb8ee1f9..3685a8804166 100644 --- a/internal/services/appservice/helpers/shared_schema.go +++ b/internal/services/appservice/helpers/shared_schema.go @@ -4,13 +4,13 @@ import ( "fmt" "strings" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type IpRestriction struct { @@ -272,7 +272,7 @@ func CorsSettingsSchema() *pluginsdk.Schema { "allowed_origins": { Type: pluginsdk.TypeSet, Optional: true, - //MinItems: 1, + MinItems: 1, Elem: &pluginsdk.Schema{ Type: pluginsdk.TypeString, }, diff --git a/internal/services/appservice/helpers/web_app_slot_schema.go b/internal/services/appservice/helpers/web_app_slot_schema.go index 15794c54d390..3486bdd24b74 100644 --- a/internal/services/appservice/helpers/web_app_slot_schema.go +++ b/internal/services/appservice/helpers/web_app_slot_schema.go @@ -5,13 +5,13 @@ import ( "strconv" "strings" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" apimValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type SiteConfigLinuxWebAppSlot struct { diff --git a/internal/services/appservice/helpers/windows_web_app_schema.go b/internal/services/appservice/helpers/windows_web_app_schema.go index 4b19e88a4499..2b4b672e5b50 100644 --- a/internal/services/appservice/helpers/windows_web_app_schema.go +++ b/internal/services/appservice/helpers/windows_web_app_schema.go @@ -5,7 +5,6 @@ import ( "strconv" "strings" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" @@ -13,6 +12,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type SiteConfigWindows struct { diff --git a/internal/services/appservice/identity.go b/internal/services/appservice/identity.go index 87066434f8c0..86a6e8fe08b4 100644 --- a/internal/services/appservice/identity.go +++ b/internal/services/appservice/identity.go @@ -1,8 +1,8 @@ package appservice import ( - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) func expandIdentity(input []interface{}) (*web.ManagedServiceIdentity, error) { diff --git a/internal/services/appservice/linux_function_app_data_source.go b/internal/services/appservice/linux_function_app_data_source.go index ef7eb2960476..18828865a10c 100644 --- a/internal/services/appservice/linux_function_app_data_source.go +++ b/internal/services/appservice/linux_function_app_data_source.go @@ -7,7 +7,6 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" @@ -18,6 +17,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tags" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type LinuxFunctionAppDataSource struct{} @@ -48,6 +48,7 @@ type LinuxFunctionAppDataSourceModel struct { FunctionExtensionsVersion string `tfschema:"functions_extension_version"` ForceDisableContentShare bool `tfschema:"content_share_force_disabled"` HttpsOnly bool `tfschema:"https_only"` + PublicNetworkAccess bool `tfschema:"public_network_access_enabled"` SiteConfig []helpers.SiteConfigLinuxFunctionApp `tfschema:"site_config"` StickySettings []helpers.StickySettings `tfschema:"sticky_settings"` Tags map[string]string `tfschema:"tags"` @@ -241,6 +242,11 @@ func (d LinuxFunctionAppDataSource) Attributes() map[string]*pluginsdk.Schema { }, }, + "public_network_access_enabled": { + Type: pluginsdk.TypeBool, + Computed: true, + }, + "usage": { Type: pluginsdk.TypeString, Computed: true, @@ -350,6 +356,7 @@ func (d LinuxFunctionAppDataSource) Read() sdk.ResourceFunc { CustomDomainVerificationId: utils.NormalizeNilableString(props.CustomDomainVerificationID), DefaultHostname: utils.NormalizeNilableString(functionApp.DefaultHostName), Usage: string(props.UsageState), + PublicNetworkAccess: !strings.EqualFold(pointer.From(props.PublicNetworkAccess), helpers.PublicNetworkAccessDisabled), } if hostingEnv := props.HostingEnvironmentProfile; hostingEnv != nil { diff --git a/internal/services/appservice/linux_function_app_data_source_test.go b/internal/services/appservice/linux_function_app_data_source_test.go index 6a751da77063..181f002b242f 100644 --- a/internal/services/appservice/linux_function_app_data_source_test.go +++ b/internal/services/appservice/linux_function_app_data_source_test.go @@ -27,6 +27,7 @@ func TestAccLinuxFunctionAppDataSource_standardComplete(t *testing.T) { check.That(data.ResourceName).Key("possible_outbound_ip_addresses").MatchesRegex(ipListRegex), check.That(data.ResourceName).Key("possible_outbound_ip_address_list.#").Exists(), check.That(data.ResourceName).Key("default_hostname").HasValue(fmt.Sprintf("acctest-lfa-%d.azurewebsites.net", data.RandomInteger)), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("true"), ), }, }) diff --git a/internal/services/appservice/linux_function_app_resource.go b/internal/services/appservice/linux_function_app_resource.go index 827da7d68cb6..7948621e91be 100644 --- a/internal/services/appservice/linux_function_app_resource.go +++ b/internal/services/appservice/linux_function_app_resource.go @@ -7,7 +7,6 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/google/uuid" "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" @@ -23,6 +22,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type LinuxFunctionAppResource struct{} @@ -54,6 +54,7 @@ type LinuxFunctionAppModel struct { ForceDisableContentShare bool `tfschema:"content_share_force_disabled"` HttpsOnly bool `tfschema:"https_only"` KeyVaultReferenceIdentityID string `tfschema:"key_vault_reference_identity_id"` + PublicNetworkAccess bool `tfschema:"public_network_access_enabled"` SiteConfig []helpers.SiteConfigLinuxFunctionApp `tfschema:"site_config"` StorageAccounts []helpers.StorageAccount `tfschema:"storage_account"` Tags map[string]string `tfschema:"tags"` @@ -252,6 +253,12 @@ func (r LinuxFunctionAppResource) Arguments() map[string]*pluginsdk.Schema { Description: "The User Assigned Identity to use for Key Vault access.", }, + "public_network_access_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + }, + "site_config": helpers.SiteConfigSchemaLinuxFunctionApp(), "sticky_settings": helpers.StickySettingsSchema(), @@ -491,9 +498,19 @@ func (r LinuxFunctionAppResource) Create() sdk.ResourceFunc { ClientCertEnabled: utils.Bool(functionApp.ClientCertEnabled), ClientCertMode: web.ClientCertMode(functionApp.ClientCertMode), DailyMemoryTimeQuota: utils.Int32(int32(functionApp.DailyMemoryTimeQuota)), // TODO - Investigate, setting appears silently ignored on Linux Function Apps? + VnetRouteAllEnabled: siteConfig.VnetRouteAllEnabled, }, } + pna := helpers.PublicNetworkAccessEnabled + if !functionApp.PublicNetworkAccess { + pna = helpers.PublicNetworkAccessDisabled + } + + // (@jackofallops) - Values appear to need to be set in both SiteProperties and SiteConfig for now? https://github.com/Azure/azure-rest-api-specs/issues/24681 + siteEnvelope.PublicNetworkAccess = pointer.To(pna) + siteEnvelope.SiteConfig.PublicNetworkAccess = siteEnvelope.PublicNetworkAccess + if functionApp.KeyVaultReferenceIdentityID != "" { siteEnvelope.SiteProperties.KeyVaultReferenceIdentity = utils.String(functionApp.KeyVaultReferenceIdentityID) } @@ -688,6 +705,7 @@ func (r LinuxFunctionAppResource) Read() sdk.ResourceFunc { KeyVaultReferenceIdentityID: utils.NormalizeNilableString(props.KeyVaultReferenceIdentity), CustomDomainVerificationId: utils.NormalizeNilableString(props.CustomDomainVerificationID), DefaultHostname: utils.NormalizeNilableString(props.DefaultHostName), + PublicNetworkAccess: !strings.EqualFold(pointer.From(props.PublicNetworkAccess), helpers.PublicNetworkAccessDisabled), } if hostingEnv := props.HostingEnvironmentProfile; hostingEnv != nil { @@ -964,6 +982,7 @@ func (r LinuxFunctionAppResource) Update() sdk.ResourceFunc { if metadata.ResourceData.HasChange("site_config") { existing.SiteConfig = siteConfig + existing.VnetRouteAllEnabled = siteConfig.VnetRouteAllEnabled } if metadata.ResourceData.HasChange("site_config.0.application_stack") { @@ -972,6 +991,17 @@ func (r LinuxFunctionAppResource) Update() sdk.ResourceFunc { existing.SiteConfig.AppSettings = helpers.MergeUserAppSettings(siteConfig.AppSettings, state.AppSettings) + if metadata.ResourceData.HasChange("public_network_access_enabled") { + pna := helpers.PublicNetworkAccessEnabled + if !state.PublicNetworkAccess { + pna = helpers.PublicNetworkAccessDisabled + } + + // (@jackofallops) - Values appear to need to be set in both SiteProperties and SiteConfig for now? https://github.com/Azure/azure-rest-api-specs/issues/24681 + existing.PublicNetworkAccess = pointer.To(pna) + existing.SiteConfig.PublicNetworkAccess = existing.PublicNetworkAccess + } + updateFuture, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.SiteName, existing) if err != nil { return fmt.Errorf("updating Linux %s: %+v", id, err) diff --git a/internal/services/appservice/linux_function_app_resource_test.go b/internal/services/appservice/linux_function_app_resource_test.go index cd8930fe0ae4..939c9b660013 100644 --- a/internal/services/appservice/linux_function_app_resource_test.go +++ b/internal/services/appservice/linux_function_app_resource_test.go @@ -1431,6 +1431,14 @@ func TestAccLinuxFunctionApp_corsUpdate(t *testing.T) { ), }, data.ImportStep(), + { + Config: r.withCorsSupportCredentialsOnly(data, SkuStandardPlan), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("kind").HasValue("functionapp,linux"), + ), + }, + data.ImportStep(), { Config: r.withCors(data, SkuStandardPlan), Check: acceptance.ComposeTestCheckFunc( @@ -1450,6 +1458,54 @@ func TestAccLinuxFunctionApp_corsUpdate(t *testing.T) { }) } +func TestAccLinuxFunctionApp_publicNetworkAccessDisabled(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_linux_function_app", "test") + r := LinuxFunctionAppResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.publicNetworkAccessDisabled(data, SkuStandardPlan), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("kind").HasValue("functionapp,linux"), + ), + }, + data.ImportStep(), + }) +} + +func TestAccLinuxFunctionApp_publicNetworkAccessUpdate(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_linux_function_app", "test") + r := LinuxFunctionAppResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data, SkuStandardPlan), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + { + Config: r.publicNetworkAccessDisabled(data, SkuStandardPlan), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("false"), + ), + }, + data.ImportStep(), + { + Config: r.basic(data, SkuStandardPlan), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + }) +} + // CustomDiff tests func TestAccLinuxFunctionApp_consumptionPlanBackupShouldError(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_linux_function_app", "test") @@ -1666,6 +1722,32 @@ resource "azurerm_linux_function_app" "test" { `, r.template(data, planSku), data.RandomInteger) } +func (r LinuxFunctionAppResource) withCorsSupportCredentialsOnly(data acceptance.TestData, planSku string) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +%s + +resource "azurerm_linux_function_app" "test" { + name = "acctest-LFA-%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + service_plan_id = azurerm_service_plan.test.id + + storage_account_name = azurerm_storage_account.test.name + storage_account_access_key = azurerm_storage_account.test.primary_access_key + + site_config { + cors { + support_credentials = true + } + } +} +`, r.template(data, planSku), data.RandomInteger) +} + func (r LinuxFunctionAppResource) runtimeScaleCheck(data acceptance.TestData, planSku string) string { return fmt.Sprintf(` provider "azurerm" { @@ -4014,6 +4096,30 @@ resource "azurerm_linux_function_app" "test" { `, r.templateWithStorageAccountExtras(data, planSKU), data.RandomInteger) } +func (r LinuxFunctionAppResource) publicNetworkAccessDisabled(data acceptance.TestData, planSku string) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +%s + +resource "azurerm_linux_function_app" "test" { + name = "acctest-LFA-%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + service_plan_id = azurerm_service_plan.test.id + + public_network_access_enabled = false + + storage_account_name = azurerm_storage_account.test.name + storage_account_access_key = azurerm_storage_account.test.primary_access_key + + site_config {} +} +`, r.template(data, planSku), data.RandomInteger) +} + func (r LinuxFunctionAppResource) templateWithStorageAccountExtras(data acceptance.TestData, planSKU string) string { return fmt.Sprintf(` %s diff --git a/internal/services/appservice/linux_function_app_slot_resource.go b/internal/services/appservice/linux_function_app_slot_resource.go index 49bd34629471..1d57682f4ac5 100644 --- a/internal/services/appservice/linux_function_app_slot_resource.go +++ b/internal/services/appservice/linux_function_app_slot_resource.go @@ -7,7 +7,6 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/google/uuid" "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" @@ -23,6 +22,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type LinuxFunctionAppSlotResource struct{} @@ -61,6 +61,7 @@ type LinuxFunctionAppSlotModel struct { OutboundIPAddressList []string `tfschema:"outbound_ip_address_list"` PossibleOutboundIPAddresses string `tfschema:"possible_outbound_ip_addresses"` PossibleOutboundIPAddressList []string `tfschema:"possible_outbound_ip_address_list"` + PublicNetworkAccess bool `tfschema:"public_network_access_enabled"` SiteCredentials []helpers.SiteCredential `tfschema:"site_credential"` StorageAccounts []helpers.StorageAccount `tfschema:"storage_account"` } @@ -243,6 +244,12 @@ func (r LinuxFunctionAppSlotResource) Arguments() map[string]*pluginsdk.Schema { Description: "The User Assigned Identity to use for Key Vault access.", }, + "public_network_access_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + }, + "site_config": helpers.SiteConfigSchemaLinuxFunctionAppSlot(), "storage_account": helpers.StorageAccountSchema(), @@ -484,9 +491,19 @@ func (r LinuxFunctionAppSlotResource) Create() sdk.ResourceFunc { ClientCertEnabled: pointer.To(functionAppSlot.ClientCertEnabled), ClientCertMode: web.ClientCertMode(functionAppSlot.ClientCertMode), DailyMemoryTimeQuota: pointer.To(int32(functionAppSlot.DailyMemoryTimeQuota)), + VnetRouteAllEnabled: siteConfig.VnetRouteAllEnabled, // (@jackofallops) - Value appear to need to be set in both SiteProperties and SiteConfig for now? https://github.com/Azure/azure-rest-api-specs/issues/24681 }, } + pan := helpers.PublicNetworkAccessEnabled + if !functionAppSlot.PublicNetworkAccess { + pan = helpers.PublicNetworkAccessDisabled + } + + // (@jackofallops) - Value appear to need to be set in both SiteProperties and SiteConfig for now? https://github.com/Azure/azure-rest-api-specs/issues/24681 + siteEnvelope.PublicNetworkAccess = pointer.To(pan) + siteEnvelope.SiteConfig.PublicNetworkAccess = siteEnvelope.PublicNetworkAccess + if functionAppSlot.KeyVaultReferenceIdentityID != "" { siteEnvelope.SiteProperties.KeyVaultReferenceIdentity = pointer.To(functionAppSlot.KeyVaultReferenceIdentityID) } @@ -657,6 +674,7 @@ func (r LinuxFunctionAppSlotResource) Read() sdk.ResourceFunc { KeyVaultReferenceIdentityID: pointer.From(props.KeyVaultReferenceIdentity), CustomDomainVerificationId: pointer.From(props.CustomDomainVerificationID), DefaultHostname: pointer.From(props.DefaultHostName), + PublicNetworkAccess: !strings.EqualFold(pointer.From(props.PublicNetworkAccess), helpers.PublicNetworkAccessDisabled), } if hostingEnv := props.HostingEnvironmentProfile; hostingEnv != nil { @@ -901,6 +919,7 @@ func (r LinuxFunctionAppSlotResource) Update() sdk.ResourceFunc { return fmt.Errorf("expanding Site Config for Linux %s: %+v", id, err) } existing.SiteConfig = siteConfig + existing.VnetRouteAllEnabled = existing.SiteConfig.VnetRouteAllEnabled } if metadata.ResourceData.HasChange("site_config.0.application_stack") { @@ -909,6 +928,17 @@ func (r LinuxFunctionAppSlotResource) Update() sdk.ResourceFunc { existing.SiteConfig.AppSettings = helpers.MergeUserAppSettings(siteConfig.AppSettings, state.AppSettings) + if metadata.ResourceData.HasChange("public_network_access_enabled") { + pan := helpers.PublicNetworkAccessEnabled + if !state.PublicNetworkAccess { + pan = helpers.PublicNetworkAccessDisabled + } + + // (@jackofallops) - Values appear to need to be set in both SiteProperties and SiteConfig for now? https://github.com/Azure/azure-rest-api-specs/issues/24681 + existing.PublicNetworkAccess = pointer.To(pan) + existing.SiteConfig.PublicNetworkAccess = existing.PublicNetworkAccess + } + updateFuture, err := client.CreateOrUpdateSlot(ctx, id.ResourceGroup, id.SiteName, existing, id.SlotName) if err != nil { return fmt.Errorf("updating Linux %s: %+v", id, err) diff --git a/internal/services/appservice/linux_function_app_slot_resource_test.go b/internal/services/appservice/linux_function_app_slot_resource_test.go index 325e85f1874f..75ba371c38da 100644 --- a/internal/services/appservice/linux_function_app_slot_resource_test.go +++ b/internal/services/appservice/linux_function_app_slot_resource_test.go @@ -731,7 +731,7 @@ func TestAccLinuxFunctionAppSlot_appStackPythonUpdate(t *testing.T) { data.ResourceTest(t, r, []acceptance.TestStep{ { - Config: r.appStackPython(data, SkuBasicPlan, "3.9"), + Config: r.appStackPython(data, SkuStandardPlan, "3.9"), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), check.That(data.ResourceName).Key("kind").HasValue("functionapp,linux"), @@ -740,7 +740,7 @@ func TestAccLinuxFunctionAppSlot_appStackPythonUpdate(t *testing.T) { }, data.ImportStep(), { - Config: r.appStackPython(data, SkuBasicPlan, "3.11"), + Config: r.appStackPython(data, SkuStandardPlan, "3.11"), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), check.That(data.ResourceName).Key("kind").HasValue("functionapp,linux"), @@ -1209,6 +1209,54 @@ func TestAccLinuxFunctionAppSlot_withStorageAccountBlockUpdate(t *testing.T) { }) } +func TestAccLinuxFunctionAppSlot_publicNetworkAccessDisabled(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_linux_function_app_slot", "test") + r := LinuxFunctionAppSlotResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.publicNetworkAccessDisabled(data, SkuStandardPlan), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("kind").HasValue("functionapp,linux"), + ), + }, + data.ImportStep(), + }) +} + +func TestAccLinuxFunctionAppSlot_publicNetworkAccessUpdate(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_linux_function_app_slot", "test") + r := LinuxFunctionAppSlotResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data, SkuStandardPlan), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + { + Config: r.publicNetworkAccessDisabled(data, SkuStandardPlan), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("false"), + ), + }, + data.ImportStep(), + { + Config: r.basic(data, SkuStandardPlan), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + }) +} + // Configs func (r LinuxFunctionAppSlotResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { @@ -3194,6 +3242,27 @@ resource "azurerm_linux_function_app_slot" "test" { `, r.templateWithStorageAccountExtras(data, planSku), data.RandomInteger) } +func (r LinuxFunctionAppSlotResource) publicNetworkAccessDisabled(data acceptance.TestData, planSku string) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +%s + +resource "azurerm_linux_function_app_slot" "test" { + name = "acctest-LFAS-%d" + function_app_id = azurerm_linux_function_app.test.id + storage_account_name = azurerm_storage_account.test.name + storage_account_access_key = azurerm_storage_account.test.primary_access_key + + public_network_access_enabled = false + + site_config {} +} +`, r.template(data, planSku), data.RandomInteger) +} + func (r LinuxFunctionAppSlotResource) templateWithStorageAccountExtras(data acceptance.TestData, planSKU string) string { return fmt.Sprintf(` diff --git a/internal/services/appservice/linux_web_app_data_source.go b/internal/services/appservice/linux_web_app_data_source.go index 629fba6e29fe..9b7d13699afb 100644 --- a/internal/services/appservice/linux_web_app_data_source.go +++ b/internal/services/appservice/linux_web_app_data_source.go @@ -52,6 +52,7 @@ type LinuxWebAppDataSourceModel struct { OutboundIPAddressList []string `tfschema:"outbound_ip_address_list"` PossibleOutboundIPAddresses string `tfschema:"possible_outbound_ip_addresses"` PossibleOutboundIPAddressList []string `tfschema:"possible_outbound_ip_address_list"` + PublicNetworkAccess bool `tfschema:"public_network_access_enabled"` Usage string `tfschema:"usage"` SiteCredentials []helpers.SiteCredential `tfschema:"site_credential"` VirtualNetworkSubnetID string `tfschema:"virtual_network_subnet_id"` @@ -204,6 +205,11 @@ func (r LinuxWebAppDataSource) Attributes() map[string]*pluginsdk.Schema { Computed: true, }, + "public_network_access_enabled": { + Type: pluginsdk.TypeBool, + Computed: true, + }, + "site_credential": helpers.SiteCredentialSchema(), "service_plan_id": { @@ -342,6 +348,7 @@ func (r LinuxWebAppDataSource) Read() sdk.ResourceFunc { if subnetId := pointer.From(props.VirtualNetworkSubnetID); subnetId != "" { webApp.VirtualNetworkSubnetID = subnetId } + webApp.PublicNetworkAccess = !strings.EqualFold(pointer.From(props.PublicNetworkAccess), helpers.PublicNetworkAccessDisabled) } webApp.AuthSettings = helpers.FlattenAuthSettings(auth) diff --git a/internal/services/appservice/linux_web_app_resource.go b/internal/services/appservice/linux_web_app_resource.go index 9d69cc2fb273..0d1b9689c069 100644 --- a/internal/services/appservice/linux_web_app_resource.go +++ b/internal/services/appservice/linux_web_app_resource.go @@ -7,7 +7,6 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" @@ -21,6 +20,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type LinuxWebAppResource struct{} @@ -57,6 +57,7 @@ type LinuxWebAppModel struct { OutboundIPAddressList []string `tfschema:"outbound_ip_address_list"` PossibleOutboundIPAddresses string `tfschema:"possible_outbound_ip_addresses"` PossibleOutboundIPAddressList []string `tfschema:"possible_outbound_ip_address_list"` + PublicNetworkAccess bool `tfschema:"public_network_access_enabled"` SiteCredentials []helpers.SiteCredential `tfschema:"site_credential"` } @@ -158,6 +159,12 @@ func (r LinuxWebAppResource) Arguments() map[string]*pluginsdk.Schema { ValidateFunc: commonids.ValidateUserAssignedIdentityID, }, + "public_network_access_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + }, + "logs": helpers.LogsConfigSchema(), "site_config": helpers.SiteConfigSchemaLinux(), @@ -344,9 +351,19 @@ func (r LinuxWebAppResource) Create() sdk.ResourceFunc { ClientAffinityEnabled: pointer.To(webApp.ClientAffinityEnabled), ClientCertEnabled: pointer.To(webApp.ClientCertEnabled), ClientCertMode: web.ClientCertMode(webApp.ClientCertMode), + VnetRouteAllEnabled: siteConfig.VnetRouteAllEnabled, }, } + pna := helpers.PublicNetworkAccessEnabled + if !webApp.PublicNetworkAccess { + pna = helpers.PublicNetworkAccessDisabled + } + + // (@jackofallops) - Values appear to need to be set in both SiteProperties and SiteConfig for now? https://github.com/Azure/azure-rest-api-specs/issues/24681 + siteEnvelope.PublicNetworkAccess = pointer.To(pna) + siteEnvelope.SiteConfig.PublicNetworkAccess = siteEnvelope.PublicNetworkAccess + if webApp.VirtualNetworkSubnetID != "" { siteEnvelope.SiteProperties.VirtualNetworkSubnetID = pointer.To(webApp.VirtualNetworkSubnetID) } @@ -555,6 +572,7 @@ func (r LinuxWebAppResource) Read() sdk.ResourceFunc { OutboundIPAddressList: strings.Split(pointer.From(props.OutboundIPAddresses), ","), PossibleOutboundIPAddresses: pointer.From(props.PossibleOutboundIPAddresses), PossibleOutboundIPAddressList: strings.Split(pointer.From(props.PossibleOutboundIPAddresses), ","), + PublicNetworkAccess: !strings.EqualFold(pointer.From(props.PublicNetworkAccess), helpers.PublicNetworkAccessDisabled), Tags: tags.ToTypedObject(webApp.Tags), } @@ -747,6 +765,18 @@ func (r LinuxWebAppResource) Update() sdk.ResourceFunc { if err != nil { return err } + existing.VnetRouteAllEnabled = existing.SiteConfig.VnetRouteAllEnabled + } + + if metadata.ResourceData.HasChange("public_network_access_enabled") { + pna := helpers.PublicNetworkAccessEnabled + if !state.PublicNetworkAccess { + pna = helpers.PublicNetworkAccessDisabled + } + + // (@jackofallops) - Values appear to need to be set in both SiteProperties and SiteConfig for now? https://github.com/Azure/azure-rest-api-specs/issues/24681 + existing.PublicNetworkAccess = pointer.To(pna) + existing.SiteConfig.PublicNetworkAccess = existing.PublicNetworkAccess } if metadata.ResourceData.HasChange("virtual_network_subnet_id") { diff --git a/internal/services/appservice/linux_web_app_resource_test.go b/internal/services/appservice/linux_web_app_resource_test.go index 5b0ed726e64e..5551cfd77502 100644 --- a/internal/services/appservice/linux_web_app_resource_test.go +++ b/internal/services/appservice/linux_web_app_resource_test.go @@ -1407,6 +1407,54 @@ func TestAccLinuxWebApp_vNetIntegrationUpdate(t *testing.T) { }) } +func TestAccLinuxWebApp_publicNetworkAccessDisabled(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_linux_web_app", "test") + r := LinuxWebAppResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.publicNetworkAccessDisabled(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("false"), + ), + }, + data.ImportStep(), + }) +} + +func TestAccLinuxWebApp_publicNetworkAccessUpdate(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_linux_web_app", "test") + r := LinuxWebAppResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + { + Config: r.publicNetworkAccessDisabled(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("false"), + ), + }, + data.ImportStep(), + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + }) +} + // Exists func func (r LinuxWebAppResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { @@ -1607,6 +1655,7 @@ resource "azurerm_linux_web_app" "test" { worker_count = 1 minimum_tls_version = "1.1" scm_minimum_tls_version = "1.1" + cors { allowed_origins = [ "http://www.contoso.com", @@ -1776,14 +1825,13 @@ resource "azurerm_linux_web_app" "test" { worker_count = 2 minimum_tls_version = "1.2" scm_minimum_tls_version = "1.2" + cors { allowed_origins = [ "http://www.contoso.com", "www.contoso.com", "contoso.com", ] - - support_credentials = true } container_registry_use_managed_identity = true @@ -3097,6 +3145,27 @@ resource "azurerm_linux_web_app" "test" { `, r.baseTemplate(data), data.RandomInteger) } +func (r LinuxWebAppResource) publicNetworkAccessDisabled(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +%s + +resource "azurerm_linux_web_app" "test" { + name = "acctestWA-%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + service_plan_id = azurerm_service_plan.test.id + + public_network_access_enabled = false + + site_config {} +} +`, r.baseTemplate(data), data.RandomInteger) +} + // TODO - Test for new acr creds? // Templates diff --git a/internal/services/appservice/linux_web_app_slot_resource.go b/internal/services/appservice/linux_web_app_slot_resource.go index 2421e8a4f876..8bd7d17fa4ab 100644 --- a/internal/services/appservice/linux_web_app_slot_resource.go +++ b/internal/services/appservice/linux_web_app_slot_resource.go @@ -7,7 +7,6 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" @@ -21,6 +20,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type LinuxWebAppSlotResource struct{} @@ -55,6 +55,7 @@ type LinuxWebAppSlotModel struct { OutboundIPAddressList []string `tfschema:"outbound_ip_address_list"` PossibleOutboundIPAddresses string `tfschema:"possible_outbound_ip_addresses"` PossibleOutboundIPAddressList []string `tfschema:"possible_outbound_ip_address_list"` + PublicNetworkAccess bool `tfschema:"public_network_access_enabled"` SiteCredentials []helpers.SiteCredential `tfschema:"site_credential"` VirtualNetworkSubnetID string `tfschema:"virtual_network_subnet_id"` } @@ -169,6 +170,12 @@ func (r LinuxWebAppSlotResource) Arguments() map[string]*pluginsdk.Schema { ValidateFunc: commonids.ValidateUserAssignedIdentityID, }, + "public_network_access_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + }, + "logs": helpers.LogsConfigSchema(), "site_config": helpers.SiteConfigSchemaLinuxWebAppSlot(), @@ -323,9 +330,19 @@ func (r LinuxWebAppSlotResource) Create() sdk.ResourceFunc { ClientAffinityEnabled: pointer.To(webAppSlot.ClientAffinityEnabled), ClientCertEnabled: pointer.To(webAppSlot.ClientCertEnabled), ClientCertMode: web.ClientCertMode(webAppSlot.ClientCertMode), + VnetRouteAllEnabled: siteConfig.VnetRouteAllEnabled, }, } + pna := helpers.PublicNetworkAccessEnabled + if !webAppSlot.PublicNetworkAccess { + pna = helpers.PublicNetworkAccessDisabled + } + + // (@jackofallops) - Values appear to need to be set in both SiteProperties and SiteConfig for now? https://github.com/Azure/azure-rest-api-specs/issues/24681 + siteEnvelope.PublicNetworkAccess = pointer.To(pna) + siteEnvelope.SiteConfig.PublicNetworkAccess = siteEnvelope.PublicNetworkAccess + if webAppSlot.VirtualNetworkSubnetID != "" { siteEnvelope.SiteProperties.VirtualNetworkSubnetID = pointer.To(webAppSlot.VirtualNetworkSubnetID) } @@ -524,6 +541,7 @@ func (r LinuxWebAppSlotResource) Read() sdk.ResourceFunc { OutboundIPAddressList: strings.Split(pointer.From(props.OutboundIPAddresses), ","), PossibleOutboundIPAddresses: pointer.From(props.PossibleOutboundIPAddresses), PossibleOutboundIPAddressList: strings.Split(pointer.From(props.PossibleOutboundIPAddresses), ","), + PublicNetworkAccess: !strings.EqualFold(pointer.From(props.PublicNetworkAccess), helpers.PublicNetworkAccessDisabled), Tags: tags.ToTypedObject(webAppSlot.Tags), } @@ -719,6 +737,18 @@ func (r LinuxWebAppSlotResource) Update() sdk.ResourceFunc { return fmt.Errorf("expanding Site Config for Linux %s: %+v", id, err) } existing.SiteConfig = siteConfig + existing.VnetRouteAllEnabled = existing.SiteConfig.VnetRouteAllEnabled + } + + if metadata.ResourceData.HasChange("public_network_access_enabled") { + pna := helpers.PublicNetworkAccessEnabled + if !state.PublicNetworkAccess { + pna = helpers.PublicNetworkAccessDisabled + } + + // (@jackofallops) - Values appear to need to be set in both SiteProperties and SiteConfig for now? https://github.com/Azure/azure-rest-api-specs/issues/24681 + existing.PublicNetworkAccess = pointer.To(pna) + existing.SiteConfig.PublicNetworkAccess = existing.PublicNetworkAccess } if metadata.ResourceData.HasChange("virtual_network_subnet_id") { diff --git a/internal/services/appservice/linux_web_app_slot_resource_test.go b/internal/services/appservice/linux_web_app_slot_resource_test.go index 98bf7cc50e87..18e62786e619 100644 --- a/internal/services/appservice/linux_web_app_slot_resource_test.go +++ b/internal/services/appservice/linux_web_app_slot_resource_test.go @@ -1182,6 +1182,54 @@ func TestAccLinuxWebAppSlot_vNetIntegrationUpdate(t *testing.T) { }) } +func TestAccLinuxWebAppSlot_publicNetworkAccessDisabled(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_linux_web_app_slot", "test") + r := LinuxWebAppSlotResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.publicNetworkAccessDisabled(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("false"), + ), + }, + data.ImportStep(), + }) +} + +func TestAccLinuxWebAppSlot_publicNetworkAccessUpdate(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_linux_web_app_slot", "test") + r := LinuxWebAppSlotResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + { + Config: r.publicNetworkAccessDisabled(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("false"), + ), + }, + data.ImportStep(), + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + }) +} + // Exists func (r LinuxWebAppSlotResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { @@ -2444,6 +2492,25 @@ resource "azurerm_linux_web_app_slot" "test" { `, r.baseTemplate(data), data.RandomInteger, SkuStandardPlan, SkuPremiumPlan) } +func (r LinuxWebAppSlotResource) publicNetworkAccessDisabled(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +%s + +resource "azurerm_linux_web_app_slot" "test" { + name = "acctestWAS-%d" + app_service_id = azurerm_linux_web_app.test.id + + public_network_access_enabled = false + + site_config {} +} +`, r.baseTemplate(data), data.RandomInteger) +} + // Templates func (LinuxWebAppSlotResource) baseTemplate(data acceptance.TestData) string { diff --git a/internal/services/appservice/service_plan_resource.go b/internal/services/appservice/service_plan_resource.go index ea1ac70e0af5..81d06d145742 100644 --- a/internal/services/appservice/service_plan_resource.go +++ b/internal/services/appservice/service_plan_resource.go @@ -6,7 +6,6 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" @@ -18,6 +17,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type ServicePlanResource struct{} diff --git a/internal/services/appservice/source_control_resource.go b/internal/services/appservice/source_control_resource.go index e58006c13379..17fd676891fe 100644 --- a/internal/services/appservice/source_control_resource.go +++ b/internal/services/appservice/source_control_resource.go @@ -6,13 +6,13 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type SourceControlResource struct{} diff --git a/internal/services/appservice/source_control_schema.go b/internal/services/appservice/source_control_schema.go index 43c59adafacc..4d938310cb1f 100644 --- a/internal/services/appservice/source_control_schema.go +++ b/internal/services/appservice/source_control_schema.go @@ -1,10 +1,10 @@ package appservice import ( - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type GithubActionConfiguration struct { diff --git a/internal/services/appservice/source_control_slot_resource.go b/internal/services/appservice/source_control_slot_resource.go index 81e636e3315d..3bf442ab6cdb 100644 --- a/internal/services/appservice/source_control_slot_resource.go +++ b/internal/services/appservice/source_control_slot_resource.go @@ -6,7 +6,6 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/parse" @@ -14,6 +13,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type SourceControlSlotResource struct{} diff --git a/internal/services/appservice/source_control_token_resource.go b/internal/services/appservice/source_control_token_resource.go index 84395c80bc19..6af13b60a423 100644 --- a/internal/services/appservice/source_control_token_resource.go +++ b/internal/services/appservice/source_control_token_resource.go @@ -5,13 +5,13 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type AppServiceSourceControlTokenResource struct{} diff --git a/internal/services/appservice/web_app_active_slot_resource.go b/internal/services/appservice/web_app_active_slot_resource.go index 8ecf6f9f8f90..7eb9f86237be 100644 --- a/internal/services/appservice/web_app_active_slot_resource.go +++ b/internal/services/appservice/web_app_active_slot_resource.go @@ -5,13 +5,13 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type WebAppActiveSlotResource struct{} diff --git a/internal/services/appservice/web_app_hybrid_connection_resource.go b/internal/services/appservice/web_app_hybrid_connection_resource.go index ea42b1bd1cd8..c14b1bf84712 100644 --- a/internal/services/appservice/web_app_hybrid_connection_resource.go +++ b/internal/services/appservice/web_app_hybrid_connection_resource.go @@ -5,7 +5,6 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/hybridconnections" "github.com/hashicorp/go-azure-sdk/resource-manager/relay/2017-04-01/namespaces" @@ -18,6 +17,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type WebAppHybridConnectionResource struct{} diff --git a/internal/services/appservice/windows_function_app_data_source.go b/internal/services/appservice/windows_function_app_data_source.go index fa5c9ba06248..0e4632507ad0 100644 --- a/internal/services/appservice/windows_function_app_data_source.go +++ b/internal/services/appservice/windows_function_app_data_source.go @@ -7,7 +7,6 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" @@ -18,6 +17,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tags" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type WindowsFunctionAppDataSource struct{} @@ -47,6 +47,7 @@ type WindowsFunctionAppDataSourceModel struct { FunctionExtensionsVersion string `tfschema:"functions_extension_version"` ForceDisableContentShare bool `tfschema:"content_share_force_disabled"` HttpsOnly bool `tfschema:"https_only"` + PublicNetworkAccess bool `tfschema:"public_network_access_enabled"` SiteConfig []helpers.SiteConfigWindowsFunctionApp `tfschema:"site_config"` StickySettings []helpers.StickySettings `tfschema:"sticky_settings"` Tags map[string]string `tfschema:"tags"` @@ -225,6 +226,11 @@ func (d WindowsFunctionAppDataSource) Attributes() map[string]*pluginsdk.Schema }, }, + "public_network_access_enabled": { + Type: pluginsdk.TypeBool, + Computed: true, + }, + "site_credential": helpers.SiteCredentialSchema(), "site_config": helpers.SiteConfigSchemaWindowsFunctionAppComputed(), @@ -282,6 +288,7 @@ func (d WindowsFunctionAppDataSource) Read() sdk.ResourceFunc { functionApp.CustomDomainVerificationId = utils.NormalizeNilableString(props.CustomDomainVerificationID) functionApp.DefaultHostname = utils.NormalizeNilableString(props.DefaultHostName) functionApp.VirtualNetworkSubnetId = utils.NormalizeNilableString(props.VirtualNetworkSubnetID) + functionApp.PublicNetworkAccess = !strings.EqualFold(pointer.From(props.PublicNetworkAccess), helpers.PublicNetworkAccessDisabled) if hostingEnv := props.HostingEnvironmentProfile; hostingEnv != nil { functionApp.HostingEnvId = pointer.From(hostingEnv.ID) diff --git a/internal/services/appservice/windows_function_app_resource.go b/internal/services/appservice/windows_function_app_resource.go index ff158653a428..acbe1c3c03ea 100644 --- a/internal/services/appservice/windows_function_app_resource.go +++ b/internal/services/appservice/windows_function_app_resource.go @@ -7,7 +7,6 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/google/uuid" "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" @@ -23,6 +22,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type WindowsFunctionAppResource struct{} @@ -54,6 +54,7 @@ type WindowsFunctionAppModel struct { ForceDisableContentShare bool `tfschema:"content_share_force_disabled"` HttpsOnly bool `tfschema:"https_only"` KeyVaultReferenceIdentityID string `tfschema:"key_vault_reference_identity_id"` + PublicNetworkAccess bool `tfschema:"public_network_access_enabled"` SiteConfig []helpers.SiteConfigWindowsFunctionApp `tfschema:"site_config"` StorageAccounts []helpers.StorageAccount `tfschema:"storage_account"` Tags map[string]string `tfschema:"tags"` @@ -252,6 +253,12 @@ func (r WindowsFunctionAppResource) Arguments() map[string]*pluginsdk.Schema { Description: "The User Assigned Identity to use for Key Vault access.", }, + "public_network_access_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + }, + "site_config": helpers.SiteConfigSchemaWindowsFunctionApp(), "sticky_settings": helpers.StickySettingsSchema(), @@ -488,9 +495,19 @@ func (r WindowsFunctionAppResource) Create() sdk.ResourceFunc { ClientCertEnabled: utils.Bool(functionApp.ClientCertEnabled), ClientCertMode: web.ClientCertMode(functionApp.ClientCertMode), DailyMemoryTimeQuota: utils.Int32(int32(functionApp.DailyMemoryTimeQuota)), + VnetRouteAllEnabled: siteConfig.VnetRouteAllEnabled, }, } + pna := helpers.PublicNetworkAccessEnabled + if !functionApp.PublicNetworkAccess { + pna = helpers.PublicNetworkAccessDisabled + } + + // (@jackofallops) - Values appear to need to be set in both SiteProperties and SiteConfig for now? https://github.com/Azure/azure-rest-api-specs/issues/24681 + siteEnvelope.PublicNetworkAccess = pointer.To(pna) + siteEnvelope.SiteConfig.PublicNetworkAccess = siteEnvelope.PublicNetworkAccess + if functionApp.VirtualNetworkSubnetID != "" { siteEnvelope.SiteProperties.VirtualNetworkSubnetID = utils.String(functionApp.VirtualNetworkSubnetID) } @@ -685,6 +702,7 @@ func (r WindowsFunctionAppResource) Read() sdk.ResourceFunc { KeyVaultReferenceIdentityID: utils.NormalizeNilableString(props.KeyVaultReferenceIdentity), CustomDomainVerificationId: utils.NormalizeNilableString(props.CustomDomainVerificationID), DefaultHostname: utils.NormalizeNilableString(props.DefaultHostName), + PublicNetworkAccess: !strings.EqualFold(pointer.From(props.PublicNetworkAccess), helpers.PublicNetworkAccessDisabled), } if hostingEnv := props.HostingEnvironmentProfile; hostingEnv != nil { @@ -967,10 +985,22 @@ func (r WindowsFunctionAppResource) Update() sdk.ResourceFunc { if metadata.ResourceData.HasChange("site_config") { existing.SiteConfig = siteConfig + existing.VnetRouteAllEnabled = existing.SiteConfig.VnetRouteAllEnabled } existing.SiteConfig.AppSettings = helpers.MergeUserAppSettings(siteConfig.AppSettings, state.AppSettings) + if metadata.ResourceData.HasChange("public_network_access_enabled") { + pna := helpers.PublicNetworkAccessEnabled + if !state.PublicNetworkAccess { + pna = helpers.PublicNetworkAccessDisabled + } + + // (@jackofallops) - Values appear to need to be set in both SiteProperties and SiteConfig for now? https://github.com/Azure/azure-rest-api-specs/issues/24681 + existing.PublicNetworkAccess = pointer.To(pna) + existing.SiteConfig.PublicNetworkAccess = existing.PublicNetworkAccess + } + updateFuture, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.SiteName, existing) if err != nil { return fmt.Errorf("updating Windows %s: %+v", id, err) diff --git a/internal/services/appservice/windows_function_app_resource_test.go b/internal/services/appservice/windows_function_app_resource_test.go index 70e0f110f449..a5ad671c3e79 100644 --- a/internal/services/appservice/windows_function_app_resource_test.go +++ b/internal/services/appservice/windows_function_app_resource_test.go @@ -1359,6 +1359,54 @@ func TestAccWindowsFunctionAppASEv3_basic(t *testing.T) { }) } +func TestAccWindowsFunctionApp_publicNetworkAccessDisabled(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_windows_function_app", "test") + r := WindowsFunctionAppResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.publicNetworkAccessDisabled(data, SkuStandardPlan), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("false"), + ), + }, + data.ImportStep(), + }) +} + +func TestAccWindowsFunctionApp_publicNetworkAccessUpdate(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_windows_function_app", "test") + r := WindowsFunctionAppResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data, SkuStandardPlan), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + { + Config: r.publicNetworkAccessDisabled(data, SkuStandardPlan), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("false"), + ), + }, + data.ImportStep(), + { + Config: r.basic(data, SkuStandardPlan), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + }) +} + // Outputs func TestAccWindowsFunctionApp_basicOutputs(t *testing.T) { @@ -3501,6 +3549,30 @@ resource "azurerm_windows_function_app" "test" { `, ServicePlanResource{}.aseV3(data), data.RandomString, data.RandomInteger) } +func (r WindowsFunctionAppResource) publicNetworkAccessDisabled(data acceptance.TestData, planSku string) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +%s + +resource "azurerm_windows_function_app" "test" { + name = "acctest-WFA-%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + service_plan_id = azurerm_service_plan.test.id + + public_network_access_enabled = false + + storage_account_name = azurerm_storage_account.test.name + storage_account_access_key = azurerm_storage_account.test.primary_access_key + + site_config {} +} +`, r.template(data, planSku), data.RandomInteger) +} + func (r WindowsFunctionAppResource) withStorageAccountSingle(data acceptance.TestData, planSKU string) string { return fmt.Sprintf(` provider "azurerm" { diff --git a/internal/services/appservice/windows_function_app_slot_resource.go b/internal/services/appservice/windows_function_app_slot_resource.go index 59bf3728885e..7918baabcf59 100644 --- a/internal/services/appservice/windows_function_app_slot_resource.go +++ b/internal/services/appservice/windows_function_app_slot_resource.go @@ -7,7 +7,6 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/google/uuid" "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" @@ -23,6 +22,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type WindowsFunctionAppSlotResource struct{} @@ -50,6 +50,7 @@ type WindowsFunctionAppSlotModel struct { ForceDisableContentShare bool `tfschema:"content_share_force_disabled"` HttpsOnly bool `tfschema:"https_only"` KeyVaultReferenceIdentityID string `tfschema:"key_vault_reference_identity_id"` + PublicNetworkAccess bool `tfschema:"public_network_access_enabled"` SiteConfig []helpers.SiteConfigWindowsFunctionAppSlot `tfschema:"site_config"` Tags map[string]string `tfschema:"tags"` CustomDomainVerificationId string `tfschema:"custom_domain_verification_id"` @@ -243,6 +244,12 @@ func (r WindowsFunctionAppSlotResource) Arguments() map[string]*pluginsdk.Schema Description: "The User Assigned Identity to use for Key Vault access.", }, + "public_network_access_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + }, + "site_config": helpers.SiteConfigSchemaWindowsFunctionAppSlot(), "storage_account": helpers.StorageAccountSchemaWindows(), @@ -491,9 +498,19 @@ func (r WindowsFunctionAppSlotResource) Create() sdk.ResourceFunc { ClientCertEnabled: pointer.To(functionAppSlot.ClientCertEnabled), ClientCertMode: web.ClientCertMode(functionAppSlot.ClientCertMode), DailyMemoryTimeQuota: pointer.To(int32(functionAppSlot.DailyMemoryTimeQuota)), + VnetRouteAllEnabled: siteConfig.VnetRouteAllEnabled, }, } + pna := helpers.PublicNetworkAccessEnabled + if !functionAppSlot.PublicNetworkAccess { + pna = helpers.PublicNetworkAccessDisabled + } + + // (@jackofallops) - Values appear to need to be set in both SiteProperties and SiteConfig for now? https://github.com/Azure/azure-rest-api-specs/issues/24681 + siteEnvelope.PublicNetworkAccess = pointer.To(pna) + siteEnvelope.SiteConfig.PublicNetworkAccess = siteEnvelope.PublicNetworkAccess + if functionAppSlot.VirtualNetworkSubnetID != "" { siteEnvelope.SiteProperties.VirtualNetworkSubnetID = pointer.To(functionAppSlot.VirtualNetworkSubnetID) } @@ -665,6 +682,7 @@ func (r WindowsFunctionAppSlotResource) Read() sdk.ResourceFunc { KeyVaultReferenceIdentityID: pointer.From(props.KeyVaultReferenceIdentity), CustomDomainVerificationId: pointer.From(props.CustomDomainVerificationID), DefaultHostname: pointer.From(props.DefaultHostName), + PublicNetworkAccess: !strings.EqualFold(pointer.From(props.PublicNetworkAccess), helpers.PublicNetworkAccessDisabled), } if hostingEnv := props.HostingEnvironmentProfile; hostingEnv != nil { @@ -910,10 +928,22 @@ func (r WindowsFunctionAppSlotResource) Update() sdk.ResourceFunc { return fmt.Errorf("expanding Site Config for Windows %s: %+v", id, err) } existing.SiteConfig = siteConfig + existing.VnetRouteAllEnabled = existing.SiteConfig.VnetRouteAllEnabled } existing.SiteConfig.AppSettings = helpers.MergeUserAppSettings(siteConfig.AppSettings, state.AppSettings) + if metadata.ResourceData.HasChange("public_network_access_enabled") { + pna := helpers.PublicNetworkAccessEnabled + if !state.PublicNetworkAccess { + pna = helpers.PublicNetworkAccessDisabled + } + + // (@jackofallops) - Values appear to need to be set in both SiteProperties and SiteConfig for now? https://github.com/Azure/azure-rest-api-specs/issues/24681 + existing.PublicNetworkAccess = pointer.To(pna) + existing.SiteConfig.PublicNetworkAccess = existing.PublicNetworkAccess + } + updateFuture, err := client.CreateOrUpdateSlot(ctx, id.ResourceGroup, id.SiteName, existing, id.SlotName) if err != nil { return fmt.Errorf("updating Windows %s: %+v", id, err) diff --git a/internal/services/appservice/windows_function_app_slot_resource_test.go b/internal/services/appservice/windows_function_app_slot_resource_test.go index 8b47c82fa189..fb7e7557328c 100644 --- a/internal/services/appservice/windows_function_app_slot_resource_test.go +++ b/internal/services/appservice/windows_function_app_slot_resource_test.go @@ -1131,6 +1131,54 @@ func TestAccWindowsFunctionAppSlot_withStorageAccountBlocksUpdate(t *testing.T) }) } +func TestAccWindowsFunctionAppSlot_publicNetworkAccessDisabled(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_windows_function_app_slot", "test") + r := WindowsFunctionAppSlotResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.publicNetworkAccessDisabled(data, SkuStandardPlan), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("false"), + ), + }, + data.ImportStep(), + }) +} + +func TestAccWindowsFunctionAppSlot_publicNetworkAccessUpdate(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_windows_function_app_slot", "test") + r := WindowsFunctionAppSlotResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data, SkuStandardPlan), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + { + Config: r.publicNetworkAccessDisabled(data, SkuStandardPlan), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("false"), + ), + }, + data.ImportStep(), + { + Config: r.basic(data, SkuStandardPlan), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + }) +} + // Exists func (r WindowsFunctionAppSlotResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { @@ -2549,6 +2597,27 @@ resource "azurerm_windows_function_app_slot" "test" { `, r.template(data, planSku), data.RandomInteger, SkuStandardPlan, SkuPremiumPlan) } +func (r WindowsFunctionAppSlotResource) publicNetworkAccessDisabled(data acceptance.TestData, planSku string) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +%s + +resource "azurerm_windows_function_app_slot" "test" { + name = "acctest-WFAS-%d" + function_app_id = azurerm_windows_function_app.test.id + storage_account_name = azurerm_storage_account.test.name + storage_account_access_key = azurerm_storage_account.test.primary_access_key + + public_network_access_enabled = false + + site_config {} +} +`, r.template(data, planSku), data.RandomInteger) +} + // Config Templates func (WindowsFunctionAppSlotResource) template(data acceptance.TestData, planSku string) string { diff --git a/internal/services/appservice/windows_web_app_data_source.go b/internal/services/appservice/windows_web_app_data_source.go index e638dcd5dc54..d0ffa5113ab7 100644 --- a/internal/services/appservice/windows_web_app_data_source.go +++ b/internal/services/appservice/windows_web_app_data_source.go @@ -36,6 +36,7 @@ type WindowsWebAppDataSourceModel struct { Enabled bool `tfschema:"enabled"` HttpsOnly bool `tfschema:"https_only"` LogsConfig []helpers.LogsConfig `tfschema:"logs"` + PublicNetworkAccess bool `tfschema:"public_network_access_enabled"` SiteConfig []helpers.SiteConfigWindows `tfschema:"site_config"` StickySettings []helpers.StickySettings `tfschema:"sticky_settings"` StorageAccounts []helpers.StorageAccount `tfschema:"storage_account"` @@ -184,6 +185,11 @@ func (d WindowsWebAppDataSource) Attributes() map[string]*pluginsdk.Schema { "site_credential": helpers.SiteCredentialSchema(), + "public_network_access_enabled": { + Type: pluginsdk.TypeBool, + Computed: true, + }, + "site_config": helpers.SiteConfigSchemaWindowsComputed(), "sticky_settings": helpers.StickySettingsComputedSchema(), @@ -319,6 +325,7 @@ func (d WindowsWebAppDataSource) Read() sdk.ResourceFunc { if hostingEnv := props.HostingEnvironmentProfile; hostingEnv != nil { webApp.HostingEnvId = pointer.From(hostingEnv.ID) } + webApp.PublicNetworkAccess = !strings.EqualFold(pointer.From(props.PublicNetworkAccess), helpers.PublicNetworkAccessDisabled) } webApp.AuthSettings = helpers.FlattenAuthSettings(auth) diff --git a/internal/services/appservice/windows_web_app_resource.go b/internal/services/appservice/windows_web_app_resource.go index 4b4b7aa7d97e..d5701398650c 100644 --- a/internal/services/appservice/windows_web_app_resource.go +++ b/internal/services/appservice/windows_web_app_resource.go @@ -7,7 +7,6 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" @@ -21,6 +20,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type WindowsWebAppResource struct{} @@ -43,6 +43,7 @@ type WindowsWebAppModel struct { HttpsOnly bool `tfschema:"https_only"` KeyVaultReferenceIdentityID string `tfschema:"key_vault_reference_identity_id"` LogsConfig []helpers.LogsConfig `tfschema:"logs"` + PublicNetworkAccess bool `tfschema:"public_network_access_enabled"` SiteConfig []helpers.SiteConfigWindows `tfschema:"site_config"` StorageAccounts []helpers.StorageAccount `tfschema:"storage_account"` ConnectionStrings []helpers.ConnectionString `tfschema:"connection_string"` @@ -152,6 +153,12 @@ func (r WindowsWebAppResource) Arguments() map[string]*pluginsdk.Schema { "logs": helpers.LogsConfigSchema(), + "public_network_access_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + }, + "site_config": helpers.SiteConfigSchemaWindows(), "sticky_settings": helpers.StickySettingsSchema(), @@ -352,9 +359,19 @@ func (r WindowsWebAppResource) Create() sdk.ResourceFunc { ClientAffinityEnabled: pointer.To(webApp.ClientAffinityEnabled), ClientCertEnabled: pointer.To(webApp.ClientCertEnabled), ClientCertMode: web.ClientCertMode(webApp.ClientCertMode), + VnetRouteAllEnabled: siteConfig.VnetRouteAllEnabled, }, } + pna := helpers.PublicNetworkAccessEnabled + if !webApp.PublicNetworkAccess { + pna = helpers.PublicNetworkAccessDisabled + } + + // (@jackofallops) - Values appear to need to be set in both SiteProperties and SiteConfig for now? https://github.com/Azure/azure-rest-api-specs/issues/24681 + siteEnvelope.PublicNetworkAccess = pointer.To(pna) + siteEnvelope.SiteConfig.PublicNetworkAccess = siteEnvelope.PublicNetworkAccess + if webApp.KeyVaultReferenceIdentityID != "" { siteEnvelope.SiteProperties.KeyVaultReferenceIdentity = pointer.To(webApp.KeyVaultReferenceIdentityID) } @@ -585,6 +602,7 @@ func (r WindowsWebAppResource) Read() sdk.ResourceFunc { OutboundIPAddressList: strings.Split(pointer.From(props.OutboundIPAddresses), ","), PossibleOutboundIPAddresses: pointer.From(props.PossibleOutboundIPAddresses), PossibleOutboundIPAddressList: strings.Split(pointer.From(props.PossibleOutboundIPAddresses), ","), + PublicNetworkAccess: !strings.EqualFold(pointer.From(props.PublicNetworkAccess), helpers.PublicNetworkAccessDisabled), Tags: tags.ToTypedObject(webApp.Tags), } @@ -802,6 +820,18 @@ func (r WindowsWebAppResource) Update() sdk.ResourceFunc { if err != nil { return err } + existing.VnetRouteAllEnabled = existing.SiteConfig.VnetRouteAllEnabled + } + + if metadata.ResourceData.HasChange("public_network_access_enabled") { + pna := helpers.PublicNetworkAccessEnabled + if !state.PublicNetworkAccess { + pna = helpers.PublicNetworkAccessDisabled + } + + // (@jackofallops) - Values appear to need to be set in both SiteProperties and SiteConfig for now? https://github.com/Azure/azure-rest-api-specs/issues/24681 + existing.PublicNetworkAccess = pointer.To(pna) + existing.SiteConfig.PublicNetworkAccess = existing.PublicNetworkAccess } updateFuture, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.SiteName, existing) diff --git a/internal/services/appservice/windows_web_app_resource_test.go b/internal/services/appservice/windows_web_app_resource_test.go index d587719181ea..1e4748649d93 100644 --- a/internal/services/appservice/windows_web_app_resource_test.go +++ b/internal/services/appservice/windows_web_app_resource_test.go @@ -1374,6 +1374,54 @@ func TestAccWindowsWebApp_vNetIntegrationUpdate(t *testing.T) { }) } +func TestAccWindowsWebApp_publicNetworkAccessDisabled(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_windows_web_app", "test") + r := WindowsWebAppResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.publicNetworkAccessDisabled(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("false"), + ), + }, + data.ImportStep(), + }) +} + +func TestAccWindowsWebApp_publicNetworkAccessUpdate(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_windows_web_app", "test") + r := WindowsWebAppResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + { + Config: r.publicNetworkAccessDisabled(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("false"), + ), + }, + data.ImportStep(), + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + }) +} + func (r WindowsWebAppResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { id, err := parse.WebAppID(state.ID) if err != nil { @@ -3186,6 +3234,27 @@ resource "azurerm_windows_web_app" "test" { `, r.baseTemplate(data), data.RandomInteger) } +func (r WindowsWebAppResource) publicNetworkAccessDisabled(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +%s + +resource "azurerm_windows_web_app" "test" { + name = "acctestWA-%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + service_plan_id = azurerm_service_plan.test.id + + public_network_access_enabled = false + + site_config {} +} +`, r.baseTemplate(data), data.RandomInteger) +} + // Templates func (WindowsWebAppResource) baseTemplate(data acceptance.TestData) string { diff --git a/internal/services/appservice/windows_web_app_slot_resource.go b/internal/services/appservice/windows_web_app_slot_resource.go index 12aae4ddaba8..308c7f51376c 100644 --- a/internal/services/appservice/windows_web_app_slot_resource.go +++ b/internal/services/appservice/windows_web_app_slot_resource.go @@ -7,7 +7,6 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" @@ -21,6 +20,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) type WindowsWebAppSlotResource struct{} @@ -41,6 +41,7 @@ type WindowsWebAppSlotModel struct { HttpsOnly bool `tfschema:"https_only"` KeyVaultReferenceIdentityID string `tfschema:"key_vault_reference_identity_id"` LogsConfig []helpers.LogsConfig `tfschema:"logs"` + PublicNetworkAccess bool `tfschema:"public_network_access_enabled"` SiteConfig []helpers.SiteConfigWindowsWebAppSlot `tfschema:"site_config"` StorageAccounts []helpers.StorageAccount `tfschema:"storage_account"` ConnectionStrings []helpers.ConnectionString `tfschema:"connection_string"` @@ -165,6 +166,12 @@ func (r WindowsWebAppSlotResource) Arguments() map[string]*pluginsdk.Schema { "logs": helpers.LogsConfigSchema(), + "public_network_access_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: true, + }, + "site_config": helpers.SiteConfigSchemaWindowsWebAppSlot(), "storage_account": helpers.StorageAccountSchemaWindows(), @@ -326,9 +333,19 @@ func (r WindowsWebAppSlotResource) Create() sdk.ResourceFunc { ClientCertEnabled: pointer.To(webAppSlot.ClientCertEnabled), ClientCertMode: web.ClientCertMode(webAppSlot.ClientCertMode), ClientCertExclusionPaths: pointer.To(webAppSlot.ClientCertExclusionPaths), + VnetRouteAllEnabled: siteConfig.VnetRouteAllEnabled, }, } + pna := helpers.PublicNetworkAccessEnabled + if !webAppSlot.PublicNetworkAccess { + pna = helpers.PublicNetworkAccessDisabled + } + + // (@jackofallops) - Values appear to need to be set in both SiteProperties and SiteConfig for now? https://github.com/Azure/azure-rest-api-specs/issues/24681 + siteEnvelope.PublicNetworkAccess = pointer.To(pna) + siteEnvelope.SiteConfig.PublicNetworkAccess = siteEnvelope.PublicNetworkAccess + if webAppSlot.KeyVaultReferenceIdentityID != "" { siteEnvelope.SiteProperties.KeyVaultReferenceIdentity = pointer.To(webAppSlot.KeyVaultReferenceIdentityID) } @@ -554,6 +571,7 @@ func (r WindowsWebAppSlotResource) Read() sdk.ResourceFunc { OutboundIPAddressList: strings.Split(pointer.From(props.OutboundIPAddresses), ","), PossibleOutboundIPAddresses: pointer.From(props.PossibleOutboundIPAddresses), PossibleOutboundIPAddressList: strings.Split(pointer.From(props.PossibleOutboundIPAddresses), ","), + PublicNetworkAccess: !strings.EqualFold(pointer.From(props.PublicNetworkAccess), helpers.PublicNetworkAccessDisabled), Tags: tags.ToTypedObject(webAppSlot.Tags), } @@ -743,6 +761,18 @@ func (r WindowsWebAppSlotResource) Update() sdk.ResourceFunc { if err != nil { return err } + existing.VnetRouteAllEnabled = existing.SiteConfig.VnetRouteAllEnabled + } + + if metadata.ResourceData.HasChange("public_network_access_enabled") { + pna := helpers.PublicNetworkAccessEnabled + if !state.PublicNetworkAccess { + pna = helpers.PublicNetworkAccessDisabled + } + + // (@jackofallops) - Values appear to need to be set in both SiteProperties and SiteConfig for now? https://github.com/Azure/azure-rest-api-specs/issues/24681 + existing.PublicNetworkAccess = pointer.To(pna) + existing.SiteConfig.PublicNetworkAccess = existing.PublicNetworkAccess } if metadata.ResourceData.HasChange("virtual_network_subnet_id") { diff --git a/internal/services/appservice/windows_web_app_slot_resource_test.go b/internal/services/appservice/windows_web_app_slot_resource_test.go index 12ca9e2895fc..e7d66c674136 100644 --- a/internal/services/appservice/windows_web_app_slot_resource_test.go +++ b/internal/services/appservice/windows_web_app_slot_resource_test.go @@ -966,6 +966,54 @@ func TestAccWindowsWebAppSlot_vNetIntegrationUpdate(t *testing.T) { }) } +func TestAccWindowsWebAppSlot_publicNetworkAccessDisabled(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_windows_web_app_slot", "test") + r := WindowsWebAppSlotResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.publicNetworkAccessDisabled(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("false"), + ), + }, + data.ImportStep(), + }) +} + +func TestAccWindowsWebAppSlot_publicNetworkAccessUpdate(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_windows_web_app_slot", "test") + r := WindowsWebAppSlotResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + { + Config: r.publicNetworkAccessDisabled(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("false"), + ), + }, + data.ImportStep(), + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("public_network_access_enabled").HasValue("true"), + ), + }, + data.ImportStep(), + }) +} + // Exists func (r WindowsWebAppSlotResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { @@ -2091,6 +2139,25 @@ resource "azurerm_windows_web_app_slot" "test" { `, r.baseTemplate(data), data.RandomInteger, SkuStandardPlan, SkuPremiumPlan) } +func (r WindowsWebAppSlotResource) publicNetworkAccessDisabled(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +%s + +resource "azurerm_windows_web_app_slot" "test" { + name = "acctestWAS-%d" + app_service_id = azurerm_windows_web_app.test.id + + public_network_access_enabled = false + + site_config {} +} +`, r.baseTemplate(data), data.RandomInteger) +} + // Templates func (WindowsWebAppSlotResource) baseTemplate(data acceptance.TestData) string { diff --git a/internal/services/web/app_service_public_certificate_resource.go b/internal/services/web/app_service_public_certificate_resource.go index 1afb631199a8..fa6161815f18 100644 --- a/internal/services/web/app_service_public_certificate_resource.go +++ b/internal/services/web/app_service_public_certificate_resource.go @@ -6,7 +6,6 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" // nolint: staticcheck "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -15,6 +14,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" + "github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web" ) func resourceAppServicePublicCertificate() *pluginsdk.Resource { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/CHANGELOG.md deleted file mode 100644 index 52911e4cc5e4..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Change History - diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/_meta.json b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/_meta.json deleted file mode 100644 index 5e8289ecebf2..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commit": "3587a60ea8f18e76a41e4b56b72aeddce879aae9", - "readme": "/_/azure-rest-api-specs/specification/web/resource-manager/readme.md", - "tag": "package-2021-03", - "use": "@microsoft.azure/autorest.go@2.1.187", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2021-03 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --pass-thru:schema-validator-swagger --enum-prefix /_/azure-rest-api-specs/specification/web/resource-manager/readme.md", - "additional_properties": { - "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --pass-thru:schema-validator-swagger --enum-prefix" - } -} \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/apps.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/apps.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/apps.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/apps.go index 31cff2b913d3..a916c83686ad 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/apps.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/apps.go @@ -8,11 +8,12 @@ package web import ( "context" + "net/http" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" - "net/http" ) // AppsClient is the webSite Management Client @@ -87,7 +88,7 @@ func (client AppsClient) AddPremierAddOnPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -179,7 +180,7 @@ func (client AppsClient) AddPremierAddOnSlotPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -266,7 +267,7 @@ func (client AppsClient) AnalyzeCustomHostnamePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -356,7 +357,7 @@ func (client AppsClient) AnalyzeCustomHostnameSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -448,7 +449,7 @@ func (client AppsClient) ApplySlotConfigToProductionPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -540,7 +541,7 @@ func (client AppsClient) ApplySlotConfigurationSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -619,7 +620,7 @@ func (client AppsClient) ApproveOrRejectPrivateEndpointConnectionPreparer(ctx co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -710,7 +711,7 @@ func (client AppsClient) ApproveOrRejectPrivateEndpointConnectionSlotPreparer(ct "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -816,7 +817,7 @@ func (client AppsClient) BackupPreparer(ctx context.Context, resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -915,7 +916,7 @@ func (client AppsClient) BackupSlotPreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1004,7 +1005,7 @@ func (client AppsClient) CreateDeploymentPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1096,7 +1097,7 @@ func (client AppsClient) CreateDeploymentSlotPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1178,7 +1179,7 @@ func (client AppsClient) CreateFunctionPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1272,7 +1273,7 @@ func (client AppsClient) CreateInstanceFunctionSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1364,7 +1365,7 @@ func (client AppsClient) CreateInstanceMSDeployOperationPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1458,7 +1459,7 @@ func (client AppsClient) CreateInstanceMSDeployOperationSlotPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1548,7 +1549,7 @@ func (client AppsClient) CreateMSDeployOperationPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1640,7 +1641,7 @@ func (client AppsClient) CreateMSDeployOperationSlotPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1683,6 +1684,90 @@ func (client AppsClient) CreateMSDeployOperationSlotResponder(resp *http.Respons return } +// CreateOneDeployOperation description for Invoke the OneDeploy publish web app extension. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of web app. +func (client AppsClient) CreateOneDeployOperation(ctx context.Context, resourceGroupName string, name string) (result SetObject, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOneDeployOperation") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "CreateOneDeployOperation", err.Error()) + } + + req, err := client.CreateOneDeployOperationPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOneDeployOperation", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOneDeployOperationSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOneDeployOperation", resp, "Failure sending request") + return + } + + result, err = client.CreateOneDeployOperationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOneDeployOperation", resp, "Failure responding to request") + return + } + + return +} + +// CreateOneDeployOperationPreparer prepares the CreateOneDeployOperation request. +func (client AppsClient) CreateOneDeployOperationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOneDeployOperationSender sends the CreateOneDeployOperation request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) CreateOneDeployOperationSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOneDeployOperationResponder handles the response to the CreateOneDeployOperation request. The method always +// closes the http.Response Body. +func (client AppsClient) CreateOneDeployOperationResponder(resp *http.Response) (result SetObject, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // CreateOrUpdate description for Creates a new web, mobile, or API app in an existing resource group, or updates an // existing app. // Parameters: @@ -1719,6 +1804,8 @@ func (client AppsClient) CreateOrUpdate(ctx context.Context, resourceGroupName s }}, {Target: "siteEnvelope.SiteProperties.SiteConfig.FunctionAppScaleLimit", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.FunctionAppScaleLimit", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, + {Target: "siteEnvelope.SiteProperties.SiteConfig.ElasticWebAppScaleLimit", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.ElasticWebAppScaleLimit", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, {Target: "siteEnvelope.SiteProperties.SiteConfig.MinimumElasticInstanceCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.MinimumElasticInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil}, {Target: "siteEnvelope.SiteProperties.SiteConfig.MinimumElasticInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, @@ -1753,7 +1840,7 @@ func (client AppsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1829,6 +1916,8 @@ func (client AppsClient) CreateOrUpdateConfiguration(ctx context.Context, resour }}, {Target: "siteConfig.SiteConfig.FunctionAppScaleLimit", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.FunctionAppScaleLimit", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, + {Target: "siteConfig.SiteConfig.ElasticWebAppScaleLimit", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.ElasticWebAppScaleLimit", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, {Target: "siteConfig.SiteConfig.MinimumElasticInstanceCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.MinimumElasticInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil}, {Target: "siteConfig.SiteConfig.MinimumElasticInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, @@ -1867,7 +1956,7 @@ func (client AppsClient) CreateOrUpdateConfigurationPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1935,6 +2024,8 @@ func (client AppsClient) CreateOrUpdateConfigurationSlot(ctx context.Context, re }}, {Target: "siteConfig.SiteConfig.FunctionAppScaleLimit", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.FunctionAppScaleLimit", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, + {Target: "siteConfig.SiteConfig.ElasticWebAppScaleLimit", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.ElasticWebAppScaleLimit", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, {Target: "siteConfig.SiteConfig.MinimumElasticInstanceCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.MinimumElasticInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil}, {Target: "siteConfig.SiteConfig.MinimumElasticInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, @@ -1974,7 +2065,7 @@ func (client AppsClient) CreateOrUpdateConfigurationSlotPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2064,7 +2155,7 @@ func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierPreparer(ctx con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2157,7 +2248,7 @@ func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierSlotPreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2248,7 +2339,7 @@ func (client AppsClient) CreateOrUpdateFunctionSecretPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2341,7 +2432,7 @@ func (client AppsClient) CreateOrUpdateFunctionSecretSlotPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2430,7 +2521,7 @@ func (client AppsClient) CreateOrUpdateHostNameBindingPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2522,7 +2613,7 @@ func (client AppsClient) CreateOrUpdateHostNameBindingSlotPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2613,7 +2704,7 @@ func (client AppsClient) CreateOrUpdateHostSecretPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2706,7 +2797,7 @@ func (client AppsClient) CreateOrUpdateHostSecretSlotPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2797,7 +2888,7 @@ func (client AppsClient) CreateOrUpdateHybridConnectionPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2890,7 +2981,7 @@ func (client AppsClient) CreateOrUpdateHybridConnectionSlotPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2980,7 +3071,7 @@ func (client AppsClient) CreateOrUpdatePublicCertificatePreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -3073,7 +3164,7 @@ func (client AppsClient) CreateOrUpdatePublicCertificateSlotPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -3163,7 +3254,7 @@ func (client AppsClient) CreateOrUpdateRelayServiceConnectionPreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -3256,7 +3347,7 @@ func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotPreparer(ctx co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -3327,6 +3418,8 @@ func (client AppsClient) CreateOrUpdateSlot(ctx context.Context, resourceGroupNa }}, {Target: "siteEnvelope.SiteProperties.SiteConfig.FunctionAppScaleLimit", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.FunctionAppScaleLimit", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, + {Target: "siteEnvelope.SiteProperties.SiteConfig.ElasticWebAppScaleLimit", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.ElasticWebAppScaleLimit", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, {Target: "siteEnvelope.SiteProperties.SiteConfig.MinimumElasticInstanceCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.MinimumElasticInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil}, {Target: "siteEnvelope.SiteProperties.SiteConfig.MinimumElasticInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, @@ -3362,7 +3455,7 @@ func (client AppsClient) CreateOrUpdateSlotPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -3452,7 +3545,7 @@ func (client AppsClient) CreateOrUpdateSourceControlPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -3545,7 +3638,7 @@ func (client AppsClient) CreateOrUpdateSourceControlSlotPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -3645,7 +3738,7 @@ func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckPre "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -3738,7 +3831,7 @@ func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlo "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -3828,7 +3921,7 @@ func (client AppsClient) CreateOrUpdateVnetConnectionPreparer(ctx context.Contex "vnetName": autorest.Encode("path", vnetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -3923,7 +4016,7 @@ func (client AppsClient) CreateOrUpdateVnetConnectionGatewayPreparer(ctx context "vnetName": autorest.Encode("path", vnetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -4021,7 +4114,7 @@ func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotPreparer(ctx con "vnetName": autorest.Encode("path", vnetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -4114,7 +4207,7 @@ func (client AppsClient) CreateOrUpdateVnetConnectionSlotPreparer(ctx context.Co "vnetName": autorest.Encode("path", vnetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -4203,7 +4296,7 @@ func (client AppsClient) DeletePreparer(ctx context.Context, resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -4294,7 +4387,7 @@ func (client AppsClient) DeleteBackupPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -4377,7 +4470,7 @@ func (client AppsClient) DeleteBackupConfigurationPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -4463,7 +4556,7 @@ func (client AppsClient) DeleteBackupConfigurationSlotPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -4551,7 +4644,7 @@ func (client AppsClient) DeleteBackupSlotPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -4636,7 +4729,7 @@ func (client AppsClient) DeleteContinuousWebJobPreparer(ctx context.Context, res "webJobName": autorest.Encode("path", webJobName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -4724,7 +4817,7 @@ func (client AppsClient) DeleteContinuousWebJobSlotPreparer(ctx context.Context, "webJobName": autorest.Encode("path", webJobName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -4809,7 +4902,7 @@ func (client AppsClient) DeleteDeploymentPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -4897,7 +4990,7 @@ func (client AppsClient) DeleteDeploymentSlotPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -4982,7 +5075,7 @@ func (client AppsClient) DeleteDomainOwnershipIdentifierPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -5070,7 +5163,7 @@ func (client AppsClient) DeleteDomainOwnershipIdentifierSlotPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -5155,7 +5248,7 @@ func (client AppsClient) DeleteFunctionPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -5242,7 +5335,7 @@ func (client AppsClient) DeleteFunctionSecretPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -5331,7 +5424,7 @@ func (client AppsClient) DeleteFunctionSecretSlotPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -5416,7 +5509,7 @@ func (client AppsClient) DeleteHostNameBindingPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -5504,7 +5597,7 @@ func (client AppsClient) DeleteHostNameBindingSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -5591,7 +5684,7 @@ func (client AppsClient) DeleteHostSecretPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -5680,7 +5773,7 @@ func (client AppsClient) DeleteHostSecretSlotPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -5767,7 +5860,7 @@ func (client AppsClient) DeleteHybridConnectionPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -5856,7 +5949,7 @@ func (client AppsClient) DeleteHybridConnectionSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -5943,7 +6036,7 @@ func (client AppsClient) DeleteInstanceFunctionSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -6032,7 +6125,7 @@ func (client AppsClient) DeleteInstanceProcessPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -6124,7 +6217,7 @@ func (client AppsClient) DeleteInstanceProcessSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -6209,7 +6302,7 @@ func (client AppsClient) DeletePremierAddOnPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -6297,7 +6390,7 @@ func (client AppsClient) DeletePremierAddOnSlotPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -6374,7 +6467,7 @@ func (client AppsClient) DeletePrivateEndpointConnectionPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -6463,7 +6556,7 @@ func (client AppsClient) DeletePrivateEndpointConnectionSlotPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -6560,7 +6653,7 @@ func (client AppsClient) DeleteProcessPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -6649,7 +6742,7 @@ func (client AppsClient) DeleteProcessSlotPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -6734,7 +6827,7 @@ func (client AppsClient) DeletePublicCertificatePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -6822,7 +6915,7 @@ func (client AppsClient) DeletePublicCertificateSlotPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -6907,7 +7000,7 @@ func (client AppsClient) DeleteRelayServiceConnectionPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -6995,7 +7088,7 @@ func (client AppsClient) DeleteRelayServiceConnectionSlotPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -7080,7 +7173,7 @@ func (client AppsClient) DeleteSiteExtensionPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -7168,7 +7261,7 @@ func (client AppsClient) DeleteSiteExtensionSlotPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -7256,7 +7349,7 @@ func (client AppsClient) DeleteSlotPreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -7345,7 +7438,7 @@ func (client AppsClient) DeleteSourceControlPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -7434,7 +7527,7 @@ func (client AppsClient) DeleteSourceControlSlotPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -7521,7 +7614,7 @@ func (client AppsClient) DeleteSwiftVirtualNetworkPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -7608,7 +7701,7 @@ func (client AppsClient) DeleteSwiftVirtualNetworkSlotPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -7693,7 +7786,7 @@ func (client AppsClient) DeleteTriggeredWebJobPreparer(ctx context.Context, reso "webJobName": autorest.Encode("path", webJobName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -7781,7 +7874,7 @@ func (client AppsClient) DeleteTriggeredWebJobSlotPreparer(ctx context.Context, "webJobName": autorest.Encode("path", webJobName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -7867,7 +7960,7 @@ func (client AppsClient) DeleteVnetConnectionPreparer(ctx context.Context, resou "vnetName": autorest.Encode("path", vnetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -7956,7 +8049,7 @@ func (client AppsClient) DeleteVnetConnectionSlotPreparer(ctx context.Context, r "vnetName": autorest.Encode("path", vnetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -7986,6 +8079,186 @@ func (client AppsClient) DeleteVnetConnectionSlotResponder(resp *http.Response) return } +// DeployWorkflowArtifacts description for Creates the artifacts for web site, or a deployment slot. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// workflowArtifacts - application settings and files of the workflow. +func (client AppsClient) DeployWorkflowArtifacts(ctx context.Context, resourceGroupName string, name string, workflowArtifacts *WorkflowArtifacts) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeployWorkflowArtifacts") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "DeployWorkflowArtifacts", err.Error()) + } + + req, err := client.DeployWorkflowArtifactsPreparer(ctx, resourceGroupName, name, workflowArtifacts) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeployWorkflowArtifacts", nil, "Failure preparing request") + return + } + + resp, err := client.DeployWorkflowArtifactsSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeployWorkflowArtifacts", resp, "Failure sending request") + return + } + + result, err = client.DeployWorkflowArtifactsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeployWorkflowArtifacts", resp, "Failure responding to request") + return + } + + return +} + +// DeployWorkflowArtifactsPreparer prepares the DeployWorkflowArtifacts request. +func (client AppsClient) DeployWorkflowArtifactsPreparer(ctx context.Context, resourceGroupName string, name string, workflowArtifacts *WorkflowArtifacts) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployWorkflowArtifacts", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if workflowArtifacts != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(workflowArtifacts)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeployWorkflowArtifactsSender sends the DeployWorkflowArtifacts request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) DeployWorkflowArtifactsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeployWorkflowArtifactsResponder handles the response to the DeployWorkflowArtifacts request. The method always +// closes the http.Response Body. +func (client AppsClient) DeployWorkflowArtifactsResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeployWorkflowArtifactsSlot description for Creates the artifacts for web site, or a deployment slot. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// slot - name of the deployment slot. +// workflowArtifacts - application settings and files of the workflow. +func (client AppsClient) DeployWorkflowArtifactsSlot(ctx context.Context, resourceGroupName string, name string, slot string, workflowArtifacts *WorkflowArtifacts) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeployWorkflowArtifactsSlot") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "DeployWorkflowArtifactsSlot", err.Error()) + } + + req, err := client.DeployWorkflowArtifactsSlotPreparer(ctx, resourceGroupName, name, slot, workflowArtifacts) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeployWorkflowArtifactsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.DeployWorkflowArtifactsSlotSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeployWorkflowArtifactsSlot", resp, "Failure sending request") + return + } + + result, err = client.DeployWorkflowArtifactsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeployWorkflowArtifactsSlot", resp, "Failure responding to request") + return + } + + return +} + +// DeployWorkflowArtifactsSlotPreparer prepares the DeployWorkflowArtifactsSlot request. +func (client AppsClient) DeployWorkflowArtifactsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, workflowArtifacts *WorkflowArtifacts) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployWorkflowArtifacts", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if workflowArtifacts != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(workflowArtifacts)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeployWorkflowArtifactsSlotSender sends the DeployWorkflowArtifactsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) DeployWorkflowArtifactsSlotSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeployWorkflowArtifactsSlotResponder handles the response to the DeployWorkflowArtifactsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) DeployWorkflowArtifactsSlotResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + // 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. // Parameters: @@ -8046,7 +8319,7 @@ func (client AppsClient) DiscoverBackupPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -8142,7 +8415,7 @@ func (client AppsClient) DiscoverBackupSlotPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -8229,7 +8502,7 @@ func (client AppsClient) GenerateNewSitePublishingPasswordPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -8316,7 +8589,7 @@ func (client AppsClient) GenerateNewSitePublishingPasswordSlotPreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -8399,7 +8672,7 @@ func (client AppsClient) GetPreparer(ctx context.Context, resourceGroupName stri "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -8485,7 +8758,7 @@ func (client AppsClient) GetAppSettingKeyVaultReferencePreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -8572,7 +8845,7 @@ func (client AppsClient) GetAppSettingKeyVaultReferenceSlotPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -8661,7 +8934,7 @@ func (client AppsClient) GetAppSettingsKeyVaultReferencesPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -8788,7 +9061,7 @@ func (client AppsClient) GetAppSettingsKeyVaultReferencesSlotPreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -8909,7 +9182,7 @@ func (client AppsClient) GetAuthSettingsPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -8996,7 +9269,7 @@ func (client AppsClient) GetAuthSettingsSlotPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -9080,7 +9353,7 @@ func (client AppsClient) GetAuthSettingsV2Preparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -9167,7 +9440,7 @@ func (client AppsClient) GetAuthSettingsV2SlotPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -9252,7 +9525,7 @@ func (client AppsClient) GetAuthSettingsV2WithoutSecretsPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -9283,6 +9556,93 @@ func (client AppsClient) GetAuthSettingsV2WithoutSecretsResponder(resp *http.Res return } +// GetAuthSettingsV2WithoutSecretsSlot sends the get auth settings v2 without secrets slot request. +// Parameters: +// 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. +func (client AppsClient) GetAuthSettingsV2WithoutSecretsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteAuthSettingsV2, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAuthSettingsV2WithoutSecretsSlot") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "GetAuthSettingsV2WithoutSecretsSlot", err.Error()) + } + + req, err := client.GetAuthSettingsV2WithoutSecretsSlotPreparer(ctx, resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsV2WithoutSecretsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.GetAuthSettingsV2WithoutSecretsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsV2WithoutSecretsSlot", resp, "Failure sending request") + return + } + + result, err = client.GetAuthSettingsV2WithoutSecretsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsV2WithoutSecretsSlot", resp, "Failure responding to request") + return + } + + return +} + +// GetAuthSettingsV2WithoutSecretsSlotPreparer prepares the GetAuthSettingsV2WithoutSecretsSlot request. +func (client AppsClient) GetAuthSettingsV2WithoutSecretsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetAuthSettingsV2WithoutSecretsSlotSender sends the GetAuthSettingsV2WithoutSecretsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetAuthSettingsV2WithoutSecretsSlotSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetAuthSettingsV2WithoutSecretsSlotResponder handles the response to the GetAuthSettingsV2WithoutSecretsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) GetAuthSettingsV2WithoutSecretsSlotResponder(resp *http.Response) (result SiteAuthSettingsV2, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // GetBackupConfiguration description for Gets the backup configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. @@ -9336,7 +9696,7 @@ func (client AppsClient) GetBackupConfigurationPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -9423,7 +9783,7 @@ func (client AppsClient) GetBackupConfigurationSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -9509,7 +9869,7 @@ func (client AppsClient) GetBackupStatusPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -9598,7 +9958,7 @@ func (client AppsClient) GetBackupStatusSlotPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -9683,7 +10043,7 @@ func (client AppsClient) GetConfigurationPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -9771,7 +10131,7 @@ func (client AppsClient) GetConfigurationSlotPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -9857,7 +10217,7 @@ func (client AppsClient) GetConfigurationSnapshotPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -9947,7 +10307,7 @@ func (client AppsClient) GetConfigurationSnapshotSlotPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -10031,7 +10391,7 @@ func (client AppsClient) GetContainerLogsZipPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -10116,7 +10476,7 @@ func (client AppsClient) GetContainerLogsZipSlotPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -10201,7 +10561,7 @@ func (client AppsClient) GetContinuousWebJobPreparer(ctx context.Context, resour "webJobName": autorest.Encode("path", webJobName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -10290,7 +10650,7 @@ func (client AppsClient) GetContinuousWebJobSlotPreparer(ctx context.Context, re "webJobName": autorest.Encode("path", webJobName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -10376,7 +10736,7 @@ func (client AppsClient) GetDeploymentPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -10465,7 +10825,7 @@ func (client AppsClient) GetDeploymentSlotPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -10549,7 +10909,7 @@ func (client AppsClient) GetDiagnosticLogsConfigurationPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -10636,7 +10996,7 @@ func (client AppsClient) GetDiagnosticLogsConfigurationSlotPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -10722,7 +11082,7 @@ func (client AppsClient) GetDomainOwnershipIdentifierPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -10811,7 +11171,7 @@ func (client AppsClient) GetDomainOwnershipIdentifierSlotPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -10895,7 +11255,7 @@ func (client AppsClient) GetFtpAllowedPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -10980,7 +11340,7 @@ func (client AppsClient) GetFtpAllowedSlotPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -11066,7 +11426,7 @@ func (client AppsClient) GetFunctionPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -11150,7 +11510,7 @@ func (client AppsClient) GetFunctionsAdminTokenPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -11236,7 +11596,7 @@ func (client AppsClient) GetFunctionsAdminTokenSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -11322,7 +11682,7 @@ func (client AppsClient) GetHostNameBindingPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -11411,7 +11771,7 @@ func (client AppsClient) GetHostNameBindingSlotPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -11499,7 +11859,7 @@ func (client AppsClient) GetHybridConnectionPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -11589,7 +11949,7 @@ func (client AppsClient) GetHybridConnectionSlotPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -11677,7 +12037,7 @@ func (client AppsClient) GetInstanceFunctionSlotPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -11762,7 +12122,7 @@ func (client AppsClient) GetInstanceInfoPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -11849,7 +12209,7 @@ func (client AppsClient) GetInstanceInfoSlotPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -11935,7 +12295,7 @@ func (client AppsClient) GetInstanceMSDeployLogPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -12023,7 +12383,7 @@ func (client AppsClient) GetInstanceMSDeployLogSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -12109,7 +12469,7 @@ func (client AppsClient) GetInstanceMsDeployStatusPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -12197,7 +12557,7 @@ func (client AppsClient) GetInstanceMsDeployStatusSlotPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -12287,7 +12647,7 @@ func (client AppsClient) GetInstanceProcessPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -12377,7 +12737,7 @@ func (client AppsClient) GetInstanceProcessDumpPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -12469,7 +12829,7 @@ func (client AppsClient) GetInstanceProcessDumpSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -12560,7 +12920,7 @@ func (client AppsClient) GetInstanceProcessModulePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -12655,7 +13015,7 @@ func (client AppsClient) GetInstanceProcessModuleSlotPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -12748,7 +13108,7 @@ func (client AppsClient) GetInstanceProcessSlotPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -12779,100 +13139,15 @@ func (client AppsClient) GetInstanceProcessSlotResponder(resp *http.Response) (r return } -// GetMigrateMySQLStatus description for Returns the status of MySql in app migration, if one is active, and whether or -// not MySql in app is enabled -// Parameters: -// resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -func (client AppsClient) GetMigrateMySQLStatus(ctx context.Context, resourceGroupName string, name string) (result MigrateMySQLStatus, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMigrateMySQLStatus") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "GetMigrateMySQLStatus", err.Error()) - } - - req, err := client.GetMigrateMySQLStatusPreparer(ctx, resourceGroupName, name) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", nil, "Failure preparing request") - return - } - - resp, err := client.GetMigrateMySQLStatusSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", resp, "Failure sending request") - return - } - - result, err = client.GetMigrateMySQLStatusResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", resp, "Failure responding to request") - return - } - - return -} - -// GetMigrateMySQLStatusPreparer prepares the GetMigrateMySQLStatus request. -func (client AppsClient) GetMigrateMySQLStatusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2021-03-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetMigrateMySQLStatusSender sends the GetMigrateMySQLStatus request. The method will close the -// http.Response Body if it receives an error. -func (client AppsClient) GetMigrateMySQLStatusSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetMigrateMySQLStatusResponder handles the response to the GetMigrateMySQLStatus request. The method always -// closes the http.Response Body. -func (client AppsClient) GetMigrateMySQLStatusResponder(resp *http.Response) (result MigrateMySQLStatus, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetMigrateMySQLStatusSlot description for Returns the status of MySql in app migration, if one is active, and -// whether or not MySql in app is enabled +// GetInstanceWorkflowSlot sends the get instance workflow slot request. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. +// name - site name. // slot - name of the deployment slot. -func (client AppsClient) GetMigrateMySQLStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MigrateMySQLStatus, err error) { +// workflowName - workflow name. +func (client AppsClient) GetInstanceWorkflowSlot(ctx context.Context, resourceGroupName string, name string, slot string, workflowName string) (result WorkflowEnvelope, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMigrateMySQLStatusSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceWorkflowSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -12885,42 +13160,47 @@ func (client AppsClient) GetMigrateMySQLStatusSlot(ctx context.Context, resource {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "GetMigrateMySQLStatusSlot", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: workflowName, + Constraints: []validation.Constraint{{Target: "workflowName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "workflowName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "workflowName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "GetInstanceWorkflowSlot", err.Error()) } - req, err := client.GetMigrateMySQLStatusSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetInstanceWorkflowSlotPreparer(ctx, resourceGroupName, name, slot, workflowName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceWorkflowSlot", nil, "Failure preparing request") return } - resp, err := client.GetMigrateMySQLStatusSlotSender(req) + resp, err := client.GetInstanceWorkflowSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceWorkflowSlot", resp, "Failure sending request") return } - result, err = client.GetMigrateMySQLStatusSlotResponder(resp) + result, err = client.GetInstanceWorkflowSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceWorkflowSlot", resp, "Failure responding to request") return } return } -// GetMigrateMySQLStatusSlotPreparer prepares the GetMigrateMySQLStatusSlot request. -func (client AppsClient) GetMigrateMySQLStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetInstanceWorkflowSlotPreparer prepares the GetInstanceWorkflowSlot request. +func (client AppsClient) GetInstanceWorkflowSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, workflowName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workflowName": autorest.Encode("path", workflowName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -12928,20 +13208,20 @@ func (client AppsClient) GetMigrateMySQLStatusSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetMigrateMySQLStatusSlotSender sends the GetMigrateMySQLStatusSlot request. The method will close the +// GetInstanceWorkflowSlotSender sends the GetInstanceWorkflowSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetMigrateMySQLStatusSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceWorkflowSlotSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// GetMigrateMySQLStatusSlotResponder handles the response to the GetMigrateMySQLStatusSlot request. The method always +// GetInstanceWorkflowSlotResponder handles the response to the GetInstanceWorkflowSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetMigrateMySQLStatusSlotResponder(resp *http.Response) (result MigrateMySQLStatus, err error) { +func (client AppsClient) GetInstanceWorkflowSlotResponder(resp *http.Response) (result WorkflowEnvelope, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -13004,7 +13284,7 @@ func (client AppsClient) GetMSDeployLogPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -13090,7 +13370,7 @@ func (client AppsClient) GetMSDeployLogSlotPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -13174,7 +13454,7 @@ func (client AppsClient) GetMSDeployStatusPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -13260,7 +13540,7 @@ func (client AppsClient) GetMSDeployStatusSlotPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -13291,6 +13571,178 @@ func (client AppsClient) GetMSDeployStatusSlotResponder(resp *http.Response) (re return } +// GetMigrateMySQLStatus description for Returns the status of MySql in app migration, if one is active, and whether or +// not MySql in app is enabled +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of web app. +func (client AppsClient) GetMigrateMySQLStatus(ctx context.Context, resourceGroupName string, name string) (result MigrateMySQLStatus, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMigrateMySQLStatus") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "GetMigrateMySQLStatus", err.Error()) + } + + req, err := client.GetMigrateMySQLStatusPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", nil, "Failure preparing request") + return + } + + resp, err := client.GetMigrateMySQLStatusSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", resp, "Failure sending request") + return + } + + result, err = client.GetMigrateMySQLStatusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", resp, "Failure responding to request") + return + } + + return +} + +// GetMigrateMySQLStatusPreparer prepares the GetMigrateMySQLStatus request. +func (client AppsClient) GetMigrateMySQLStatusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetMigrateMySQLStatusSender sends the GetMigrateMySQLStatus request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetMigrateMySQLStatusSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetMigrateMySQLStatusResponder handles the response to the GetMigrateMySQLStatus request. The method always +// closes the http.Response Body. +func (client AppsClient) GetMigrateMySQLStatusResponder(resp *http.Response) (result MigrateMySQLStatus, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetMigrateMySQLStatusSlot description for Returns the status of MySql in app migration, if one is active, and +// whether or not MySql in app is enabled +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of web app. +// slot - name of the deployment slot. +func (client AppsClient) GetMigrateMySQLStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MigrateMySQLStatus, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMigrateMySQLStatusSlot") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "GetMigrateMySQLStatusSlot", err.Error()) + } + + req, err := client.GetMigrateMySQLStatusSlotPreparer(ctx, resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", nil, "Failure preparing request") + return + } + + resp, err := client.GetMigrateMySQLStatusSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", resp, "Failure sending request") + return + } + + result, err = client.GetMigrateMySQLStatusSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", resp, "Failure responding to request") + return + } + + return +} + +// GetMigrateMySQLStatusSlotPreparer prepares the GetMigrateMySQLStatusSlot request. +func (client AppsClient) GetMigrateMySQLStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetMigrateMySQLStatusSlotSender sends the GetMigrateMySQLStatusSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetMigrateMySQLStatusSlotSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetMigrateMySQLStatusSlotResponder handles the response to the GetMigrateMySQLStatusSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) GetMigrateMySQLStatusSlotResponder(resp *http.Response) (result MigrateMySQLStatus, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // GetNetworkTraceOperation description for Gets a named operation for a network trace capturing (or deployment slot, // if specified). // Parameters: @@ -13347,7 +13799,7 @@ func (client AppsClient) GetNetworkTraceOperationPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -13437,7 +13889,7 @@ func (client AppsClient) GetNetworkTraceOperationSlotPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -13527,7 +13979,7 @@ func (client AppsClient) GetNetworkTraceOperationSlotV2Preparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -13614,7 +14066,7 @@ func (client AppsClient) GetNetworkTraceOperationV2Preparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -13701,7 +14153,7 @@ func (client AppsClient) GetNetworkTracesPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -13791,7 +14243,7 @@ func (client AppsClient) GetNetworkTracesSlotPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -13881,7 +14333,7 @@ func (client AppsClient) GetNetworkTracesSlotV2Preparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -13968,7 +14420,7 @@ func (client AppsClient) GetNetworkTracesV2Preparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -13999,6 +14451,91 @@ func (client AppsClient) GetNetworkTracesV2Responder(resp *http.Response) (resul return } +// GetOneDeployStatus description for Invoke onedeploy status API /api/deployments and gets the deployment status for +// the site +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of web app. +func (client AppsClient) GetOneDeployStatus(ctx context.Context, resourceGroupName string, name string) (result SetObject, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetOneDeployStatus") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "GetOneDeployStatus", err.Error()) + } + + req, err := client.GetOneDeployStatusPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetOneDeployStatus", nil, "Failure preparing request") + return + } + + resp, err := client.GetOneDeployStatusSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetOneDeployStatus", resp, "Failure sending request") + return + } + + result, err = client.GetOneDeployStatusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetOneDeployStatus", resp, "Failure responding to request") + return + } + + return +} + +// GetOneDeployStatusPreparer prepares the GetOneDeployStatus request. +func (client AppsClient) GetOneDeployStatusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetOneDeployStatusSender sends the GetOneDeployStatus request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetOneDeployStatusSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetOneDeployStatusResponder handles the response to the GetOneDeployStatus request. The method always +// closes the http.Response Body. +func (client AppsClient) GetOneDeployStatusResponder(resp *http.Response) (result SetObject, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // GetPremierAddOn description for Gets a named add-on of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. @@ -14054,7 +14591,7 @@ func (client AppsClient) GetPremierAddOnPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -14143,7 +14680,7 @@ func (client AppsClient) GetPremierAddOnSlotPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -14228,7 +14765,7 @@ func (client AppsClient) GetPrivateAccessPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -14315,7 +14852,7 @@ func (client AppsClient) GetPrivateAccessSlotPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -14401,7 +14938,7 @@ func (client AppsClient) GetPrivateEndpointConnectionPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -14491,7 +15028,7 @@ func (client AppsClient) GetPrivateEndpointConnectionListPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -14620,7 +15157,7 @@ func (client AppsClient) GetPrivateEndpointConnectionListSlotPreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -14745,7 +15282,7 @@ func (client AppsClient) GetPrivateEndpointConnectionSlotPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -14829,7 +15366,7 @@ func (client AppsClient) GetPrivateLinkResourcesPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -14914,7 +15451,7 @@ func (client AppsClient) GetPrivateLinkResourcesSlotPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -15000,7 +15537,7 @@ func (client AppsClient) GetProcessPreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -15087,7 +15624,7 @@ func (client AppsClient) GetProcessDumpPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -15176,7 +15713,7 @@ func (client AppsClient) GetProcessDumpSlotPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -15263,7 +15800,7 @@ func (client AppsClient) GetProcessModulePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -15355,7 +15892,7 @@ func (client AppsClient) GetProcessModuleSlotPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -15444,7 +15981,7 @@ func (client AppsClient) GetProcessSlotPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -15475,6 +16012,95 @@ func (client AppsClient) GetProcessSlotResponder(resp *http.Response) (result Pr return } +// GetProductionSiteDeploymentStatus sends the get production site deployment status request. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +// deploymentStatusID - GUID of the deployment operation. +func (client AppsClient) GetProductionSiteDeploymentStatus(ctx context.Context, resourceGroupName string, name string, deploymentStatusID string) (result AppsGetProductionSiteDeploymentStatusFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProductionSiteDeploymentStatus") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "GetProductionSiteDeploymentStatus", err.Error()) + } + + req, err := client.GetProductionSiteDeploymentStatusPreparer(ctx, resourceGroupName, name, deploymentStatusID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProductionSiteDeploymentStatus", nil, "Failure preparing request") + return + } + + result, err = client.GetProductionSiteDeploymentStatusSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProductionSiteDeploymentStatus", result.Response(), "Failure sending request") + return + } + + return +} + +// GetProductionSiteDeploymentStatusPreparer prepares the GetProductionSiteDeploymentStatus request. +func (client AppsClient) GetProductionSiteDeploymentStatusPreparer(ctx context.Context, resourceGroupName string, name string, deploymentStatusID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "deploymentStatusId": autorest.Encode("path", deploymentStatusID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deploymentStatus/{deploymentStatusId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetProductionSiteDeploymentStatusSender sends the GetProductionSiteDeploymentStatus request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetProductionSiteDeploymentStatusSender(req *http.Request) (future AppsGetProductionSiteDeploymentStatusFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetProductionSiteDeploymentStatusResponder handles the response to the GetProductionSiteDeploymentStatus request. The method always +// closes the http.Response Body. +func (client AppsClient) GetProductionSiteDeploymentStatusResponder(resp *http.Response) (result CsmDeploymentStatus, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // GetPublicCertificate description for Get the named public certificate for an app (or deployment slot, if specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. @@ -15530,7 +16156,7 @@ func (client AppsClient) GetPublicCertificatePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -15620,7 +16246,7 @@ func (client AppsClient) GetPublicCertificateSlotPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -15706,7 +16332,7 @@ func (client AppsClient) GetRelayServiceConnectionPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -15795,7 +16421,7 @@ func (client AppsClient) GetRelayServiceConnectionSlotPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -15879,7 +16505,7 @@ func (client AppsClient) GetScmAllowedPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -15964,7 +16590,7 @@ func (client AppsClient) GetScmAllowedSlotPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -16049,7 +16675,7 @@ func (client AppsClient) GetSiteConnectionStringKeyVaultReferencePreparer(ctx co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -16080,133 +16706,6 @@ func (client AppsClient) GetSiteConnectionStringKeyVaultReferenceResponder(resp return } -// GetSiteConnectionStringKeyVaultReferences description for Gets the config reference app settings and status of an -// app -// Parameters: -// resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -func (client AppsClient) GetSiteConnectionStringKeyVaultReferences(ctx context.Context, resourceGroupName string, name string) (result APIKVReferenceCollectionPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteConnectionStringKeyVaultReferences") - defer func() { - sc := -1 - if result.arc.Response.Response != nil { - sc = result.arc.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "GetSiteConnectionStringKeyVaultReferences", err.Error()) - } - - result.fn = client.getSiteConnectionStringKeyVaultReferencesNextResults - req, err := client.GetSiteConnectionStringKeyVaultReferencesPreparer(ctx, resourceGroupName, name) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteConnectionStringKeyVaultReferences", nil, "Failure preparing request") - return - } - - resp, err := client.GetSiteConnectionStringKeyVaultReferencesSender(req) - if err != nil { - result.arc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteConnectionStringKeyVaultReferences", resp, "Failure sending request") - return - } - - result.arc, err = client.GetSiteConnectionStringKeyVaultReferencesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteConnectionStringKeyVaultReferences", resp, "Failure responding to request") - return - } - if result.arc.hasNextLink() && result.arc.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// GetSiteConnectionStringKeyVaultReferencesPreparer prepares the GetSiteConnectionStringKeyVaultReferences request. -func (client AppsClient) GetSiteConnectionStringKeyVaultReferencesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2021-03-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSiteConnectionStringKeyVaultReferencesSender sends the GetSiteConnectionStringKeyVaultReferences request. The method will close the -// http.Response Body if it receives an error. -func (client AppsClient) GetSiteConnectionStringKeyVaultReferencesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetSiteConnectionStringKeyVaultReferencesResponder handles the response to the GetSiteConnectionStringKeyVaultReferences request. The method always -// closes the http.Response Body. -func (client AppsClient) GetSiteConnectionStringKeyVaultReferencesResponder(resp *http.Response) (result APIKVReferenceCollection, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// getSiteConnectionStringKeyVaultReferencesNextResults retrieves the next set of results, if any. -func (client AppsClient) getSiteConnectionStringKeyVaultReferencesNextResults(ctx context.Context, lastResults APIKVReferenceCollection) (result APIKVReferenceCollection, err error) { - req, err := lastResults.aPIKVReferenceCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "getSiteConnectionStringKeyVaultReferencesNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.GetSiteConnectionStringKeyVaultReferencesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "getSiteConnectionStringKeyVaultReferencesNextResults", resp, "Failure sending next results request") - } - result, err = client.GetSiteConnectionStringKeyVaultReferencesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "getSiteConnectionStringKeyVaultReferencesNextResults", resp, "Failure responding to next results request") - } - return -} - -// GetSiteConnectionStringKeyVaultReferencesComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) GetSiteConnectionStringKeyVaultReferencesComplete(ctx context.Context, resourceGroupName string, name string) (result APIKVReferenceCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteConnectionStringKeyVaultReferences") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.GetSiteConnectionStringKeyVaultReferences(ctx, resourceGroupName, name) - return -} - // GetSiteConnectionStringKeyVaultReferenceSlot description for Gets the config reference and status of an app // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. @@ -16262,7 +16761,7 @@ func (client AppsClient) GetSiteConnectionStringKeyVaultReferenceSlotPreparer(ct "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -16293,6 +16792,133 @@ func (client AppsClient) GetSiteConnectionStringKeyVaultReferenceSlotResponder(r return } +// GetSiteConnectionStringKeyVaultReferences description for Gets the config reference app settings and status of an +// app +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +func (client AppsClient) GetSiteConnectionStringKeyVaultReferences(ctx context.Context, resourceGroupName string, name string) (result APIKVReferenceCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteConnectionStringKeyVaultReferences") + defer func() { + sc := -1 + if result.arc.Response.Response != nil { + sc = result.arc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "GetSiteConnectionStringKeyVaultReferences", err.Error()) + } + + result.fn = client.getSiteConnectionStringKeyVaultReferencesNextResults + req, err := client.GetSiteConnectionStringKeyVaultReferencesPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteConnectionStringKeyVaultReferences", nil, "Failure preparing request") + return + } + + resp, err := client.GetSiteConnectionStringKeyVaultReferencesSender(req) + if err != nil { + result.arc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteConnectionStringKeyVaultReferences", resp, "Failure sending request") + return + } + + result.arc, err = client.GetSiteConnectionStringKeyVaultReferencesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteConnectionStringKeyVaultReferences", resp, "Failure responding to request") + return + } + if result.arc.hasNextLink() && result.arc.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// GetSiteConnectionStringKeyVaultReferencesPreparer prepares the GetSiteConnectionStringKeyVaultReferences request. +func (client AppsClient) GetSiteConnectionStringKeyVaultReferencesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSiteConnectionStringKeyVaultReferencesSender sends the GetSiteConnectionStringKeyVaultReferences request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetSiteConnectionStringKeyVaultReferencesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetSiteConnectionStringKeyVaultReferencesResponder handles the response to the GetSiteConnectionStringKeyVaultReferences request. The method always +// closes the http.Response Body. +func (client AppsClient) GetSiteConnectionStringKeyVaultReferencesResponder(resp *http.Response) (result APIKVReferenceCollection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// getSiteConnectionStringKeyVaultReferencesNextResults retrieves the next set of results, if any. +func (client AppsClient) getSiteConnectionStringKeyVaultReferencesNextResults(ctx context.Context, lastResults APIKVReferenceCollection) (result APIKVReferenceCollection, err error) { + req, err := lastResults.aPIKVReferenceCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "getSiteConnectionStringKeyVaultReferencesNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.GetSiteConnectionStringKeyVaultReferencesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "getSiteConnectionStringKeyVaultReferencesNextResults", resp, "Failure sending next results request") + } + result, err = client.GetSiteConnectionStringKeyVaultReferencesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "getSiteConnectionStringKeyVaultReferencesNextResults", resp, "Failure responding to next results request") + } + return +} + +// GetSiteConnectionStringKeyVaultReferencesComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) GetSiteConnectionStringKeyVaultReferencesComplete(ctx context.Context, resourceGroupName string, name string) (result APIKVReferenceCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteConnectionStringKeyVaultReferences") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.GetSiteConnectionStringKeyVaultReferences(ctx, resourceGroupName, name) + return +} + // GetSiteConnectionStringKeyVaultReferencesSlot description for Gets the config reference app settings and status of // an app // Parameters: @@ -16353,7 +16979,7 @@ func (client AppsClient) GetSiteConnectionStringKeyVaultReferencesSlotPreparer(c "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -16476,7 +17102,7 @@ func (client AppsClient) GetSiteExtensionPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -16564,7 +17190,7 @@ func (client AppsClient) GetSiteExtensionSlotPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -16648,7 +17274,7 @@ func (client AppsClient) GetSitePhpErrorLogFlagPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -16734,7 +17360,7 @@ func (client AppsClient) GetSitePhpErrorLogFlagSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -16820,7 +17446,7 @@ func (client AppsClient) GetSlotPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -16851,6 +17477,98 @@ func (client AppsClient) GetSlotResponder(resp *http.Response) (result Site, err return } +// GetSlotSiteDeploymentStatusSlot sends the get slot site deployment status slot request. +// Parameters: +// 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. +func (client AppsClient) GetSlotSiteDeploymentStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, deploymentStatusID string) (result AppsGetSlotSiteDeploymentStatusSlotFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSlotSiteDeploymentStatusSlot") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "GetSlotSiteDeploymentStatusSlot", err.Error()) + } + + req, err := client.GetSlotSiteDeploymentStatusSlotPreparer(ctx, resourceGroupName, name, slot, deploymentStatusID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlotSiteDeploymentStatusSlot", nil, "Failure preparing request") + return + } + + result, err = client.GetSlotSiteDeploymentStatusSlotSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlotSiteDeploymentStatusSlot", result.Response(), "Failure sending request") + return + } + + return +} + +// GetSlotSiteDeploymentStatusSlotPreparer prepares the GetSlotSiteDeploymentStatusSlot request. +func (client AppsClient) GetSlotSiteDeploymentStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, deploymentStatusID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "deploymentStatusId": autorest.Encode("path", deploymentStatusID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deploymentStatus/{deploymentStatusId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSlotSiteDeploymentStatusSlotSender sends the GetSlotSiteDeploymentStatusSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetSlotSiteDeploymentStatusSlotSender(req *http.Request) (future AppsGetSlotSiteDeploymentStatusSlotFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GetSlotSiteDeploymentStatusSlotResponder handles the response to the GetSlotSiteDeploymentStatusSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) GetSlotSiteDeploymentStatusSlotResponder(resp *http.Response) (result CsmDeploymentStatus, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // GetSourceControl description for Gets the source control configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. @@ -16904,7 +17622,7 @@ func (client AppsClient) GetSourceControlPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -16991,7 +17709,7 @@ func (client AppsClient) GetSourceControlSlotPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -17075,7 +17793,7 @@ func (client AppsClient) GetSwiftVirtualNetworkConnectionPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -17162,7 +17880,7 @@ func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotPreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -17248,7 +17966,7 @@ func (client AppsClient) GetTriggeredWebJobPreparer(ctx context.Context, resourc "webJobName": autorest.Encode("path", webJobName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -17337,7 +18055,7 @@ func (client AppsClient) GetTriggeredWebJobHistoryPreparer(ctx context.Context, "webJobName": autorest.Encode("path", webJobName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -17428,7 +18146,7 @@ func (client AppsClient) GetTriggeredWebJobHistorySlotPreparer(ctx context.Conte "webJobName": autorest.Encode("path", webJobName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -17516,7 +18234,7 @@ func (client AppsClient) GetTriggeredWebJobSlotPreparer(ctx context.Context, res "webJobName": autorest.Encode("path", webJobName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -17602,7 +18320,7 @@ func (client AppsClient) GetVnetConnectionPreparer(ctx context.Context, resource "vnetName": autorest.Encode("path", vnetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -17690,7 +18408,7 @@ func (client AppsClient) GetVnetConnectionGatewayPreparer(ctx context.Context, r "vnetName": autorest.Encode("path", vnetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -17781,7 +18499,7 @@ func (client AppsClient) GetVnetConnectionGatewaySlotPreparer(ctx context.Contex "vnetName": autorest.Encode("path", vnetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -17870,7 +18588,7 @@ func (client AppsClient) GetVnetConnectionSlotPreparer(ctx context.Context, reso "vnetName": autorest.Encode("path", vnetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -17956,7 +18674,7 @@ func (client AppsClient) GetWebJobPreparer(ctx context.Context, resourceGroupNam "webJobName": autorest.Encode("path", webJobName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -18045,7 +18763,7 @@ func (client AppsClient) GetWebJobSlotPreparer(ctx context.Context, resourceGrou "webJobName": autorest.Encode("path", webJobName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -18129,7 +18847,7 @@ func (client AppsClient) GetWebSiteContainerLogsPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -18214,7 +18932,7 @@ func (client AppsClient) GetWebSiteContainerLogsSlotPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -18244,6 +18962,96 @@ func (client AppsClient) GetWebSiteContainerLogsSlotResponder(resp *http.Respons return } +// GetWorkflow sends the get workflow request. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// workflowName - workflow name. +func (client AppsClient) GetWorkflow(ctx context.Context, resourceGroupName string, name string, workflowName string) (result WorkflowEnvelope, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWorkflow") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: workflowName, + Constraints: []validation.Constraint{{Target: "workflowName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "workflowName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "workflowName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "GetWorkflow", err.Error()) + } + + req, err := client.GetWorkflowPreparer(ctx, resourceGroupName, name, workflowName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWorkflow", nil, "Failure preparing request") + return + } + + resp, err := client.GetWorkflowSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWorkflow", resp, "Failure sending request") + return + } + + result, err = client.GetWorkflowResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWorkflow", resp, "Failure responding to request") + return + } + + return +} + +// GetWorkflowPreparer prepares the GetWorkflow request. +func (client AppsClient) GetWorkflowPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetWorkflowSender sends the GetWorkflow request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetWorkflowSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetWorkflowResponder handles the response to the GetWorkflow request. The method always +// closes the http.Response Body. +func (client AppsClient) GetWorkflowResponder(resp *http.Response) (result WorkflowEnvelope, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // InstallSiteExtension description for Install site extension on a web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. @@ -18292,7 +19100,7 @@ func (client AppsClient) InstallSiteExtensionPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -18383,7 +19191,7 @@ func (client AppsClient) InstallSiteExtensionSlotPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -18477,7 +19285,7 @@ func (client AppsClient) IsCloneablePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -18563,7 +19371,7 @@ func (client AppsClient) IsCloneableSlotPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -18639,7 +19447,7 @@ func (client AppsClient) ListPreparer(ctx context.Context) (*http.Request, error "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -18760,7 +19568,7 @@ func (client AppsClient) ListApplicationSettingsPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -18847,7 +19655,7 @@ func (client AppsClient) ListApplicationSettingsSlotPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -18931,7 +19739,7 @@ func (client AppsClient) ListAzureStorageAccountsPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -19018,7 +19826,7 @@ func (client AppsClient) ListAzureStorageAccountsSlotPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -19049,6 +19857,208 @@ func (client AppsClient) ListAzureStorageAccountsSlotResponder(resp *http.Respon return } +// 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. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of web app. +// backupID - ID of backup. +// request - information on backup request. +func (client AppsClient) ListBackupStatusSecrets(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest) (result BackupItem, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupStatusSecrets") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: request, + Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListBackupStatusSecrets", err.Error()) + } + + req, err := client.ListBackupStatusSecretsPreparer(ctx, resourceGroupName, name, backupID, request) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", nil, "Failure preparing request") + return + } + + resp, err := client.ListBackupStatusSecretsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", resp, "Failure sending request") + return + } + + result, err = client.ListBackupStatusSecretsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", resp, "Failure responding to request") + return + } + + return +} + +// ListBackupStatusSecretsPreparer prepares the ListBackupStatusSecrets request. +func (client AppsClient) ListBackupStatusSecretsPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupId": autorest.Encode("path", backupID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list", pathParameters), + autorest.WithJSON(request), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBackupStatusSecretsSender sends the ListBackupStatusSecrets request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListBackupStatusSecretsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListBackupStatusSecretsResponder handles the response to the ListBackupStatusSecrets request. The method always +// closes the http.Response Body. +func (client AppsClient) ListBackupStatusSecretsResponder(resp *http.Response) (result BackupItem, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// 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. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of web app. +// backupID - ID of backup. +// request - information on backup request. +// slot - name of web app slot. If not specified then will default to production slot. +func (client AppsClient) ListBackupStatusSecretsSlot(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, slot string) (result BackupItem, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupStatusSecretsSlot") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: request, + Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListBackupStatusSecretsSlot", err.Error()) + } + + req, err := client.ListBackupStatusSecretsSlotPreparer(ctx, resourceGroupName, name, backupID, request, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListBackupStatusSecretsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", resp, "Failure sending request") + return + } + + result, err = client.ListBackupStatusSecretsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", resp, "Failure responding to request") + return + } + + return +} + +// ListBackupStatusSecretsSlotPreparer prepares the ListBackupStatusSecretsSlot request. +func (client AppsClient) ListBackupStatusSecretsSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupId": autorest.Encode("path", backupID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list", pathParameters), + autorest.WithJSON(request), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBackupStatusSecretsSlotSender sends the ListBackupStatusSecretsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListBackupStatusSecretsSlotSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListBackupStatusSecretsSlotResponder handles the response to the ListBackupStatusSecretsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListBackupStatusSecretsSlotResponder(resp *http.Response) (result BackupItem, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // ListBackups description for Gets existing backups of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. @@ -19107,7 +20117,7 @@ func (client AppsClient) ListBackupsPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -19236,7 +20246,7 @@ func (client AppsClient) ListBackupsSlotPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -19304,208 +20314,6 @@ func (client AppsClient) ListBackupsSlotComplete(ctx context.Context, resourceGr return } -// 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. -// Parameters: -// resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// backupID - ID of backup. -// request - information on backup request. -func (client AppsClient) ListBackupStatusSecrets(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest) (result BackupItem, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupStatusSecrets") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, - {TargetValue: request, - Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "ListBackupStatusSecrets", err.Error()) - } - - req, err := client.ListBackupStatusSecretsPreparer(ctx, resourceGroupName, name, backupID, request) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", nil, "Failure preparing request") - return - } - - resp, err := client.ListBackupStatusSecretsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", resp, "Failure sending request") - return - } - - result, err = client.ListBackupStatusSecretsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", resp, "Failure responding to request") - return - } - - return -} - -// ListBackupStatusSecretsPreparer prepares the ListBackupStatusSecrets request. -func (client AppsClient) ListBackupStatusSecretsPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "backupId": autorest.Encode("path", backupID), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2021-03-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list", pathParameters), - autorest.WithJSON(request), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListBackupStatusSecretsSender sends the ListBackupStatusSecrets request. The method will close the -// http.Response Body if it receives an error. -func (client AppsClient) ListBackupStatusSecretsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListBackupStatusSecretsResponder handles the response to the ListBackupStatusSecrets request. The method always -// closes the http.Response Body. -func (client AppsClient) ListBackupStatusSecretsResponder(resp *http.Response) (result BackupItem, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// 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. -// Parameters: -// resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// backupID - ID of backup. -// request - information on backup request. -// slot - name of web app slot. If not specified then will default to production slot. -func (client AppsClient) ListBackupStatusSecretsSlot(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, slot string) (result BackupItem, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupStatusSecretsSlot") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, - {TargetValue: request, - Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "ListBackupStatusSecretsSlot", err.Error()) - } - - req, err := client.ListBackupStatusSecretsSlotPreparer(ctx, resourceGroupName, name, backupID, request, slot) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", nil, "Failure preparing request") - return - } - - resp, err := client.ListBackupStatusSecretsSlotSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", resp, "Failure sending request") - return - } - - result, err = client.ListBackupStatusSecretsSlotResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", resp, "Failure responding to request") - return - } - - return -} - -// ListBackupStatusSecretsSlotPreparer prepares the ListBackupStatusSecretsSlot request. -func (client AppsClient) ListBackupStatusSecretsSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, slot string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "backupId": autorest.Encode("path", backupID), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2021-03-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list", pathParameters), - autorest.WithJSON(request), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListBackupStatusSecretsSlotSender sends the ListBackupStatusSecretsSlot request. The method will close the -// http.Response Body if it receives an error. -func (client AppsClient) ListBackupStatusSecretsSlotSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListBackupStatusSecretsSlotResponder handles the response to the ListBackupStatusSecretsSlot request. The method always -// closes the http.Response Body. -func (client AppsClient) ListBackupStatusSecretsSlotResponder(resp *http.Response) (result BackupItem, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - // ListBasicPublishingCredentialsPolicies description for Returns whether Scm basic auth is allowed and whether Ftp is // allowed for a given site. // Parameters: @@ -19565,7 +20373,7 @@ func (client AppsClient) ListBasicPublishingCredentialsPoliciesPreparer(ctx cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -19693,7 +20501,7 @@ func (client AppsClient) ListBasicPublishingCredentialsPoliciesSlotPreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -19819,7 +20627,7 @@ func (client AppsClient) ListByResourceGroupPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -19890,17 +20698,18 @@ func (client AppsClient) ListByResourceGroupComplete(ctx context.Context, resour return } -// ListConfigurations description for List the configurations of an app +// ListConfigurationSnapshotInfo 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. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) ListConfigurations(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResourceCollectionPage, err error) { +func (client AppsClient) ListConfigurationSnapshotInfo(ctx context.Context, resourceGroupName string, name string) (result SiteConfigurationSnapshotInfoCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurations") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfo") defer func() { sc := -1 - if result.scrc.Response.Response != nil { - sc = result.scrc.Response.Response.StatusCode + if result.scsic.Response.Response != nil { + sc = result.scsic.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -19910,29 +20719,29 @@ func (client AppsClient) ListConfigurations(ctx context.Context, resourceGroupNa Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "ListConfigurations", err.Error()) + return result, validation.NewError("web.AppsClient", "ListConfigurationSnapshotInfo", err.Error()) } - result.fn = client.listConfigurationsNextResults - req, err := client.ListConfigurationsPreparer(ctx, resourceGroupName, name) + result.fn = client.listConfigurationSnapshotInfoNextResults + req, err := client.ListConfigurationSnapshotInfoPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", nil, "Failure preparing request") return } - resp, err := client.ListConfigurationsSender(req) + resp, err := client.ListConfigurationSnapshotInfoSender(req) if err != nil { - result.scrc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", resp, "Failure sending request") + result.scsic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", resp, "Failure sending request") return } - result.scrc, err = client.ListConfigurationsResponder(resp) + result.scsic, err = client.ListConfigurationSnapshotInfoResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", resp, "Failure responding to request") return } - if result.scrc.hasNextLink() && result.scrc.IsEmpty() { + if result.scsic.hasNextLink() && result.scsic.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -19940,15 +20749,15 @@ func (client AppsClient) ListConfigurations(ctx context.Context, resourceGroupNa return } -// ListConfigurationsPreparer prepares the ListConfigurations request. -func (client AppsClient) ListConfigurationsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// ListConfigurationSnapshotInfoPreparer prepares the ListConfigurationSnapshotInfo request. +func (client AppsClient) ListConfigurationSnapshotInfoPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -19956,20 +20765,20 @@ func (client AppsClient) ListConfigurationsPreparer(ctx context.Context, resourc preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListConfigurationsSender sends the ListConfigurations request. The method will close the +// ListConfigurationSnapshotInfoSender sends the ListConfigurationSnapshotInfo request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListConfigurationsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListConfigurationSnapshotInfoSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListConfigurationsResponder handles the response to the ListConfigurations request. The method always +// ListConfigurationSnapshotInfoResponder handles the response to the ListConfigurationSnapshotInfo request. The method always // closes the http.Response Body. -func (client AppsClient) ListConfigurationsResponder(resp *http.Response) (result SiteConfigResourceCollection, err error) { +func (client AppsClient) ListConfigurationSnapshotInfoResponder(resp *http.Response) (result SiteConfigurationSnapshotInfoCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -19979,31 +20788,31 @@ func (client AppsClient) ListConfigurationsResponder(resp *http.Response) (resul return } -// listConfigurationsNextResults retrieves the next set of results, if any. -func (client AppsClient) listConfigurationsNextResults(ctx context.Context, lastResults SiteConfigResourceCollection) (result SiteConfigResourceCollection, err error) { - req, err := lastResults.siteConfigResourceCollectionPreparer(ctx) +// listConfigurationSnapshotInfoNextResults retrieves the next set of results, if any. +func (client AppsClient) listConfigurationSnapshotInfoNextResults(ctx context.Context, lastResults SiteConfigurationSnapshotInfoCollection) (result SiteConfigurationSnapshotInfoCollection, err error) { + req, err := lastResults.siteConfigurationSnapshotInfoCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListConfigurationsSender(req) + resp, err := client.ListConfigurationSnapshotInfoSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", resp, "Failure sending next results request") } - result, err = client.ListConfigurationsResponder(resp) + result, err = client.ListConfigurationSnapshotInfoResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", resp, "Failure responding to next results request") } return } -// ListConfigurationsComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListConfigurationsComplete(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResourceCollectionIterator, err error) { +// ListConfigurationSnapshotInfoComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListConfigurationSnapshotInfoComplete(ctx context.Context, resourceGroupName string, name string) (result SiteConfigurationSnapshotInfoCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurations") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfo") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -20012,18 +20821,20 @@ func (client AppsClient) ListConfigurationsComplete(ctx context.Context, resourc tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListConfigurations(ctx, resourceGroupName, name) + result.page, err = client.ListConfigurationSnapshotInfo(ctx, resourceGroupName, name) return } -// ListConfigurationSnapshotInfo description for Gets a list of web app configuration snapshots identifiers. Each +// ListConfigurationSnapshotInfoSlot 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. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) ListConfigurationSnapshotInfo(ctx context.Context, resourceGroupName string, name string) (result SiteConfigurationSnapshotInfoCollectionPage, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the +// production slot. +func (client AppsClient) ListConfigurationSnapshotInfoSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigurationSnapshotInfoCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfo") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfoSlot") defer func() { sc := -1 if result.scsic.Response.Response != nil { @@ -20037,26 +20848,26 @@ func (client AppsClient) ListConfigurationSnapshotInfo(ctx context.Context, reso Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "ListConfigurationSnapshotInfo", err.Error()) + return result, validation.NewError("web.AppsClient", "ListConfigurationSnapshotInfoSlot", err.Error()) } - result.fn = client.listConfigurationSnapshotInfoNextResults - req, err := client.ListConfigurationSnapshotInfoPreparer(ctx, resourceGroupName, name) + result.fn = client.listConfigurationSnapshotInfoSlotNextResults + req, err := client.ListConfigurationSnapshotInfoSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", nil, "Failure preparing request") return } - resp, err := client.ListConfigurationSnapshotInfoSender(req) + resp, err := client.ListConfigurationSnapshotInfoSlotSender(req) if err != nil { result.scsic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", resp, "Failure sending request") return } - result.scsic, err = client.ListConfigurationSnapshotInfoResponder(resp) + result.scsic, err = client.ListConfigurationSnapshotInfoSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", resp, "Failure responding to request") return } if result.scsic.hasNextLink() && result.scsic.IsEmpty() { @@ -20067,15 +20878,16 @@ func (client AppsClient) ListConfigurationSnapshotInfo(ctx context.Context, reso return } -// ListConfigurationSnapshotInfoPreparer prepares the ListConfigurationSnapshotInfo request. -func (client AppsClient) ListConfigurationSnapshotInfoPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// ListConfigurationSnapshotInfoSlotPreparer prepares the ListConfigurationSnapshotInfoSlot request. +func (client AppsClient) ListConfigurationSnapshotInfoSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -20083,20 +20895,20 @@ func (client AppsClient) ListConfigurationSnapshotInfoPreparer(ctx context.Conte preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListConfigurationSnapshotInfoSender sends the ListConfigurationSnapshotInfo request. The method will close the +// ListConfigurationSnapshotInfoSlotSender sends the ListConfigurationSnapshotInfoSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListConfigurationSnapshotInfoSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListConfigurationSnapshotInfoSlotSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListConfigurationSnapshotInfoResponder handles the response to the ListConfigurationSnapshotInfo request. The method always +// ListConfigurationSnapshotInfoSlotResponder handles the response to the ListConfigurationSnapshotInfoSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListConfigurationSnapshotInfoResponder(resp *http.Response) (result SiteConfigurationSnapshotInfoCollection, err error) { +func (client AppsClient) ListConfigurationSnapshotInfoSlotResponder(resp *http.Response) (result SiteConfigurationSnapshotInfoCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -20106,31 +20918,31 @@ func (client AppsClient) ListConfigurationSnapshotInfoResponder(resp *http.Respo return } -// listConfigurationSnapshotInfoNextResults retrieves the next set of results, if any. -func (client AppsClient) listConfigurationSnapshotInfoNextResults(ctx context.Context, lastResults SiteConfigurationSnapshotInfoCollection) (result SiteConfigurationSnapshotInfoCollection, err error) { +// listConfigurationSnapshotInfoSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) listConfigurationSnapshotInfoSlotNextResults(ctx context.Context, lastResults SiteConfigurationSnapshotInfoCollection) (result SiteConfigurationSnapshotInfoCollection, err error) { req, err := lastResults.siteConfigurationSnapshotInfoCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListConfigurationSnapshotInfoSender(req) + resp, err := client.ListConfigurationSnapshotInfoSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", resp, "Failure sending next results request") } - result, err = client.ListConfigurationSnapshotInfoResponder(resp) + result, err = client.ListConfigurationSnapshotInfoSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", resp, "Failure responding to next results request") } return } -// ListConfigurationSnapshotInfoComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListConfigurationSnapshotInfoComplete(ctx context.Context, resourceGroupName string, name string) (result SiteConfigurationSnapshotInfoCollectionIterator, err error) { +// ListConfigurationSnapshotInfoSlotComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListConfigurationSnapshotInfoSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigurationSnapshotInfoCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfo") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfoSlot") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -20139,24 +20951,21 @@ func (client AppsClient) ListConfigurationSnapshotInfoComplete(ctx context.Conte tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListConfigurationSnapshotInfo(ctx, resourceGroupName, name) + result.page, err = client.ListConfigurationSnapshotInfoSlot(ctx, resourceGroupName, name, slot) return } -// ListConfigurationSnapshotInfoSlot 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. +// ListConfigurations description for List the configurations of an app // Parameters: // 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. -func (client AppsClient) ListConfigurationSnapshotInfoSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigurationSnapshotInfoCollectionPage, err error) { +func (client AppsClient) ListConfigurations(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResourceCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfoSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurations") defer func() { sc := -1 - if result.scsic.Response.Response != nil { - sc = result.scsic.Response.Response.StatusCode + if result.scrc.Response.Response != nil { + sc = result.scrc.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -20166,29 +20975,29 @@ func (client AppsClient) ListConfigurationSnapshotInfoSlot(ctx context.Context, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "ListConfigurationSnapshotInfoSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListConfigurations", err.Error()) } - result.fn = client.listConfigurationSnapshotInfoSlotNextResults - req, err := client.ListConfigurationSnapshotInfoSlotPreparer(ctx, resourceGroupName, name, slot) + result.fn = client.listConfigurationsNextResults + req, err := client.ListConfigurationsPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", nil, "Failure preparing request") return } - resp, err := client.ListConfigurationSnapshotInfoSlotSender(req) + resp, err := client.ListConfigurationsSender(req) if err != nil { - result.scsic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", resp, "Failure sending request") + result.scrc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", resp, "Failure sending request") return } - result.scsic, err = client.ListConfigurationSnapshotInfoSlotResponder(resp) + result.scrc, err = client.ListConfigurationsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", resp, "Failure responding to request") return } - if result.scsic.hasNextLink() && result.scsic.IsEmpty() { + if result.scrc.hasNextLink() && result.scrc.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -20196,16 +21005,15 @@ func (client AppsClient) ListConfigurationSnapshotInfoSlot(ctx context.Context, return } -// ListConfigurationSnapshotInfoSlotPreparer prepares the ListConfigurationSnapshotInfoSlot request. -func (client AppsClient) ListConfigurationSnapshotInfoSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// ListConfigurationsPreparer prepares the ListConfigurations request. +func (client AppsClient) ListConfigurationsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -20213,20 +21021,20 @@ func (client AppsClient) ListConfigurationSnapshotInfoSlotPreparer(ctx context.C preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListConfigurationSnapshotInfoSlotSender sends the ListConfigurationSnapshotInfoSlot request. The method will close the +// ListConfigurationsSender sends the ListConfigurations request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListConfigurationSnapshotInfoSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListConfigurationsSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListConfigurationSnapshotInfoSlotResponder handles the response to the ListConfigurationSnapshotInfoSlot request. The method always +// ListConfigurationsResponder handles the response to the ListConfigurations request. The method always // closes the http.Response Body. -func (client AppsClient) ListConfigurationSnapshotInfoSlotResponder(resp *http.Response) (result SiteConfigurationSnapshotInfoCollection, err error) { +func (client AppsClient) ListConfigurationsResponder(resp *http.Response) (result SiteConfigResourceCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -20236,31 +21044,31 @@ func (client AppsClient) ListConfigurationSnapshotInfoSlotResponder(resp *http.R return } -// listConfigurationSnapshotInfoSlotNextResults retrieves the next set of results, if any. -func (client AppsClient) listConfigurationSnapshotInfoSlotNextResults(ctx context.Context, lastResults SiteConfigurationSnapshotInfoCollection) (result SiteConfigurationSnapshotInfoCollection, err error) { - req, err := lastResults.siteConfigurationSnapshotInfoCollectionPreparer(ctx) +// listConfigurationsNextResults retrieves the next set of results, if any. +func (client AppsClient) listConfigurationsNextResults(ctx context.Context, lastResults SiteConfigResourceCollection) (result SiteConfigResourceCollection, err error) { + req, err := lastResults.siteConfigResourceCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListConfigurationSnapshotInfoSlotSender(req) + resp, err := client.ListConfigurationsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", resp, "Failure sending next results request") } - result, err = client.ListConfigurationSnapshotInfoSlotResponder(resp) + result, err = client.ListConfigurationsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", resp, "Failure responding to next results request") } return } -// ListConfigurationSnapshotInfoSlotComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListConfigurationSnapshotInfoSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigurationSnapshotInfoCollectionIterator, err error) { +// ListConfigurationsComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListConfigurationsComplete(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResourceCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfoSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurations") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -20269,7 +21077,7 @@ func (client AppsClient) ListConfigurationSnapshotInfoSlotComplete(ctx context.C tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListConfigurationSnapshotInfoSlot(ctx, resourceGroupName, name, slot) + result.page, err = client.ListConfigurations(ctx, resourceGroupName, name) return } @@ -20334,7 +21142,7 @@ func (client AppsClient) ListConfigurationsSlotPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -20455,7 +21263,7 @@ func (client AppsClient) ListConnectionStringsPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -20542,7 +21350,7 @@ func (client AppsClient) ListConnectionStringsSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -20631,7 +21439,7 @@ func (client AppsClient) ListContinuousWebJobsPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -20760,7 +21568,7 @@ func (client AppsClient) ListContinuousWebJobsSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -20884,7 +21692,7 @@ func (client AppsClient) ListDeploymentLogPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -20974,7 +21782,7 @@ func (client AppsClient) ListDeploymentLogSlotPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -21063,7 +21871,7 @@ func (client AppsClient) ListDeploymentsPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -21192,7 +22000,7 @@ func (client AppsClient) ListDeploymentsSlotPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -21318,7 +22126,7 @@ func (client AppsClient) ListDomainOwnershipIdentifiersPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -21447,7 +22255,7 @@ func (client AppsClient) ListDomainOwnershipIdentifiersSlotPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -21570,7 +22378,7 @@ func (client AppsClient) ListFunctionKeysPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -21658,7 +22466,7 @@ func (client AppsClient) ListFunctionKeysSlotPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -21689,132 +22497,6 @@ func (client AppsClient) ListFunctionKeysSlotResponder(resp *http.Response) (res return } -// ListFunctions description for List the functions for a web site, or a deployment slot. -// Parameters: -// resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -func (client AppsClient) ListFunctions(ctx context.Context, resourceGroupName string, name string) (result FunctionEnvelopeCollectionPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctions") - defer func() { - sc := -1 - if result.fec.Response.Response != nil { - sc = result.fec.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "ListFunctions", err.Error()) - } - - result.fn = client.listFunctionsNextResults - req, err := client.ListFunctionsPreparer(ctx, resourceGroupName, name) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", nil, "Failure preparing request") - return - } - - resp, err := client.ListFunctionsSender(req) - if err != nil { - result.fec.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", resp, "Failure sending request") - return - } - - result.fec, err = client.ListFunctionsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", resp, "Failure responding to request") - return - } - if result.fec.hasNextLink() && result.fec.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListFunctionsPreparer prepares the ListFunctions request. -func (client AppsClient) ListFunctionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2021-03-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListFunctionsSender sends the ListFunctions request. The method will close the -// http.Response Body if it receives an error. -func (client AppsClient) ListFunctionsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListFunctionsResponder handles the response to the ListFunctions request. The method always -// closes the http.Response Body. -func (client AppsClient) ListFunctionsResponder(resp *http.Response) (result FunctionEnvelopeCollection, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listFunctionsNextResults retrieves the next set of results, if any. -func (client AppsClient) listFunctionsNextResults(ctx context.Context, lastResults FunctionEnvelopeCollection) (result FunctionEnvelopeCollection, err error) { - req, err := lastResults.functionEnvelopeCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListFunctionsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", resp, "Failure sending next results request") - } - result, err = client.ListFunctionsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListFunctionsComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListFunctionsComplete(ctx context.Context, resourceGroupName string, name string) (result FunctionEnvelopeCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctions") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListFunctions(ctx, resourceGroupName, name) - return -} - // ListFunctionSecrets description for Get function secrets for a function in a web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. @@ -21870,7 +22552,7 @@ func (client AppsClient) ListFunctionSecretsPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -21958,7 +22640,7 @@ func (client AppsClient) ListFunctionSecretsSlotPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -21989,6 +22671,132 @@ func (client AppsClient) ListFunctionSecretsSlotResponder(resp *http.Response) ( return } +// ListFunctions description for List the functions for a web site, or a deployment slot. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +func (client AppsClient) ListFunctions(ctx context.Context, resourceGroupName string, name string) (result FunctionEnvelopeCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctions") + defer func() { + sc := -1 + if result.fec.Response.Response != nil { + sc = result.fec.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListFunctions", err.Error()) + } + + result.fn = client.listFunctionsNextResults + req, err := client.ListFunctionsPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", nil, "Failure preparing request") + return + } + + resp, err := client.ListFunctionsSender(req) + if err != nil { + result.fec.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", resp, "Failure sending request") + return + } + + result.fec, err = client.ListFunctionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", resp, "Failure responding to request") + return + } + if result.fec.hasNextLink() && result.fec.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListFunctionsPreparer prepares the ListFunctions request. +func (client AppsClient) ListFunctionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListFunctionsSender sends the ListFunctions request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListFunctionsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListFunctionsResponder handles the response to the ListFunctions request. The method always +// closes the http.Response Body. +func (client AppsClient) ListFunctionsResponder(resp *http.Response) (result FunctionEnvelopeCollection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listFunctionsNextResults retrieves the next set of results, if any. +func (client AppsClient) listFunctionsNextResults(ctx context.Context, lastResults FunctionEnvelopeCollection) (result FunctionEnvelopeCollection, err error) { + req, err := lastResults.functionEnvelopeCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListFunctionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListFunctionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListFunctionsComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListFunctionsComplete(ctx context.Context, resourceGroupName string, name string) (result FunctionEnvelopeCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctions") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListFunctions(ctx, resourceGroupName, name) + return +} + // ListHostKeys description for Get host secrets for a function app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. @@ -22042,7 +22850,7 @@ func (client AppsClient) ListHostKeysPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -22128,7 +22936,7 @@ func (client AppsClient) ListHostKeysSlotPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -22217,7 +23025,7 @@ func (client AppsClient) ListHostNameBindingsPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -22346,7 +23154,7 @@ func (client AppsClient) ListHostNameBindingsSlotPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -22467,7 +23275,7 @@ func (client AppsClient) ListHybridConnectionsPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -22553,7 +23361,7 @@ func (client AppsClient) ListHybridConnectionsSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -22644,7 +23452,7 @@ func (client AppsClient) ListInstanceFunctionsSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -22770,7 +23578,7 @@ func (client AppsClient) ListInstanceIdentifiersPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -22898,7 +23706,7 @@ func (client AppsClient) ListInstanceIdentifiersSlotPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -22966,269 +23774,6 @@ func (client AppsClient) ListInstanceIdentifiersSlotComplete(ctx context.Context return } -// ListInstanceProcesses 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. -// Parameters: -// 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 api/sites/{siteName}/instances". -func (client AppsClient) ListInstanceProcesses(ctx context.Context, resourceGroupName string, name string, instanceID string) (result ProcessInfoCollectionPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcesses") - defer func() { - sc := -1 - if result.pic.Response.Response != nil { - sc = result.pic.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "ListInstanceProcesses", err.Error()) - } - - result.fn = client.listInstanceProcessesNextResults - req, err := client.ListInstanceProcessesPreparer(ctx, resourceGroupName, name, instanceID) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcesses", nil, "Failure preparing request") - return - } - - resp, err := client.ListInstanceProcessesSender(req) - if err != nil { - result.pic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcesses", resp, "Failure sending request") - return - } - - result.pic, err = client.ListInstanceProcessesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcesses", resp, "Failure responding to request") - return - } - if result.pic.hasNextLink() && result.pic.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListInstanceProcessesPreparer prepares the ListInstanceProcesses request. -func (client AppsClient) ListInstanceProcessesPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2021-03-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListInstanceProcessesSender sends the ListInstanceProcesses request. The method will close the -// http.Response Body if it receives an error. -func (client AppsClient) ListInstanceProcessesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListInstanceProcessesResponder handles the response to the ListInstanceProcesses request. The method always -// closes the http.Response Body. -func (client AppsClient) ListInstanceProcessesResponder(resp *http.Response) (result ProcessInfoCollection, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listInstanceProcessesNextResults retrieves the next set of results, if any. -func (client AppsClient) listInstanceProcessesNextResults(ctx context.Context, lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) { - req, err := lastResults.processInfoCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListInstanceProcessesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesNextResults", resp, "Failure sending next results request") - } - result, err = client.ListInstanceProcessesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListInstanceProcessesComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListInstanceProcessesComplete(ctx context.Context, resourceGroupName string, name string, instanceID string) (result ProcessInfoCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcesses") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListInstanceProcesses(ctx, resourceGroupName, name, instanceID) - return -} - -// ListInstanceProcessesSlot 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. -// Parameters: -// 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. -// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON -// response from "GET api/sites/{siteName}/instances". -func (client AppsClient) ListInstanceProcessesSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result ProcessInfoCollectionPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessesSlot") - defer func() { - sc := -1 - if result.pic.Response.Response != nil { - sc = result.pic.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "ListInstanceProcessesSlot", err.Error()) - } - - result.fn = client.listInstanceProcessesSlotNextResults - req, err := client.ListInstanceProcessesSlotPreparer(ctx, resourceGroupName, name, slot, instanceID) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessesSlot", nil, "Failure preparing request") - return - } - - resp, err := client.ListInstanceProcessesSlotSender(req) - if err != nil { - result.pic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessesSlot", resp, "Failure sending request") - return - } - - result.pic, err = client.ListInstanceProcessesSlotResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessesSlot", resp, "Failure responding to request") - return - } - if result.pic.hasNextLink() && result.pic.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListInstanceProcessesSlotPreparer prepares the ListInstanceProcessesSlot request. -func (client AppsClient) ListInstanceProcessesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2021-03-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListInstanceProcessesSlotSender sends the ListInstanceProcessesSlot request. The method will close the -// http.Response Body if it receives an error. -func (client AppsClient) ListInstanceProcessesSlotSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListInstanceProcessesSlotResponder handles the response to the ListInstanceProcessesSlot request. The method always -// closes the http.Response Body. -func (client AppsClient) ListInstanceProcessesSlotResponder(resp *http.Response) (result ProcessInfoCollection, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listInstanceProcessesSlotNextResults retrieves the next set of results, if any. -func (client AppsClient) listInstanceProcessesSlotNextResults(ctx context.Context, lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) { - req, err := lastResults.processInfoCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesSlotNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListInstanceProcessesSlotSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesSlotNextResults", resp, "Failure sending next results request") - } - result, err = client.ListInstanceProcessesSlotResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesSlotNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListInstanceProcessesSlotComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListInstanceProcessesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result ProcessInfoCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessesSlot") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListInstanceProcessesSlot(ctx, resourceGroupName, name, slot, instanceID) - return -} - // ListInstanceProcessModules description for List module information for a process by its ID for a specific scaled-out // instance in a web site. // Parameters: @@ -23293,7 +23838,7 @@ func (client AppsClient) ListInstanceProcessModulesPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -23428,7 +23973,7 @@ func (client AppsClient) ListInstanceProcessModulesSlotPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -23560,7 +24105,7 @@ func (client AppsClient) ListInstanceProcessThreadsPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -23695,7 +24240,7 @@ func (client AppsClient) ListInstanceProcessThreadsSlotPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -23763,6 +24308,397 @@ func (client AppsClient) ListInstanceProcessThreadsSlotComplete(ctx context.Cont return } +// ListInstanceProcesses 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. +// Parameters: +// 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 api/sites/{siteName}/instances". +func (client AppsClient) ListInstanceProcesses(ctx context.Context, resourceGroupName string, name string, instanceID string) (result ProcessInfoCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcesses") + defer func() { + sc := -1 + if result.pic.Response.Response != nil { + sc = result.pic.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListInstanceProcesses", err.Error()) + } + + result.fn = client.listInstanceProcessesNextResults + req, err := client.ListInstanceProcessesPreparer(ctx, resourceGroupName, name, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcesses", nil, "Failure preparing request") + return + } + + resp, err := client.ListInstanceProcessesSender(req) + if err != nil { + result.pic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcesses", resp, "Failure sending request") + return + } + + result.pic, err = client.ListInstanceProcessesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcesses", resp, "Failure responding to request") + return + } + if result.pic.hasNextLink() && result.pic.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListInstanceProcessesPreparer prepares the ListInstanceProcesses request. +func (client AppsClient) ListInstanceProcessesPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListInstanceProcessesSender sends the ListInstanceProcesses request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListInstanceProcessesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListInstanceProcessesResponder handles the response to the ListInstanceProcesses request. The method always +// closes the http.Response Body. +func (client AppsClient) ListInstanceProcessesResponder(resp *http.Response) (result ProcessInfoCollection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listInstanceProcessesNextResults retrieves the next set of results, if any. +func (client AppsClient) listInstanceProcessesNextResults(ctx context.Context, lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) { + req, err := lastResults.processInfoCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListInstanceProcessesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesNextResults", resp, "Failure sending next results request") + } + result, err = client.ListInstanceProcessesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListInstanceProcessesComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListInstanceProcessesComplete(ctx context.Context, resourceGroupName string, name string, instanceID string) (result ProcessInfoCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcesses") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListInstanceProcesses(ctx, resourceGroupName, name, instanceID) + return +} + +// ListInstanceProcessesSlot 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. +// Parameters: +// 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. +// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON +// response from "GET api/sites/{siteName}/instances". +func (client AppsClient) ListInstanceProcessesSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result ProcessInfoCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessesSlot") + defer func() { + sc := -1 + if result.pic.Response.Response != nil { + sc = result.pic.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListInstanceProcessesSlot", err.Error()) + } + + result.fn = client.listInstanceProcessesSlotNextResults + req, err := client.ListInstanceProcessesSlotPreparer(ctx, resourceGroupName, name, slot, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessesSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListInstanceProcessesSlotSender(req) + if err != nil { + result.pic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessesSlot", resp, "Failure sending request") + return + } + + result.pic, err = client.ListInstanceProcessesSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessesSlot", resp, "Failure responding to request") + return + } + if result.pic.hasNextLink() && result.pic.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListInstanceProcessesSlotPreparer prepares the ListInstanceProcessesSlot request. +func (client AppsClient) ListInstanceProcessesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListInstanceProcessesSlotSender sends the ListInstanceProcessesSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListInstanceProcessesSlotSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListInstanceProcessesSlotResponder handles the response to the ListInstanceProcessesSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListInstanceProcessesSlotResponder(resp *http.Response) (result ProcessInfoCollection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listInstanceProcessesSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) listInstanceProcessesSlotNextResults(ctx context.Context, lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) { + req, err := lastResults.processInfoCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesSlotNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListInstanceProcessesSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesSlotNextResults", resp, "Failure sending next results request") + } + result, err = client.ListInstanceProcessesSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesSlotNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListInstanceProcessesSlotComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListInstanceProcessesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result ProcessInfoCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessesSlot") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListInstanceProcessesSlot(ctx, resourceGroupName, name, slot, instanceID) + return +} + +// ListInstanceWorkflowsSlot sends the list instance workflows slot request. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// slot - name of the deployment slot. +func (client AppsClient) ListInstanceWorkflowsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result WorkflowEnvelopeCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceWorkflowsSlot") + defer func() { + sc := -1 + if result.wec.Response.Response != nil { + sc = result.wec.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListInstanceWorkflowsSlot", err.Error()) + } + + result.fn = client.listInstanceWorkflowsSlotNextResults + req, err := client.ListInstanceWorkflowsSlotPreparer(ctx, resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceWorkflowsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListInstanceWorkflowsSlotSender(req) + if err != nil { + result.wec.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceWorkflowsSlot", resp, "Failure sending request") + return + } + + result.wec, err = client.ListInstanceWorkflowsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceWorkflowsSlot", resp, "Failure responding to request") + return + } + if result.wec.hasNextLink() && result.wec.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListInstanceWorkflowsSlotPreparer prepares the ListInstanceWorkflowsSlot request. +func (client AppsClient) ListInstanceWorkflowsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListInstanceWorkflowsSlotSender sends the ListInstanceWorkflowsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListInstanceWorkflowsSlotSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListInstanceWorkflowsSlotResponder handles the response to the ListInstanceWorkflowsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListInstanceWorkflowsSlotResponder(resp *http.Response) (result WorkflowEnvelopeCollection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listInstanceWorkflowsSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) listInstanceWorkflowsSlotNextResults(ctx context.Context, lastResults WorkflowEnvelopeCollection) (result WorkflowEnvelopeCollection, err error) { + req, err := lastResults.workflowEnvelopeCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceWorkflowsSlotNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListInstanceWorkflowsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceWorkflowsSlotNextResults", resp, "Failure sending next results request") + } + result, err = client.ListInstanceWorkflowsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceWorkflowsSlotNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListInstanceWorkflowsSlotComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListInstanceWorkflowsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result WorkflowEnvelopeCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceWorkflowsSlot") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListInstanceWorkflowsSlot(ctx, resourceGroupName, name, slot) + return +} + // ListMetadata description for Gets the metadata of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. @@ -23816,7 +24752,7 @@ func (client AppsClient) ListMetadataPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -23903,7 +24839,7 @@ func (client AppsClient) ListMetadataSlotPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -23989,7 +24925,7 @@ func (client AppsClient) ListNetworkFeaturesPreparer(ctx context.Context, resour "view": autorest.Encode("path", view), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -24079,7 +25015,7 @@ func (client AppsClient) ListNetworkFeaturesSlotPreparer(ctx context.Context, re "view": autorest.Encode("path", view), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -24171,7 +25107,7 @@ func (client AppsClient) ListPerfMonCountersPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -24305,7 +25241,7 @@ func (client AppsClient) ListPerfMonCountersSlotPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -24429,7 +25365,7 @@ func (client AppsClient) ListPremierAddOnsPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -24516,7 +25452,7 @@ func (client AppsClient) ListPremierAddOnsSlotPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -24547,18 +25483,19 @@ func (client AppsClient) ListPremierAddOnsSlotResponder(resp *http.Response) (re return } -// ListProcesses 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. +// ListProcessModules description for List module information for a process by its ID for a specific scaled-out +// instance in a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -func (client AppsClient) ListProcesses(ctx context.Context, resourceGroupName string, name string) (result ProcessInfoCollectionPage, err error) { +// processID - pID. +func (client AppsClient) ListProcessModules(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessModuleInfoCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcesses") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessModules") defer func() { sc := -1 - if result.pic.Response.Response != nil { - sc = result.pic.Response.Response.StatusCode + if result.pmic.Response.Response != nil { + sc = result.pmic.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -24568,29 +25505,29 @@ func (client AppsClient) ListProcesses(ctx context.Context, resourceGroupName st Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "ListProcesses", err.Error()) + return result, validation.NewError("web.AppsClient", "ListProcessModules", err.Error()) } - result.fn = client.listProcessesNextResults - req, err := client.ListProcessesPreparer(ctx, resourceGroupName, name) + result.fn = client.listProcessModulesNextResults + req, err := client.ListProcessModulesPreparer(ctx, resourceGroupName, name, processID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcesses", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModules", nil, "Failure preparing request") return } - resp, err := client.ListProcessesSender(req) + resp, err := client.ListProcessModulesSender(req) if err != nil { - result.pic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcesses", resp, "Failure sending request") + result.pmic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModules", resp, "Failure sending request") return } - result.pic, err = client.ListProcessesResponder(resp) + result.pmic, err = client.ListProcessModulesResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcesses", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModules", resp, "Failure responding to request") return } - if result.pic.hasNextLink() && result.pic.IsEmpty() { + if result.pmic.hasNextLink() && result.pmic.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -24598,15 +25535,16 @@ func (client AppsClient) ListProcesses(ctx context.Context, resourceGroupName st return } -// ListProcessesPreparer prepares the ListProcesses request. -func (client AppsClient) ListProcessesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// ListProcessModulesPreparer prepares the ListProcessModules request. +func (client AppsClient) ListProcessModulesPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -24614,20 +25552,20 @@ func (client AppsClient) ListProcessesPreparer(ctx context.Context, resourceGrou preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListProcessesSender sends the ListProcesses request. The method will close the +// ListProcessModulesSender sends the ListProcessModules request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListProcessesSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListProcessModulesSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListProcessesResponder handles the response to the ListProcesses request. The method always +// ListProcessModulesResponder handles the response to the ListProcessModules request. The method always // closes the http.Response Body. -func (client AppsClient) ListProcessesResponder(resp *http.Response) (result ProcessInfoCollection, err error) { +func (client AppsClient) ListProcessModulesResponder(resp *http.Response) (result ProcessModuleInfoCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -24637,31 +25575,31 @@ func (client AppsClient) ListProcessesResponder(resp *http.Response) (result Pro return } -// listProcessesNextResults retrieves the next set of results, if any. -func (client AppsClient) listProcessesNextResults(ctx context.Context, lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) { - req, err := lastResults.processInfoCollectionPreparer(ctx) +// listProcessModulesNextResults retrieves the next set of results, if any. +func (client AppsClient) listProcessModulesNextResults(ctx context.Context, lastResults ProcessModuleInfoCollection) (result ProcessModuleInfoCollection, err error) { + req, err := lastResults.processModuleInfoCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListProcessesSender(req) + resp, err := client.ListProcessModulesSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesNextResults", resp, "Failure sending next results request") } - result, err = client.ListProcessesResponder(resp) + result, err = client.ListProcessModulesResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesNextResults", resp, "Failure responding to next results request") } return } -// ListProcessesComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListProcessesComplete(ctx context.Context, resourceGroupName string, name string) (result ProcessInfoCollectionIterator, err error) { +// ListProcessModulesComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListProcessModulesComplete(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessModuleInfoCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcesses") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessModules") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -24670,24 +25608,25 @@ func (client AppsClient) ListProcessesComplete(ctx context.Context, resourceGrou tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListProcesses(ctx, resourceGroupName, name) + result.page, err = client.ListProcessModules(ctx, resourceGroupName, name, processID) return } -// ListProcessesSlot 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. +// ListProcessModulesSlot description for List module information for a process by its ID for a specific scaled-out +// instance in a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. +// processID - pID. // slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the // production slot. -func (client AppsClient) ListProcessesSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ProcessInfoCollectionPage, err error) { +func (client AppsClient) ListProcessModulesSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessModuleInfoCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessesSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessModulesSlot") defer func() { sc := -1 - if result.pic.Response.Response != nil { - sc = result.pic.Response.Response.StatusCode + if result.pmic.Response.Response != nil { + sc = result.pmic.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -24697,29 +25636,29 @@ func (client AppsClient) ListProcessesSlot(ctx context.Context, resourceGroupNam Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "ListProcessesSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListProcessModulesSlot", err.Error()) } - result.fn = client.listProcessesSlotNextResults - req, err := client.ListProcessesSlotPreparer(ctx, resourceGroupName, name, slot) + result.fn = client.listProcessModulesSlotNextResults + req, err := client.ListProcessModulesSlotPreparer(ctx, resourceGroupName, name, processID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessesSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModulesSlot", nil, "Failure preparing request") return } - resp, err := client.ListProcessesSlotSender(req) + resp, err := client.ListProcessModulesSlotSender(req) if err != nil { - result.pic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessesSlot", resp, "Failure sending request") + result.pmic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModulesSlot", resp, "Failure sending request") return } - result.pic, err = client.ListProcessesSlotResponder(resp) + result.pmic, err = client.ListProcessModulesSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessesSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModulesSlot", resp, "Failure responding to request") return } - if result.pic.hasNextLink() && result.pic.IsEmpty() { + if result.pmic.hasNextLink() && result.pmic.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -24727,16 +25666,17 @@ func (client AppsClient) ListProcessesSlot(ctx context.Context, resourceGroupNam return } -// ListProcessesSlotPreparer prepares the ListProcessesSlot request. -func (client AppsClient) ListProcessesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// ListProcessModulesSlotPreparer prepares the ListProcessModulesSlot request. +func (client AppsClient) ListProcessModulesSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -24744,20 +25684,20 @@ func (client AppsClient) ListProcessesSlotPreparer(ctx context.Context, resource preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListProcessesSlotSender sends the ListProcessesSlot request. The method will close the +// ListProcessModulesSlotSender sends the ListProcessModulesSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListProcessesSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListProcessModulesSlotSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListProcessesSlotResponder handles the response to the ListProcessesSlot request. The method always +// ListProcessModulesSlotResponder handles the response to the ListProcessModulesSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListProcessesSlotResponder(resp *http.Response) (result ProcessInfoCollection, err error) { +func (client AppsClient) ListProcessModulesSlotResponder(resp *http.Response) (result ProcessModuleInfoCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -24767,31 +25707,31 @@ func (client AppsClient) ListProcessesSlotResponder(resp *http.Response) (result return } -// listProcessesSlotNextResults retrieves the next set of results, if any. -func (client AppsClient) listProcessesSlotNextResults(ctx context.Context, lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) { - req, err := lastResults.processInfoCollectionPreparer(ctx) +// listProcessModulesSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) listProcessModulesSlotNextResults(ctx context.Context, lastResults ProcessModuleInfoCollection) (result ProcessModuleInfoCollection, err error) { + req, err := lastResults.processModuleInfoCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesSlotNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesSlotNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListProcessesSlotSender(req) + resp, err := client.ListProcessModulesSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesSlotNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesSlotNextResults", resp, "Failure sending next results request") } - result, err = client.ListProcessesSlotResponder(resp) + result, err = client.ListProcessModulesSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesSlotNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesSlotNextResults", resp, "Failure responding to next results request") } return } -// ListProcessesSlotComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListProcessesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result ProcessInfoCollectionIterator, err error) { +// ListProcessModulesSlotComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListProcessModulesSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessModuleInfoCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessesSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessModulesSlot") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -24800,23 +25740,23 @@ func (client AppsClient) ListProcessesSlotComplete(ctx context.Context, resource tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListProcessesSlot(ctx, resourceGroupName, name, slot) + result.page, err = client.ListProcessModulesSlot(ctx, resourceGroupName, name, processID, slot) return } -// ListProcessModules description for List module information for a process by its ID for a specific scaled-out -// instance in a web site. +// ListProcessThreads description for List the threads in a process by its ID for a specific scaled-out instance in a +// web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. // processID - pID. -func (client AppsClient) ListProcessModules(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessModuleInfoCollectionPage, err error) { +func (client AppsClient) ListProcessThreads(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessThreadInfoCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessModules") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessThreads") defer func() { sc := -1 - if result.pmic.Response.Response != nil { - sc = result.pmic.Response.Response.StatusCode + if result.ptic.Response.Response != nil { + sc = result.ptic.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -24826,29 +25766,29 @@ func (client AppsClient) ListProcessModules(ctx context.Context, resourceGroupNa Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "ListProcessModules", err.Error()) + return result, validation.NewError("web.AppsClient", "ListProcessThreads", err.Error()) } - result.fn = client.listProcessModulesNextResults - req, err := client.ListProcessModulesPreparer(ctx, resourceGroupName, name, processID) + result.fn = client.listProcessThreadsNextResults + req, err := client.ListProcessThreadsPreparer(ctx, resourceGroupName, name, processID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModules", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreads", nil, "Failure preparing request") return } - resp, err := client.ListProcessModulesSender(req) + resp, err := client.ListProcessThreadsSender(req) if err != nil { - result.pmic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModules", resp, "Failure sending request") + result.ptic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreads", resp, "Failure sending request") return } - result.pmic, err = client.ListProcessModulesResponder(resp) + result.ptic, err = client.ListProcessThreadsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModules", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreads", resp, "Failure responding to request") return } - if result.pmic.hasNextLink() && result.pmic.IsEmpty() { + if result.ptic.hasNextLink() && result.ptic.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -24856,8 +25796,8 @@ func (client AppsClient) ListProcessModules(ctx context.Context, resourceGroupNa return } -// ListProcessModulesPreparer prepares the ListProcessModules request. -func (client AppsClient) ListProcessModulesPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) { +// ListProcessThreadsPreparer prepares the ListProcessThreads request. +func (client AppsClient) ListProcessThreadsPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "processId": autorest.Encode("path", processID), @@ -24865,7 +25805,7 @@ func (client AppsClient) ListProcessModulesPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -24873,20 +25813,20 @@ func (client AppsClient) ListProcessModulesPreparer(ctx context.Context, resourc preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListProcessModulesSender sends the ListProcessModules request. The method will close the +// ListProcessThreadsSender sends the ListProcessThreads request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListProcessModulesSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListProcessThreadsSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListProcessModulesResponder handles the response to the ListProcessModules request. The method always +// ListProcessThreadsResponder handles the response to the ListProcessThreads request. The method always // closes the http.Response Body. -func (client AppsClient) ListProcessModulesResponder(resp *http.Response) (result ProcessModuleInfoCollection, err error) { +func (client AppsClient) ListProcessThreadsResponder(resp *http.Response) (result ProcessThreadInfoCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -24896,31 +25836,31 @@ func (client AppsClient) ListProcessModulesResponder(resp *http.Response) (resul return } -// listProcessModulesNextResults retrieves the next set of results, if any. -func (client AppsClient) listProcessModulesNextResults(ctx context.Context, lastResults ProcessModuleInfoCollection) (result ProcessModuleInfoCollection, err error) { - req, err := lastResults.processModuleInfoCollectionPreparer(ctx) +// listProcessThreadsNextResults retrieves the next set of results, if any. +func (client AppsClient) listProcessThreadsNextResults(ctx context.Context, lastResults ProcessThreadInfoCollection) (result ProcessThreadInfoCollection, err error) { + req, err := lastResults.processThreadInfoCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListProcessModulesSender(req) + resp, err := client.ListProcessThreadsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsNextResults", resp, "Failure sending next results request") } - result, err = client.ListProcessModulesResponder(resp) + result, err = client.ListProcessThreadsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsNextResults", resp, "Failure responding to next results request") } return } -// ListProcessModulesComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListProcessModulesComplete(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessModuleInfoCollectionIterator, err error) { +// ListProcessThreadsComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListProcessThreadsComplete(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessThreadInfoCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessModules") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessThreads") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -24929,25 +25869,25 @@ func (client AppsClient) ListProcessModulesComplete(ctx context.Context, resourc tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListProcessModules(ctx, resourceGroupName, name, processID) + result.page, err = client.ListProcessThreads(ctx, resourceGroupName, name, processID) return } -// ListProcessModulesSlot description for List module information for a process by its ID for a specific scaled-out -// instance in a web site. +// ListProcessThreadsSlot description for List the threads in a process by its ID for a specific scaled-out instance in +// a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. // processID - pID. // slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the // production slot. -func (client AppsClient) ListProcessModulesSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessModuleInfoCollectionPage, err error) { +func (client AppsClient) ListProcessThreadsSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessThreadInfoCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessModulesSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessThreadsSlot") defer func() { sc := -1 - if result.pmic.Response.Response != nil { - sc = result.pmic.Response.Response.StatusCode + if result.ptic.Response.Response != nil { + sc = result.ptic.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -24957,29 +25897,29 @@ func (client AppsClient) ListProcessModulesSlot(ctx context.Context, resourceGro Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "ListProcessModulesSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListProcessThreadsSlot", err.Error()) } - result.fn = client.listProcessModulesSlotNextResults - req, err := client.ListProcessModulesSlotPreparer(ctx, resourceGroupName, name, processID, slot) + result.fn = client.listProcessThreadsSlotNextResults + req, err := client.ListProcessThreadsSlotPreparer(ctx, resourceGroupName, name, processID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModulesSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreadsSlot", nil, "Failure preparing request") return } - resp, err := client.ListProcessModulesSlotSender(req) + resp, err := client.ListProcessThreadsSlotSender(req) if err != nil { - result.pmic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModulesSlot", resp, "Failure sending request") + result.ptic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreadsSlot", resp, "Failure sending request") return } - result.pmic, err = client.ListProcessModulesSlotResponder(resp) + result.ptic, err = client.ListProcessThreadsSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModulesSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreadsSlot", resp, "Failure responding to request") return } - if result.pmic.hasNextLink() && result.pmic.IsEmpty() { + if result.ptic.hasNextLink() && result.ptic.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -24987,8 +25927,8 @@ func (client AppsClient) ListProcessModulesSlot(ctx context.Context, resourceGro return } -// ListProcessModulesSlotPreparer prepares the ListProcessModulesSlot request. -func (client AppsClient) ListProcessModulesSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) { +// ListProcessThreadsSlotPreparer prepares the ListProcessThreadsSlot request. +func (client AppsClient) ListProcessThreadsSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "processId": autorest.Encode("path", processID), @@ -24997,7 +25937,7 @@ func (client AppsClient) ListProcessModulesSlotPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -25005,20 +25945,20 @@ func (client AppsClient) ListProcessModulesSlotPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListProcessModulesSlotSender sends the ListProcessModulesSlot request. The method will close the +// ListProcessThreadsSlotSender sends the ListProcessThreadsSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListProcessModulesSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListProcessThreadsSlotSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListProcessModulesSlotResponder handles the response to the ListProcessModulesSlot request. The method always +// ListProcessThreadsSlotResponder handles the response to the ListProcessThreadsSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListProcessModulesSlotResponder(resp *http.Response) (result ProcessModuleInfoCollection, err error) { +func (client AppsClient) ListProcessThreadsSlotResponder(resp *http.Response) (result ProcessThreadInfoCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -25028,31 +25968,31 @@ func (client AppsClient) ListProcessModulesSlotResponder(resp *http.Response) (r return } -// listProcessModulesSlotNextResults retrieves the next set of results, if any. -func (client AppsClient) listProcessModulesSlotNextResults(ctx context.Context, lastResults ProcessModuleInfoCollection) (result ProcessModuleInfoCollection, err error) { - req, err := lastResults.processModuleInfoCollectionPreparer(ctx) +// listProcessThreadsSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) listProcessThreadsSlotNextResults(ctx context.Context, lastResults ProcessThreadInfoCollection) (result ProcessThreadInfoCollection, err error) { + req, err := lastResults.processThreadInfoCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesSlotNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsSlotNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListProcessModulesSlotSender(req) + resp, err := client.ListProcessThreadsSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesSlotNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsSlotNextResults", resp, "Failure sending next results request") } - result, err = client.ListProcessModulesSlotResponder(resp) + result, err = client.ListProcessThreadsSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesSlotNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsSlotNextResults", resp, "Failure responding to next results request") } return } -// ListProcessModulesSlotComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListProcessModulesSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessModuleInfoCollectionIterator, err error) { +// ListProcessThreadsSlotComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListProcessThreadsSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessThreadInfoCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessModulesSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessThreadsSlot") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -25061,23 +26001,22 @@ func (client AppsClient) ListProcessModulesSlotComplete(ctx context.Context, res tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListProcessModulesSlot(ctx, resourceGroupName, name, processID, slot) + result.page, err = client.ListProcessThreadsSlot(ctx, resourceGroupName, name, processID, slot) return } -// ListProcessThreads description for List the threads in a process by its ID for a specific scaled-out instance in a -// web site. +// ListProcesses 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. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// processID - pID. -func (client AppsClient) ListProcessThreads(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessThreadInfoCollectionPage, err error) { +func (client AppsClient) ListProcesses(ctx context.Context, resourceGroupName string, name string) (result ProcessInfoCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessThreads") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcesses") defer func() { sc := -1 - if result.ptic.Response.Response != nil { - sc = result.ptic.Response.Response.StatusCode + if result.pic.Response.Response != nil { + sc = result.pic.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -25087,29 +26026,29 @@ func (client AppsClient) ListProcessThreads(ctx context.Context, resourceGroupNa Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "ListProcessThreads", err.Error()) + return result, validation.NewError("web.AppsClient", "ListProcesses", err.Error()) } - result.fn = client.listProcessThreadsNextResults - req, err := client.ListProcessThreadsPreparer(ctx, resourceGroupName, name, processID) + result.fn = client.listProcessesNextResults + req, err := client.ListProcessesPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreads", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcesses", nil, "Failure preparing request") return } - resp, err := client.ListProcessThreadsSender(req) + resp, err := client.ListProcessesSender(req) if err != nil { - result.ptic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreads", resp, "Failure sending request") + result.pic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcesses", resp, "Failure sending request") return } - result.ptic, err = client.ListProcessThreadsResponder(resp) + result.pic, err = client.ListProcessesResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreads", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcesses", resp, "Failure responding to request") return } - if result.ptic.hasNextLink() && result.ptic.IsEmpty() { + if result.pic.hasNextLink() && result.pic.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -25117,16 +26056,15 @@ func (client AppsClient) ListProcessThreads(ctx context.Context, resourceGroupNa return } -// ListProcessThreadsPreparer prepares the ListProcessThreads request. -func (client AppsClient) ListProcessThreadsPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) { +// ListProcessesPreparer prepares the ListProcesses request. +func (client AppsClient) ListProcessesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -25134,20 +26072,20 @@ func (client AppsClient) ListProcessThreadsPreparer(ctx context.Context, resourc preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListProcessThreadsSender sends the ListProcessThreads request. The method will close the +// ListProcessesSender sends the ListProcesses request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListProcessThreadsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListProcessesSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListProcessThreadsResponder handles the response to the ListProcessThreads request. The method always +// ListProcessesResponder handles the response to the ListProcesses request. The method always // closes the http.Response Body. -func (client AppsClient) ListProcessThreadsResponder(resp *http.Response) (result ProcessThreadInfoCollection, err error) { +func (client AppsClient) ListProcessesResponder(resp *http.Response) (result ProcessInfoCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -25157,31 +26095,31 @@ func (client AppsClient) ListProcessThreadsResponder(resp *http.Response) (resul return } -// listProcessThreadsNextResults retrieves the next set of results, if any. -func (client AppsClient) listProcessThreadsNextResults(ctx context.Context, lastResults ProcessThreadInfoCollection) (result ProcessThreadInfoCollection, err error) { - req, err := lastResults.processThreadInfoCollectionPreparer(ctx) +// listProcessesNextResults retrieves the next set of results, if any. +func (client AppsClient) listProcessesNextResults(ctx context.Context, lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) { + req, err := lastResults.processInfoCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListProcessThreadsSender(req) + resp, err := client.ListProcessesSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesNextResults", resp, "Failure sending next results request") } - result, err = client.ListProcessThreadsResponder(resp) + result, err = client.ListProcessesResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesNextResults", resp, "Failure responding to next results request") } return } -// ListProcessThreadsComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListProcessThreadsComplete(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessThreadInfoCollectionIterator, err error) { +// ListProcessesComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListProcessesComplete(ctx context.Context, resourceGroupName string, name string) (result ProcessInfoCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessThreads") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcesses") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -25190,25 +26128,24 @@ func (client AppsClient) ListProcessThreadsComplete(ctx context.Context, resourc tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListProcessThreads(ctx, resourceGroupName, name, processID) + result.page, err = client.ListProcesses(ctx, resourceGroupName, name) return } -// ListProcessThreadsSlot description for List the threads in a process by its ID for a specific scaled-out instance in -// a web site. +// ListProcessesSlot 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. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// processID - pID. // slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the // production slot. -func (client AppsClient) ListProcessThreadsSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessThreadInfoCollectionPage, err error) { +func (client AppsClient) ListProcessesSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ProcessInfoCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessThreadsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessesSlot") defer func() { sc := -1 - if result.ptic.Response.Response != nil { - sc = result.ptic.Response.Response.StatusCode + if result.pic.Response.Response != nil { + sc = result.pic.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -25218,29 +26155,29 @@ func (client AppsClient) ListProcessThreadsSlot(ctx context.Context, resourceGro Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "ListProcessThreadsSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListProcessesSlot", err.Error()) } - result.fn = client.listProcessThreadsSlotNextResults - req, err := client.ListProcessThreadsSlotPreparer(ctx, resourceGroupName, name, processID, slot) + result.fn = client.listProcessesSlotNextResults + req, err := client.ListProcessesSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreadsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessesSlot", nil, "Failure preparing request") return } - resp, err := client.ListProcessThreadsSlotSender(req) + resp, err := client.ListProcessesSlotSender(req) if err != nil { - result.ptic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreadsSlot", resp, "Failure sending request") + result.pic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessesSlot", resp, "Failure sending request") return } - result.ptic, err = client.ListProcessThreadsSlotResponder(resp) + result.pic, err = client.ListProcessesSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreadsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessesSlot", resp, "Failure responding to request") return } - if result.ptic.hasNextLink() && result.ptic.IsEmpty() { + if result.pic.hasNextLink() && result.pic.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -25248,17 +26185,16 @@ func (client AppsClient) ListProcessThreadsSlot(ctx context.Context, resourceGro return } -// ListProcessThreadsSlotPreparer prepares the ListProcessThreadsSlot request. -func (client AppsClient) ListProcessThreadsSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) { +// ListProcessesSlotPreparer prepares the ListProcessesSlot request. +func (client AppsClient) ListProcessesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -25266,20 +26202,20 @@ func (client AppsClient) ListProcessThreadsSlotPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListProcessThreadsSlotSender sends the ListProcessThreadsSlot request. The method will close the +// ListProcessesSlotSender sends the ListProcessesSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListProcessThreadsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListProcessesSlotSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListProcessThreadsSlotResponder handles the response to the ListProcessThreadsSlot request. The method always +// ListProcessesSlotResponder handles the response to the ListProcessesSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListProcessThreadsSlotResponder(resp *http.Response) (result ProcessThreadInfoCollection, err error) { +func (client AppsClient) ListProcessesSlotResponder(resp *http.Response) (result ProcessInfoCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -25289,31 +26225,31 @@ func (client AppsClient) ListProcessThreadsSlotResponder(resp *http.Response) (r return } -// listProcessThreadsSlotNextResults retrieves the next set of results, if any. -func (client AppsClient) listProcessThreadsSlotNextResults(ctx context.Context, lastResults ProcessThreadInfoCollection) (result ProcessThreadInfoCollection, err error) { - req, err := lastResults.processThreadInfoCollectionPreparer(ctx) +// listProcessesSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) listProcessesSlotNextResults(ctx context.Context, lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) { + req, err := lastResults.processInfoCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsSlotNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesSlotNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListProcessThreadsSlotSender(req) + resp, err := client.ListProcessesSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsSlotNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesSlotNextResults", resp, "Failure sending next results request") } - result, err = client.ListProcessThreadsSlotResponder(resp) + result, err = client.ListProcessesSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsSlotNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesSlotNextResults", resp, "Failure responding to next results request") } return } -// ListProcessThreadsSlotComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListProcessThreadsSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessThreadInfoCollectionIterator, err error) { +// ListProcessesSlotComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListProcessesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result ProcessInfoCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessThreadsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessesSlot") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -25322,7 +26258,133 @@ func (client AppsClient) ListProcessThreadsSlotComplete(ctx context.Context, res tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListProcessThreadsSlot(ctx, resourceGroupName, name, processID, slot) + result.page, err = client.ListProcessesSlot(ctx, resourceGroupName, name, slot) + return +} + +// ListProductionSiteDeploymentStatuses sends the list production site deployment statuses request. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +func (client AppsClient) ListProductionSiteDeploymentStatuses(ctx context.Context, resourceGroupName string, name string) (result CsmDeploymentStatusCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProductionSiteDeploymentStatuses") + defer func() { + sc := -1 + if result.cdsc.Response.Response != nil { + sc = result.cdsc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListProductionSiteDeploymentStatuses", err.Error()) + } + + result.fn = client.listProductionSiteDeploymentStatusesNextResults + req, err := client.ListProductionSiteDeploymentStatusesPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProductionSiteDeploymentStatuses", nil, "Failure preparing request") + return + } + + resp, err := client.ListProductionSiteDeploymentStatusesSender(req) + if err != nil { + result.cdsc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProductionSiteDeploymentStatuses", resp, "Failure sending request") + return + } + + result.cdsc, err = client.ListProductionSiteDeploymentStatusesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProductionSiteDeploymentStatuses", resp, "Failure responding to request") + return + } + if result.cdsc.hasNextLink() && result.cdsc.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListProductionSiteDeploymentStatusesPreparer prepares the ListProductionSiteDeploymentStatuses request. +func (client AppsClient) ListProductionSiteDeploymentStatusesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deploymentStatus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListProductionSiteDeploymentStatusesSender sends the ListProductionSiteDeploymentStatuses request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListProductionSiteDeploymentStatusesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListProductionSiteDeploymentStatusesResponder handles the response to the ListProductionSiteDeploymentStatuses request. The method always +// closes the http.Response Body. +func (client AppsClient) ListProductionSiteDeploymentStatusesResponder(resp *http.Response) (result CsmDeploymentStatusCollection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listProductionSiteDeploymentStatusesNextResults retrieves the next set of results, if any. +func (client AppsClient) listProductionSiteDeploymentStatusesNextResults(ctx context.Context, lastResults CsmDeploymentStatusCollection) (result CsmDeploymentStatusCollection, err error) { + req, err := lastResults.csmDeploymentStatusCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProductionSiteDeploymentStatusesNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListProductionSiteDeploymentStatusesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProductionSiteDeploymentStatusesNextResults", resp, "Failure sending next results request") + } + result, err = client.ListProductionSiteDeploymentStatusesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "listProductionSiteDeploymentStatusesNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListProductionSiteDeploymentStatusesComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListProductionSiteDeploymentStatusesComplete(ctx context.Context, resourceGroupName string, name string) (result CsmDeploymentStatusCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProductionSiteDeploymentStatuses") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListProductionSiteDeploymentStatuses(ctx, resourceGroupName, name) return } @@ -25384,7 +26446,7 @@ func (client AppsClient) ListPublicCertificatesPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -25513,7 +26575,7 @@ func (client AppsClient) ListPublicCertificatesSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -25627,7 +26689,7 @@ func (client AppsClient) ListPublishingCredentialsPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -25717,7 +26779,7 @@ func (client AppsClient) ListPublishingCredentialsSlotPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -25814,7 +26876,7 @@ func (client AppsClient) ListPublishingProfileXMLWithSecretsPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -25905,7 +26967,7 @@ func (client AppsClient) ListPublishingProfileXMLWithSecretsSlotPreparer(ctx con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -25991,7 +27053,7 @@ func (client AppsClient) ListRelayServiceConnectionsPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -26079,7 +27141,7 @@ func (client AppsClient) ListRelayServiceConnectionsSlotPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -26168,7 +27230,7 @@ func (client AppsClient) ListSiteBackupsPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -26297,7 +27359,7 @@ func (client AppsClient) ListSiteBackupsSlotPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -26423,7 +27485,7 @@ func (client AppsClient) ListSiteExtensionsPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -26551,7 +27613,7 @@ func (client AppsClient) ListSiteExtensionsSlotPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -26672,7 +27734,7 @@ func (client AppsClient) ListSitePushSettingsPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -26758,7 +27820,7 @@ func (client AppsClient) ListSitePushSettingsSlotPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -26843,7 +27905,7 @@ func (client AppsClient) ListSlotConfigurationNamesPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -26937,7 +27999,7 @@ func (client AppsClient) ListSlotDifferencesFromProductionPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -27071,7 +28133,7 @@ func (client AppsClient) ListSlotDifferencesSlotPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -27141,6 +28203,135 @@ func (client AppsClient) ListSlotDifferencesSlotComplete(ctx context.Context, re return } +// ListSlotSiteDeploymentStatusesSlot sends the list slot site deployment statuses slot request. +// Parameters: +// 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. +func (client AppsClient) ListSlotSiteDeploymentStatusesSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result CsmDeploymentStatusCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlotSiteDeploymentStatusesSlot") + defer func() { + sc := -1 + if result.cdsc.Response.Response != nil { + sc = result.cdsc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListSlotSiteDeploymentStatusesSlot", err.Error()) + } + + result.fn = client.listSlotSiteDeploymentStatusesSlotNextResults + req, err := client.ListSlotSiteDeploymentStatusesSlotPreparer(ctx, resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotSiteDeploymentStatusesSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListSlotSiteDeploymentStatusesSlotSender(req) + if err != nil { + result.cdsc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotSiteDeploymentStatusesSlot", resp, "Failure sending request") + return + } + + result.cdsc, err = client.ListSlotSiteDeploymentStatusesSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotSiteDeploymentStatusesSlot", resp, "Failure responding to request") + return + } + if result.cdsc.hasNextLink() && result.cdsc.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListSlotSiteDeploymentStatusesSlotPreparer prepares the ListSlotSiteDeploymentStatusesSlot request. +func (client AppsClient) ListSlotSiteDeploymentStatusesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deploymentStatus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSlotSiteDeploymentStatusesSlotSender sends the ListSlotSiteDeploymentStatusesSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListSlotSiteDeploymentStatusesSlotSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListSlotSiteDeploymentStatusesSlotResponder handles the response to the ListSlotSiteDeploymentStatusesSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListSlotSiteDeploymentStatusesSlotResponder(resp *http.Response) (result CsmDeploymentStatusCollection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listSlotSiteDeploymentStatusesSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) listSlotSiteDeploymentStatusesSlotNextResults(ctx context.Context, lastResults CsmDeploymentStatusCollection) (result CsmDeploymentStatusCollection, err error) { + req, err := lastResults.csmDeploymentStatusCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSlotSiteDeploymentStatusesSlotNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSlotSiteDeploymentStatusesSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSlotSiteDeploymentStatusesSlotNextResults", resp, "Failure sending next results request") + } + result, err = client.ListSlotSiteDeploymentStatusesSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "listSlotSiteDeploymentStatusesSlotNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListSlotSiteDeploymentStatusesSlotComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListSlotSiteDeploymentStatusesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result CsmDeploymentStatusCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlotSiteDeploymentStatusesSlot") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListSlotSiteDeploymentStatusesSlot(ctx, resourceGroupName, name, slot) + return +} + // ListSlots description for Gets an app's deployment slots. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. @@ -27199,7 +28390,7 @@ func (client AppsClient) ListSlotsPreparer(ctx context.Context, resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -27325,7 +28516,7 @@ func (client AppsClient) ListSnapshotsPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -27451,7 +28642,7 @@ func (client AppsClient) ListSnapshotsFromDRSecondaryPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -27579,7 +28770,7 @@ func (client AppsClient) ListSnapshotsFromDRSecondarySlotPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -27707,7 +28898,7 @@ func (client AppsClient) ListSnapshotsSlotPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -27828,7 +29019,7 @@ func (client AppsClient) ListSyncFunctionTriggersPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -27914,7 +29105,7 @@ func (client AppsClient) ListSyncFunctionTriggersSlotPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -27998,7 +29189,7 @@ func (client AppsClient) ListSyncStatusPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -28083,7 +29274,7 @@ func (client AppsClient) ListSyncStatusSlotPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -28173,7 +29364,7 @@ func (client AppsClient) ListTriggeredWebJobHistoryPreparer(ctx context.Context, "webJobName": autorest.Encode("path", webJobName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -28303,7 +29494,7 @@ func (client AppsClient) ListTriggeredWebJobHistorySlotPreparer(ctx context.Cont "webJobName": autorest.Encode("path", webJobName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -28429,7 +29620,7 @@ func (client AppsClient) ListTriggeredWebJobsPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -28558,7 +29749,7 @@ func (client AppsClient) ListTriggeredWebJobsSlotPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -28687,7 +29878,7 @@ func (client AppsClient) ListUsagesPreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -28822,7 +30013,7 @@ func (client AppsClient) ListUsagesSlotPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -28946,7 +30137,7 @@ func (client AppsClient) ListVnetConnectionsPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -29033,7 +30224,7 @@ func (client AppsClient) ListVnetConnectionsSlotPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -29122,7 +30313,7 @@ func (client AppsClient) ListWebJobsPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -29251,7 +30442,7 @@ func (client AppsClient) ListWebJobsSlotPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -29319,6 +30510,302 @@ func (client AppsClient) ListWebJobsSlotComplete(ctx context.Context, resourceGr return } +// ListWorkflows sends the list workflows request. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +func (client AppsClient) ListWorkflows(ctx context.Context, resourceGroupName string, name string) (result WorkflowEnvelopeCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListWorkflows") + defer func() { + sc := -1 + if result.wec.Response.Response != nil { + sc = result.wec.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListWorkflows", err.Error()) + } + + result.fn = client.listWorkflowsNextResults + req, err := client.ListWorkflowsPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWorkflows", nil, "Failure preparing request") + return + } + + resp, err := client.ListWorkflowsSender(req) + if err != nil { + result.wec.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWorkflows", resp, "Failure sending request") + return + } + + result.wec, err = client.ListWorkflowsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWorkflows", resp, "Failure responding to request") + return + } + if result.wec.hasNextLink() && result.wec.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListWorkflowsPreparer prepares the ListWorkflows request. +func (client AppsClient) ListWorkflowsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListWorkflowsSender sends the ListWorkflows request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListWorkflowsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListWorkflowsResponder handles the response to the ListWorkflows request. The method always +// closes the http.Response Body. +func (client AppsClient) ListWorkflowsResponder(resp *http.Response) (result WorkflowEnvelopeCollection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listWorkflowsNextResults retrieves the next set of results, if any. +func (client AppsClient) listWorkflowsNextResults(ctx context.Context, lastResults WorkflowEnvelopeCollection) (result WorkflowEnvelopeCollection, err error) { + req, err := lastResults.workflowEnvelopeCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listWorkflowsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListWorkflowsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listWorkflowsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListWorkflowsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "listWorkflowsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListWorkflowsComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListWorkflowsComplete(ctx context.Context, resourceGroupName string, name string) (result WorkflowEnvelopeCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListWorkflows") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListWorkflows(ctx, resourceGroupName, name) + return +} + +// ListWorkflowsConnections sends the list workflows connections request. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +func (client AppsClient) ListWorkflowsConnections(ctx context.Context, resourceGroupName string, name string) (result WorkflowEnvelope, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListWorkflowsConnections") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListWorkflowsConnections", err.Error()) + } + + req, err := client.ListWorkflowsConnectionsPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWorkflowsConnections", nil, "Failure preparing request") + return + } + + resp, err := client.ListWorkflowsConnectionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWorkflowsConnections", resp, "Failure sending request") + return + } + + result, err = client.ListWorkflowsConnectionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWorkflowsConnections", resp, "Failure responding to request") + return + } + + return +} + +// ListWorkflowsConnectionsPreparer prepares the ListWorkflowsConnections request. +func (client AppsClient) ListWorkflowsConnectionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listWorkflowsConnections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListWorkflowsConnectionsSender sends the ListWorkflowsConnections request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListWorkflowsConnectionsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListWorkflowsConnectionsResponder handles the response to the ListWorkflowsConnections request. The method always +// closes the http.Response Body. +func (client AppsClient) ListWorkflowsConnectionsResponder(resp *http.Response) (result WorkflowEnvelope, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListWorkflowsConnectionsSlot sends the list workflows connections slot request. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// slot - name of the deployment slot. +func (client AppsClient) ListWorkflowsConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result WorkflowEnvelope, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListWorkflowsConnectionsSlot") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListWorkflowsConnectionsSlot", err.Error()) + } + + req, err := client.ListWorkflowsConnectionsSlotPreparer(ctx, resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWorkflowsConnectionsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListWorkflowsConnectionsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWorkflowsConnectionsSlot", resp, "Failure sending request") + return + } + + result, err = client.ListWorkflowsConnectionsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWorkflowsConnectionsSlot", resp, "Failure responding to request") + return + } + + return +} + +// ListWorkflowsConnectionsSlotPreparer prepares the ListWorkflowsConnectionsSlot request. +func (client AppsClient) ListWorkflowsConnectionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listWorkflowsConnections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListWorkflowsConnectionsSlotSender sends the ListWorkflowsConnectionsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListWorkflowsConnectionsSlotSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListWorkflowsConnectionsSlotResponder handles the response to the ListWorkflowsConnectionsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListWorkflowsConnectionsSlotResponder(resp *http.Response) (result WorkflowEnvelope, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // MigrateMySQL description for Migrates a local (in-app) MySql database to a remote MySql database. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. @@ -29369,7 +30856,7 @@ func (client AppsClient) MigrateMySQLPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -29465,7 +30952,7 @@ func (client AppsClient) MigrateStoragePreparer(ctx context.Context, subscriptio "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, "subscriptionName": autorest.Encode("query", subscriptionName), @@ -29564,7 +31051,7 @@ func (client AppsClient) PutPrivateAccessVnetPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -29654,7 +31141,7 @@ func (client AppsClient) PutPrivateAccessVnetSlotPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -29742,7 +31229,7 @@ func (client AppsClient) RecoverSiteConfigurationSnapshotPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -29830,7 +31317,7 @@ func (client AppsClient) RecoverSiteConfigurationSnapshotSlotPreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -29914,7 +31401,7 @@ func (client AppsClient) ResetProductionSlotConfigPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -30001,7 +31488,7 @@ func (client AppsClient) ResetSlotConfigurationSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -30088,7 +31575,7 @@ func (client AppsClient) RestartPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -30183,7 +31670,7 @@ func (client AppsClient) RestartSlotPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -30273,7 +31760,7 @@ func (client AppsClient) RestorePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -30367,7 +31854,7 @@ func (client AppsClient) RestoreFromBackupBlobPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -30464,7 +31951,7 @@ func (client AppsClient) RestoreFromBackupBlobSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -30553,7 +32040,7 @@ func (client AppsClient) RestoreFromDeletedAppPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -30644,7 +32131,7 @@ func (client AppsClient) RestoreFromDeletedAppSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -30743,7 +32230,7 @@ func (client AppsClient) RestoreSlotPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -30836,7 +32323,7 @@ func (client AppsClient) RestoreSnapshotPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -30931,7 +32418,7 @@ func (client AppsClient) RestoreSnapshotSlotPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -31028,7 +32515,7 @@ func (client AppsClient) RunTriggeredWebJobPreparer(ctx context.Context, resourc "webJobName": autorest.Encode("path", webJobName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -31115,7 +32602,7 @@ func (client AppsClient) RunTriggeredWebJobSlotPreparer(ctx context.Context, res "webJobName": autorest.Encode("path", webJobName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -31198,7 +32685,7 @@ func (client AppsClient) StartPreparer(ctx context.Context, resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -31283,7 +32770,7 @@ func (client AppsClient) StartContinuousWebJobPreparer(ctx context.Context, reso "webJobName": autorest.Encode("path", webJobName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -31371,7 +32858,7 @@ func (client AppsClient) StartContinuousWebJobSlotPreparer(ctx context.Context, "webJobName": autorest.Encode("path", webJobName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -31450,7 +32937,7 @@ func (client AppsClient) StartNetworkTracePreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -31551,7 +33038,7 @@ func (client AppsClient) StartNetworkTraceSlotPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -31656,7 +33143,7 @@ func (client AppsClient) StartSlotPreparer(ctx context.Context, resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -31742,7 +33229,7 @@ func (client AppsClient) StartWebSiteNetworkTracePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -31831,7 +33318,7 @@ func (client AppsClient) StartWebSiteNetworkTraceOperationPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -31932,7 +33419,7 @@ func (client AppsClient) StartWebSiteNetworkTraceOperationSlotPreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -32040,7 +33527,7 @@ func (client AppsClient) StartWebSiteNetworkTraceSlotPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -32133,7 +33620,7 @@ func (client AppsClient) StopPreparer(ctx context.Context, resourceGroupName str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -32218,7 +33705,7 @@ func (client AppsClient) StopContinuousWebJobPreparer(ctx context.Context, resou "webJobName": autorest.Encode("path", webJobName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -32306,7 +33793,7 @@ func (client AppsClient) StopContinuousWebJobSlotPreparer(ctx context.Context, r "webJobName": autorest.Encode("path", webJobName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -32389,7 +33876,7 @@ func (client AppsClient) StopNetworkTracePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -32474,7 +33961,7 @@ func (client AppsClient) StopNetworkTraceSlotPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -32559,7 +34046,7 @@ func (client AppsClient) StopSlotPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -32642,7 +34129,7 @@ func (client AppsClient) StopWebSiteNetworkTracePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -32727,7 +34214,7 @@ func (client AppsClient) StopWebSiteNetworkTraceSlotPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -32809,7 +34296,7 @@ func (client AppsClient) SwapSlotSlotPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -32901,7 +34388,7 @@ func (client AppsClient) SwapSlotWithProductionPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -32943,13 +34430,13 @@ func (client AppsClient) SwapSlotWithProductionResponder(resp *http.Response) (r return } -// SyncFunctions description for Syncs function trigger metadata to the management database +// SyncFunctionTriggers description for Syncs function trigger metadata to the management database // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) SyncFunctions(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { +func (client AppsClient) SyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctions") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctionTriggers") defer func() { sc := -1 if result.Response != nil { @@ -32963,40 +34450,40 @@ func (client AppsClient) SyncFunctions(ctx context.Context, resourceGroupName st Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "SyncFunctions", err.Error()) + return result, validation.NewError("web.AppsClient", "SyncFunctionTriggers", err.Error()) } - req, err := client.SyncFunctionsPreparer(ctx, resourceGroupName, name) + req, err := client.SyncFunctionTriggersPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctions", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggers", nil, "Failure preparing request") return } - resp, err := client.SyncFunctionsSender(req) + resp, err := client.SyncFunctionTriggersSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctions", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggers", resp, "Failure sending request") return } - result, err = client.SyncFunctionsResponder(resp) + result, err = client.SyncFunctionTriggersResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctions", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggers", resp, "Failure responding to request") return } return } -// SyncFunctionsPreparer prepares the SyncFunctions request. -func (client AppsClient) SyncFunctionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// SyncFunctionTriggersPreparer prepares the SyncFunctionTriggers request. +func (client AppsClient) SyncFunctionTriggersPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -33004,20 +34491,20 @@ func (client AppsClient) SyncFunctionsPreparer(ctx context.Context, resourceGrou preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// SyncFunctionsSender sends the SyncFunctions request. The method will close the +// SyncFunctionTriggersSender sends the SyncFunctionTriggers request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) SyncFunctionsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) SyncFunctionTriggersSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// SyncFunctionsResponder handles the response to the SyncFunctions request. The method always +// SyncFunctionTriggersResponder handles the response to the SyncFunctionTriggers request. The method always // closes the http.Response Body. -func (client AppsClient) SyncFunctionsResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) SyncFunctionTriggersResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), @@ -33026,14 +34513,14 @@ func (client AppsClient) SyncFunctionsResponder(resp *http.Response) (result aut return } -// SyncFunctionsSlot description for Syncs function trigger metadata to the management database +// SyncFunctionTriggersSlot description for Syncs function trigger metadata to the management database // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. // slot - name of the deployment slot. -func (client AppsClient) SyncFunctionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { +func (client AppsClient) SyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctionsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctionTriggersSlot") defer func() { sc := -1 if result.Response != nil { @@ -33047,33 +34534,33 @@ func (client AppsClient) SyncFunctionsSlot(ctx context.Context, resourceGroupNam Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "SyncFunctionsSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "SyncFunctionTriggersSlot", err.Error()) } - req, err := client.SyncFunctionsSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.SyncFunctionTriggersSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggersSlot", nil, "Failure preparing request") return } - resp, err := client.SyncFunctionsSlotSender(req) + resp, err := client.SyncFunctionTriggersSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionsSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggersSlot", resp, "Failure sending request") return } - result, err = client.SyncFunctionsSlotResponder(resp) + result, err = client.SyncFunctionTriggersSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggersSlot", resp, "Failure responding to request") return } return } -// SyncFunctionsSlotPreparer prepares the SyncFunctionsSlot request. -func (client AppsClient) SyncFunctionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// SyncFunctionTriggersSlotPreparer prepares the SyncFunctionTriggersSlot request. +func (client AppsClient) SyncFunctionTriggersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -33081,7 +34568,7 @@ func (client AppsClient) SyncFunctionsSlotPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -33089,20 +34576,20 @@ func (client AppsClient) SyncFunctionsSlotPreparer(ctx context.Context, resource preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// SyncFunctionsSlotSender sends the SyncFunctionsSlot request. The method will close the +// SyncFunctionTriggersSlotSender sends the SyncFunctionTriggersSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) SyncFunctionsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) SyncFunctionTriggersSlotSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// SyncFunctionsSlotResponder handles the response to the SyncFunctionsSlot request. The method always +// SyncFunctionTriggersSlotResponder handles the response to the SyncFunctionTriggersSlot request. The method always // closes the http.Response Body. -func (client AppsClient) SyncFunctionsSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) SyncFunctionTriggersSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), @@ -33111,13 +34598,13 @@ func (client AppsClient) SyncFunctionsSlotResponder(resp *http.Response) (result return } -// SyncFunctionTriggers description for Syncs function trigger metadata to the management database +// SyncFunctions description for Syncs function trigger metadata to the management database // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) SyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { +func (client AppsClient) SyncFunctions(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctionTriggers") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctions") defer func() { sc := -1 if result.Response != nil { @@ -33131,40 +34618,40 @@ func (client AppsClient) SyncFunctionTriggers(ctx context.Context, resourceGroup Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "SyncFunctionTriggers", err.Error()) + return result, validation.NewError("web.AppsClient", "SyncFunctions", err.Error()) } - req, err := client.SyncFunctionTriggersPreparer(ctx, resourceGroupName, name) + req, err := client.SyncFunctionsPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggers", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctions", nil, "Failure preparing request") return } - resp, err := client.SyncFunctionTriggersSender(req) + resp, err := client.SyncFunctionsSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggers", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctions", resp, "Failure sending request") return } - result, err = client.SyncFunctionTriggersResponder(resp) + result, err = client.SyncFunctionsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggers", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctions", resp, "Failure responding to request") return } return } -// SyncFunctionTriggersPreparer prepares the SyncFunctionTriggers request. -func (client AppsClient) SyncFunctionTriggersPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// SyncFunctionsPreparer prepares the SyncFunctions request. +func (client AppsClient) SyncFunctionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -33172,20 +34659,20 @@ func (client AppsClient) SyncFunctionTriggersPreparer(ctx context.Context, resou preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// SyncFunctionTriggersSender sends the SyncFunctionTriggers request. The method will close the +// SyncFunctionsSender sends the SyncFunctions request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) SyncFunctionTriggersSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) SyncFunctionsSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// SyncFunctionTriggersResponder handles the response to the SyncFunctionTriggers request. The method always +// SyncFunctionsResponder handles the response to the SyncFunctions request. The method always // closes the http.Response Body. -func (client AppsClient) SyncFunctionTriggersResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) SyncFunctionsResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), @@ -33194,14 +34681,14 @@ func (client AppsClient) SyncFunctionTriggersResponder(resp *http.Response) (res return } -// SyncFunctionTriggersSlot description for Syncs function trigger metadata to the management database +// SyncFunctionsSlot description for Syncs function trigger metadata to the management database // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. // slot - name of the deployment slot. -func (client AppsClient) SyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { +func (client AppsClient) SyncFunctionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctionTriggersSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctionsSlot") defer func() { sc := -1 if result.Response != nil { @@ -33215,33 +34702,33 @@ func (client AppsClient) SyncFunctionTriggersSlot(ctx context.Context, resourceG Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "SyncFunctionTriggersSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "SyncFunctionsSlot", err.Error()) } - req, err := client.SyncFunctionTriggersSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.SyncFunctionsSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggersSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionsSlot", nil, "Failure preparing request") return } - resp, err := client.SyncFunctionTriggersSlotSender(req) + resp, err := client.SyncFunctionsSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggersSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionsSlot", resp, "Failure sending request") return } - result, err = client.SyncFunctionTriggersSlotResponder(resp) + result, err = client.SyncFunctionsSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggersSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionsSlot", resp, "Failure responding to request") return } return } -// SyncFunctionTriggersSlotPreparer prepares the SyncFunctionTriggersSlot request. -func (client AppsClient) SyncFunctionTriggersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// SyncFunctionsSlotPreparer prepares the SyncFunctionsSlot request. +func (client AppsClient) SyncFunctionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -33249,7 +34736,7 @@ func (client AppsClient) SyncFunctionTriggersSlotPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -33257,20 +34744,20 @@ func (client AppsClient) SyncFunctionTriggersSlotPreparer(ctx context.Context, r preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// SyncFunctionTriggersSlotSender sends the SyncFunctionTriggersSlot request. The method will close the +// SyncFunctionsSlotSender sends the SyncFunctionsSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) SyncFunctionTriggersSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) SyncFunctionsSlotSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// SyncFunctionTriggersSlotResponder handles the response to the SyncFunctionTriggersSlot request. The method always +// SyncFunctionsSlotResponder handles the response to the SyncFunctionsSlot request. The method always // closes the http.Response Body. -func (client AppsClient) SyncFunctionTriggersSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) SyncFunctionsSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), @@ -33332,7 +34819,7 @@ func (client AppsClient) SyncRepositoryPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -33417,7 +34904,7 @@ func (client AppsClient) SyncRepositorySlotPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -33503,7 +34990,7 @@ func (client AppsClient) UpdatePreparer(ctx context.Context, resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -33590,7 +35077,7 @@ func (client AppsClient) UpdateApplicationSettingsPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -33680,7 +35167,7 @@ func (client AppsClient) UpdateApplicationSettingsSlotPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -33767,7 +35254,7 @@ func (client AppsClient) UpdateAuthSettingsPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -33856,7 +35343,7 @@ func (client AppsClient) UpdateAuthSettingsSlotPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -33944,7 +35431,7 @@ func (client AppsClient) UpdateAuthSettingsV2Preparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -34034,7 +35521,7 @@ func (client AppsClient) UpdateAuthSettingsV2SlotPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -34121,7 +35608,7 @@ func (client AppsClient) UpdateAzureStorageAccountsPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -34211,7 +35698,7 @@ func (client AppsClient) UpdateAzureStorageAccountsSlotPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -34307,7 +35794,7 @@ func (client AppsClient) UpdateBackupConfigurationPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -34406,7 +35893,7 @@ func (client AppsClient) UpdateBackupConfigurationSlotPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -34493,7 +35980,7 @@ func (client AppsClient) UpdateConfigurationPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -34583,7 +36070,7 @@ func (client AppsClient) UpdateConfigurationSlotPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -34670,7 +36157,7 @@ func (client AppsClient) UpdateConnectionStringsPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -34760,7 +36247,7 @@ func (client AppsClient) UpdateConnectionStringsSlotPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -34863,7 +36350,7 @@ func (client AppsClient) UpdateDiagnosticLogsConfigPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -34969,7 +36456,7 @@ func (client AppsClient) UpdateDiagnosticLogsConfigSlotPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -35059,7 +36546,7 @@ func (client AppsClient) UpdateDomainOwnershipIdentifierPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -35152,7 +36639,7 @@ func (client AppsClient) UpdateDomainOwnershipIdentifierSlotPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -35241,7 +36728,7 @@ func (client AppsClient) UpdateFtpAllowedPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -35331,7 +36818,7 @@ func (client AppsClient) UpdateFtpAllowedSlotPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -35422,7 +36909,7 @@ func (client AppsClient) UpdateHybridConnectionPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -35515,7 +37002,7 @@ func (client AppsClient) UpdateHybridConnectionSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -35602,7 +37089,7 @@ func (client AppsClient) UpdateMetadataPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -35692,7 +37179,7 @@ func (client AppsClient) UpdateMetadataSlotPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -35781,7 +37268,7 @@ func (client AppsClient) UpdatePremierAddOnPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -35873,7 +37360,7 @@ func (client AppsClient) UpdatePremierAddOnSlotPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -35963,7 +37450,7 @@ func (client AppsClient) UpdateRelayServiceConnectionPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -36056,7 +37543,7 @@ func (client AppsClient) UpdateRelayServiceConnectionSlotPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -36145,7 +37632,7 @@ func (client AppsClient) UpdateScmAllowedPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -36235,7 +37722,7 @@ func (client AppsClient) UpdateScmAllowedSlotPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -36325,7 +37812,7 @@ func (client AppsClient) UpdateSitePushSettingsPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -36417,7 +37904,7 @@ func (client AppsClient) UpdateSitePushSettingsSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -36509,7 +37996,7 @@ func (client AppsClient) UpdateSlotPreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -36597,7 +38084,7 @@ func (client AppsClient) UpdateSlotConfigurationNamesPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -36684,7 +38171,7 @@ func (client AppsClient) UpdateSourceControlPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -36774,7 +38261,7 @@ func (client AppsClient) UpdateSourceControlSlotPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -36864,7 +38351,7 @@ func (client AppsClient) UpdateSwiftVirtualNetworkConnectionWithCheckPreparer(ct "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -36957,7 +38444,7 @@ func (client AppsClient) UpdateSwiftVirtualNetworkConnectionWithCheckSlotPrepare "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -37047,7 +38534,7 @@ func (client AppsClient) UpdateVnetConnectionPreparer(ctx context.Context, resou "vnetName": autorest.Encode("path", vnetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -37139,7 +38626,7 @@ func (client AppsClient) UpdateVnetConnectionGatewayPreparer(ctx context.Context "vnetName": autorest.Encode("path", vnetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -37234,7 +38721,7 @@ func (client AppsClient) UpdateVnetConnectionGatewaySlotPreparer(ctx context.Con "vnetName": autorest.Encode("path", vnetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -37327,7 +38814,7 @@ func (client AppsClient) UpdateVnetConnectionSlotPreparer(ctx context.Context, r "vnetName": autorest.Encode("path", vnetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/appservicecertificateorders.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/appservicecertificateorders.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/appservicecertificateorders.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/appservicecertificateorders.go index 3b852f77db6c..481ab66f45e2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/appservicecertificateorders.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/appservicecertificateorders.go @@ -8,11 +8,12 @@ package web import ( "context" + "net/http" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" - "net/http" ) // AppServiceCertificateOrdersClient is the webSite Management Client @@ -79,7 +80,7 @@ func (client AppServiceCertificateOrdersClient) CreateOrUpdatePreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -171,7 +172,7 @@ func (client AppServiceCertificateOrdersClient) CreateOrUpdateCertificatePrepare "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -267,7 +268,7 @@ func (client AppServiceCertificateOrdersClient) DeletePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -352,7 +353,7 @@ func (client AppServiceCertificateOrdersClient) DeleteCertificatePreparer(ctx co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -435,7 +436,7 @@ func (client AppServiceCertificateOrdersClient) GetPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -521,7 +522,7 @@ func (client AppServiceCertificateOrdersClient) GetCertificatePreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -597,7 +598,7 @@ func (client AppServiceCertificateOrdersClient) ListPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -721,7 +722,7 @@ func (client AppServiceCertificateOrdersClient) ListByResourceGroupPreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -847,7 +848,7 @@ func (client AppServiceCertificateOrdersClient) ListCertificatesPreparer(ctx con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -969,7 +970,7 @@ func (client AppServiceCertificateOrdersClient) ReissuePreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1055,7 +1056,7 @@ func (client AppServiceCertificateOrdersClient) RenewPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1140,7 +1141,7 @@ func (client AppServiceCertificateOrdersClient) ResendEmailPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1225,7 +1226,7 @@ func (client AppServiceCertificateOrdersClient) ResendRequestEmailsPreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1310,7 +1311,7 @@ func (client AppServiceCertificateOrdersClient) RetrieveCertificateActionsPrepar "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1394,7 +1395,7 @@ func (client AppServiceCertificateOrdersClient) RetrieveCertificateEmailHistoryP "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1484,7 +1485,7 @@ func (client AppServiceCertificateOrdersClient) RetrieveSiteSealPreparer(ctx con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1571,7 +1572,7 @@ func (client AppServiceCertificateOrdersClient) UpdatePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1660,7 +1661,7 @@ func (client AppServiceCertificateOrdersClient) UpdateCertificatePreparer(ctx co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1735,7 +1736,7 @@ func (client AppServiceCertificateOrdersClient) ValidatePurchaseInformationPrepa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1820,7 +1821,7 @@ func (client AppServiceCertificateOrdersClient) VerifyDomainOwnershipPreparer(ct "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/appserviceenvironments.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/appserviceenvironments.go similarity index 90% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/appserviceenvironments.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/appserviceenvironments.go index 1c51249c605d..825fbefb9888 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/appserviceenvironments.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/appserviceenvironments.go @@ -8,11 +8,12 @@ package web import ( "context" + "net/http" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" - "net/http" ) // AppServiceEnvironmentsClient is the webSite Management Client @@ -79,7 +80,7 @@ func (client AppServiceEnvironmentsClient) ApproveOrRejectPrivateEndpointConnect "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -171,7 +172,7 @@ func (client AppServiceEnvironmentsClient) ChangeVnetPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -309,7 +310,7 @@ func (client AppServiceEnvironmentsClient) CreateOrUpdatePreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -399,7 +400,7 @@ func (client AppServiceEnvironmentsClient) CreateOrUpdateMultiRolePoolPreparer(c "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -491,7 +492,7 @@ func (client AppServiceEnvironmentsClient) CreateOrUpdateWorkerPoolPreparer(ctx "workerPoolName": autorest.Encode("path", workerPoolName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -582,7 +583,7 @@ func (client AppServiceEnvironmentsClient) DeletePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -625,6 +626,90 @@ func (client AppServiceEnvironmentsClient) DeleteResponder(resp *http.Response) return } +// DeleteAseCustomDNSSuffixConfiguration sends the delete ase custom dns suffix configuration request. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the App Service Environment. +func (client AppServiceEnvironmentsClient) DeleteAseCustomDNSSuffixConfiguration(ctx context.Context, resourceGroupName string, name string) (result SetObject, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.DeleteAseCustomDNSSuffixConfiguration") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppServiceEnvironmentsClient", "DeleteAseCustomDNSSuffixConfiguration", err.Error()) + } + + req, err := client.DeleteAseCustomDNSSuffixConfigurationPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "DeleteAseCustomDNSSuffixConfiguration", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteAseCustomDNSSuffixConfigurationSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "DeleteAseCustomDNSSuffixConfiguration", resp, "Failure sending request") + return + } + + result, err = client.DeleteAseCustomDNSSuffixConfigurationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "DeleteAseCustomDNSSuffixConfiguration", resp, "Failure responding to request") + return + } + + return +} + +// DeleteAseCustomDNSSuffixConfigurationPreparer prepares the DeleteAseCustomDNSSuffixConfiguration request. +func (client AppServiceEnvironmentsClient) DeleteAseCustomDNSSuffixConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteAseCustomDNSSuffixConfigurationSender sends the DeleteAseCustomDNSSuffixConfiguration request. The method will close the +// http.Response Body if it receives an error. +func (client AppServiceEnvironmentsClient) DeleteAseCustomDNSSuffixConfigurationSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteAseCustomDNSSuffixConfigurationResponder handles the response to the DeleteAseCustomDNSSuffixConfiguration request. The method always +// closes the http.Response Body. +func (client AppServiceEnvironmentsClient) DeleteAseCustomDNSSuffixConfigurationResponder(resp *http.Response) (result SetObject, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // DeletePrivateEndpointConnection description for Deletes a private endpoint connection // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. @@ -672,7 +757,7 @@ func (client AppServiceEnvironmentsClient) DeletePrivateEndpointConnectionPrepar "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -766,7 +851,7 @@ func (client AppServiceEnvironmentsClient) GetPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -797,6 +882,90 @@ func (client AppServiceEnvironmentsClient) GetResponder(resp *http.Response) (re return } +// GetAseCustomDNSSuffixConfiguration sends the get ase custom dns suffix configuration request. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the App Service Environment. +func (client AppServiceEnvironmentsClient) GetAseCustomDNSSuffixConfiguration(ctx context.Context, resourceGroupName string, name string) (result CustomDNSSuffixConfiguration, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.GetAseCustomDNSSuffixConfiguration") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppServiceEnvironmentsClient", "GetAseCustomDNSSuffixConfiguration", err.Error()) + } + + req, err := client.GetAseCustomDNSSuffixConfigurationPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "GetAseCustomDNSSuffixConfiguration", nil, "Failure preparing request") + return + } + + resp, err := client.GetAseCustomDNSSuffixConfigurationSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "GetAseCustomDNSSuffixConfiguration", resp, "Failure sending request") + return + } + + result, err = client.GetAseCustomDNSSuffixConfigurationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "GetAseCustomDNSSuffixConfiguration", resp, "Failure responding to request") + return + } + + return +} + +// GetAseCustomDNSSuffixConfigurationPreparer prepares the GetAseCustomDNSSuffixConfiguration request. +func (client AppServiceEnvironmentsClient) GetAseCustomDNSSuffixConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetAseCustomDNSSuffixConfigurationSender sends the GetAseCustomDNSSuffixConfiguration request. The method will close the +// http.Response Body if it receives an error. +func (client AppServiceEnvironmentsClient) GetAseCustomDNSSuffixConfigurationSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetAseCustomDNSSuffixConfigurationResponder handles the response to the GetAseCustomDNSSuffixConfiguration request. The method always +// closes the http.Response Body. +func (client AppServiceEnvironmentsClient) GetAseCustomDNSSuffixConfigurationResponder(resp *http.Response) (result CustomDNSSuffixConfiguration, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // GetAseV3NetworkingConfiguration description for Get networking configuration of an App Service Environment // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. @@ -850,7 +1019,7 @@ func (client AppServiceEnvironmentsClient) GetAseV3NetworkingConfigurationPrepar "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -936,7 +1105,7 @@ func (client AppServiceEnvironmentsClient) GetDiagnosticsItemPreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1026,7 +1195,7 @@ func (client AppServiceEnvironmentsClient) GetInboundNetworkDependenciesEndpoint "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1147,7 +1316,7 @@ func (client AppServiceEnvironmentsClient) GetMultiRolePoolPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1237,7 +1406,7 @@ func (client AppServiceEnvironmentsClient) GetOutboundNetworkDependenciesEndpoin "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1360,7 +1529,7 @@ func (client AppServiceEnvironmentsClient) GetPrivateEndpointConnectionPreparer( "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1450,7 +1619,7 @@ func (client AppServiceEnvironmentsClient) GetPrivateEndpointConnectionListPrepa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1571,7 +1740,7 @@ func (client AppServiceEnvironmentsClient) GetPrivateLinkResourcesPreparer(ctx c "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1655,7 +1824,7 @@ func (client AppServiceEnvironmentsClient) GetVipInfoPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1741,7 +1910,7 @@ func (client AppServiceEnvironmentsClient) GetWorkerPoolPreparer(ctx context.Con "workerPoolName": autorest.Encode("path", workerPoolName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1817,7 +1986,7 @@ func (client AppServiceEnvironmentsClient) ListPreparer(ctx context.Context) (*h "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1943,7 +2112,7 @@ func (client AppServiceEnvironmentsClient) ListAppServicePlansPreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2067,7 +2236,7 @@ func (client AppServiceEnvironmentsClient) ListByResourceGroupPreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2193,7 +2362,7 @@ func (client AppServiceEnvironmentsClient) ListCapacitiesPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2314,7 +2483,7 @@ func (client AppServiceEnvironmentsClient) ListDiagnosticsPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2404,7 +2573,7 @@ func (client AppServiceEnvironmentsClient) ListMultiRoleMetricDefinitionsPrepare "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2533,7 +2702,7 @@ func (client AppServiceEnvironmentsClient) ListMultiRolePoolInstanceMetricDefini "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2601,17 +2770,17 @@ func (client AppServiceEnvironmentsClient) ListMultiRolePoolInstanceMetricDefini return } -// ListMultiRolePools description for Get all multi-role pools. +// ListMultiRolePoolSkus description for Get available SKUs for scaling a multi-role pool. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the App Service Environment. -func (client AppServiceEnvironmentsClient) ListMultiRolePools(ctx context.Context, resourceGroupName string, name string) (result WorkerPoolCollectionPage, err error) { +func (client AppServiceEnvironmentsClient) ListMultiRolePoolSkus(ctx context.Context, resourceGroupName string, name string) (result SkuInfoCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.ListMultiRolePools") + ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.ListMultiRolePoolSkus") defer func() { sc := -1 - if result.wpc.Response.Response != nil { - sc = result.wpc.Response.Response.StatusCode + if result.sic.Response.Response != nil { + sc = result.sic.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -2621,29 +2790,29 @@ func (client AppServiceEnvironmentsClient) ListMultiRolePools(ctx context.Contex Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppServiceEnvironmentsClient", "ListMultiRolePools", err.Error()) + return result, validation.NewError("web.AppServiceEnvironmentsClient", "ListMultiRolePoolSkus", err.Error()) } - result.fn = client.listMultiRolePoolsNextResults - req, err := client.ListMultiRolePoolsPreparer(ctx, resourceGroupName, name) + result.fn = client.listMultiRolePoolSkusNextResults + req, err := client.ListMultiRolePoolSkusPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListMultiRolePools", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListMultiRolePoolSkus", nil, "Failure preparing request") return } - resp, err := client.ListMultiRolePoolsSender(req) + resp, err := client.ListMultiRolePoolSkusSender(req) if err != nil { - result.wpc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListMultiRolePools", resp, "Failure sending request") + result.sic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListMultiRolePoolSkus", resp, "Failure sending request") return } - result.wpc, err = client.ListMultiRolePoolsResponder(resp) + result.sic, err = client.ListMultiRolePoolSkusResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListMultiRolePools", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListMultiRolePoolSkus", resp, "Failure responding to request") return } - if result.wpc.hasNextLink() && result.wpc.IsEmpty() { + if result.sic.hasNextLink() && result.sic.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -2651,15 +2820,15 @@ func (client AppServiceEnvironmentsClient) ListMultiRolePools(ctx context.Contex return } -// ListMultiRolePoolsPreparer prepares the ListMultiRolePools request. -func (client AppServiceEnvironmentsClient) ListMultiRolePoolsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// ListMultiRolePoolSkusPreparer prepares the ListMultiRolePoolSkus request. +func (client AppServiceEnvironmentsClient) ListMultiRolePoolSkusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2667,20 +2836,20 @@ func (client AppServiceEnvironmentsClient) ListMultiRolePoolsPreparer(ctx contex preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListMultiRolePoolsSender sends the ListMultiRolePools request. The method will close the +// ListMultiRolePoolSkusSender sends the ListMultiRolePoolSkus request. The method will close the // http.Response Body if it receives an error. -func (client AppServiceEnvironmentsClient) ListMultiRolePoolsSender(req *http.Request) (*http.Response, error) { +func (client AppServiceEnvironmentsClient) ListMultiRolePoolSkusSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListMultiRolePoolsResponder handles the response to the ListMultiRolePools request. The method always +// ListMultiRolePoolSkusResponder handles the response to the ListMultiRolePoolSkus request. The method always // closes the http.Response Body. -func (client AppServiceEnvironmentsClient) ListMultiRolePoolsResponder(resp *http.Response) (result WorkerPoolCollection, err error) { +func (client AppServiceEnvironmentsClient) ListMultiRolePoolSkusResponder(resp *http.Response) (result SkuInfoCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -2690,31 +2859,31 @@ func (client AppServiceEnvironmentsClient) ListMultiRolePoolsResponder(resp *htt return } -// listMultiRolePoolsNextResults retrieves the next set of results, if any. -func (client AppServiceEnvironmentsClient) listMultiRolePoolsNextResults(ctx context.Context, lastResults WorkerPoolCollection) (result WorkerPoolCollection, err error) { - req, err := lastResults.workerPoolCollectionPreparer(ctx) +// listMultiRolePoolSkusNextResults retrieves the next set of results, if any. +func (client AppServiceEnvironmentsClient) listMultiRolePoolSkusNextResults(ctx context.Context, lastResults SkuInfoCollection) (result SkuInfoCollection, err error) { + req, err := lastResults.skuInfoCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listMultiRolePoolsNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listMultiRolePoolSkusNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListMultiRolePoolsSender(req) + resp, err := client.ListMultiRolePoolSkusSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listMultiRolePoolsNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listMultiRolePoolSkusNextResults", resp, "Failure sending next results request") } - result, err = client.ListMultiRolePoolsResponder(resp) + result, err = client.ListMultiRolePoolSkusResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listMultiRolePoolsNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listMultiRolePoolSkusNextResults", resp, "Failure responding to next results request") } return } -// ListMultiRolePoolsComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppServiceEnvironmentsClient) ListMultiRolePoolsComplete(ctx context.Context, resourceGroupName string, name string) (result WorkerPoolCollectionIterator, err error) { +// ListMultiRolePoolSkusComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppServiceEnvironmentsClient) ListMultiRolePoolSkusComplete(ctx context.Context, resourceGroupName string, name string) (result SkuInfoCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.ListMultiRolePools") + ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.ListMultiRolePoolSkus") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -2723,21 +2892,21 @@ func (client AppServiceEnvironmentsClient) ListMultiRolePoolsComplete(ctx contex tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListMultiRolePools(ctx, resourceGroupName, name) + result.page, err = client.ListMultiRolePoolSkus(ctx, resourceGroupName, name) return } -// ListMultiRolePoolSkus description for Get available SKUs for scaling a multi-role pool. +// ListMultiRolePools description for Get all multi-role pools. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the App Service Environment. -func (client AppServiceEnvironmentsClient) ListMultiRolePoolSkus(ctx context.Context, resourceGroupName string, name string) (result SkuInfoCollectionPage, err error) { +func (client AppServiceEnvironmentsClient) ListMultiRolePools(ctx context.Context, resourceGroupName string, name string) (result WorkerPoolCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.ListMultiRolePoolSkus") + ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.ListMultiRolePools") defer func() { sc := -1 - if result.sic.Response.Response != nil { - sc = result.sic.Response.Response.StatusCode + if result.wpc.Response.Response != nil { + sc = result.wpc.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -2747,29 +2916,29 @@ func (client AppServiceEnvironmentsClient) ListMultiRolePoolSkus(ctx context.Con Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppServiceEnvironmentsClient", "ListMultiRolePoolSkus", err.Error()) + return result, validation.NewError("web.AppServiceEnvironmentsClient", "ListMultiRolePools", err.Error()) } - result.fn = client.listMultiRolePoolSkusNextResults - req, err := client.ListMultiRolePoolSkusPreparer(ctx, resourceGroupName, name) + result.fn = client.listMultiRolePoolsNextResults + req, err := client.ListMultiRolePoolsPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListMultiRolePoolSkus", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListMultiRolePools", nil, "Failure preparing request") return } - resp, err := client.ListMultiRolePoolSkusSender(req) + resp, err := client.ListMultiRolePoolsSender(req) if err != nil { - result.sic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListMultiRolePoolSkus", resp, "Failure sending request") + result.wpc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListMultiRolePools", resp, "Failure sending request") return } - result.sic, err = client.ListMultiRolePoolSkusResponder(resp) + result.wpc, err = client.ListMultiRolePoolsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListMultiRolePoolSkus", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListMultiRolePools", resp, "Failure responding to request") return } - if result.sic.hasNextLink() && result.sic.IsEmpty() { + if result.wpc.hasNextLink() && result.wpc.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -2777,15 +2946,15 @@ func (client AppServiceEnvironmentsClient) ListMultiRolePoolSkus(ctx context.Con return } -// ListMultiRolePoolSkusPreparer prepares the ListMultiRolePoolSkus request. -func (client AppServiceEnvironmentsClient) ListMultiRolePoolSkusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// ListMultiRolePoolsPreparer prepares the ListMultiRolePools request. +func (client AppServiceEnvironmentsClient) ListMultiRolePoolsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2793,20 +2962,20 @@ func (client AppServiceEnvironmentsClient) ListMultiRolePoolSkusPreparer(ctx con preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListMultiRolePoolSkusSender sends the ListMultiRolePoolSkus request. The method will close the +// ListMultiRolePoolsSender sends the ListMultiRolePools request. The method will close the // http.Response Body if it receives an error. -func (client AppServiceEnvironmentsClient) ListMultiRolePoolSkusSender(req *http.Request) (*http.Response, error) { +func (client AppServiceEnvironmentsClient) ListMultiRolePoolsSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListMultiRolePoolSkusResponder handles the response to the ListMultiRolePoolSkus request. The method always +// ListMultiRolePoolsResponder handles the response to the ListMultiRolePools request. The method always // closes the http.Response Body. -func (client AppServiceEnvironmentsClient) ListMultiRolePoolSkusResponder(resp *http.Response) (result SkuInfoCollection, err error) { +func (client AppServiceEnvironmentsClient) ListMultiRolePoolsResponder(resp *http.Response) (result WorkerPoolCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -2816,31 +2985,31 @@ func (client AppServiceEnvironmentsClient) ListMultiRolePoolSkusResponder(resp * return } -// listMultiRolePoolSkusNextResults retrieves the next set of results, if any. -func (client AppServiceEnvironmentsClient) listMultiRolePoolSkusNextResults(ctx context.Context, lastResults SkuInfoCollection) (result SkuInfoCollection, err error) { - req, err := lastResults.skuInfoCollectionPreparer(ctx) +// listMultiRolePoolsNextResults retrieves the next set of results, if any. +func (client AppServiceEnvironmentsClient) listMultiRolePoolsNextResults(ctx context.Context, lastResults WorkerPoolCollection) (result WorkerPoolCollection, err error) { + req, err := lastResults.workerPoolCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listMultiRolePoolSkusNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listMultiRolePoolsNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListMultiRolePoolSkusSender(req) + resp, err := client.ListMultiRolePoolsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listMultiRolePoolSkusNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listMultiRolePoolsNextResults", resp, "Failure sending next results request") } - result, err = client.ListMultiRolePoolSkusResponder(resp) + result, err = client.ListMultiRolePoolsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listMultiRolePoolSkusNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listMultiRolePoolsNextResults", resp, "Failure responding to next results request") } return } -// ListMultiRolePoolSkusComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppServiceEnvironmentsClient) ListMultiRolePoolSkusComplete(ctx context.Context, resourceGroupName string, name string) (result SkuInfoCollectionIterator, err error) { +// ListMultiRolePoolsComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppServiceEnvironmentsClient) ListMultiRolePoolsComplete(ctx context.Context, resourceGroupName string, name string) (result WorkerPoolCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.ListMultiRolePoolSkus") + ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.ListMultiRolePools") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -2849,7 +3018,7 @@ func (client AppServiceEnvironmentsClient) ListMultiRolePoolSkusComplete(ctx con tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListMultiRolePoolSkus(ctx, resourceGroupName, name) + result.page, err = client.ListMultiRolePools(ctx, resourceGroupName, name) return } @@ -2911,7 +3080,7 @@ func (client AppServiceEnvironmentsClient) ListMultiRoleUsagesPreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -3032,7 +3201,7 @@ func (client AppServiceEnvironmentsClient) ListOperationsPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -3124,7 +3293,7 @@ func (client AppServiceEnvironmentsClient) ListUsagesPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -3254,7 +3423,7 @@ func (client AppServiceEnvironmentsClient) ListWebAppsPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -3386,7 +3555,7 @@ func (client AppServiceEnvironmentsClient) ListWebWorkerMetricDefinitionsPrepare "workerPoolName": autorest.Encode("path", workerPoolName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -3514,7 +3683,7 @@ func (client AppServiceEnvironmentsClient) ListWebWorkerUsagesPreparer(ctx conte "workerPoolName": autorest.Encode("path", workerPoolName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -3645,7 +3814,7 @@ func (client AppServiceEnvironmentsClient) ListWorkerPoolInstanceMetricDefinitio "workerPoolName": autorest.Encode("path", workerPoolName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -3713,17 +3882,18 @@ func (client AppServiceEnvironmentsClient) ListWorkerPoolInstanceMetricDefinitio return } -// ListWorkerPools description for Get all worker pools of an App Service Environment. +// ListWorkerPoolSkus description for Get available SKUs for scaling a worker pool. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the App Service Environment. -func (client AppServiceEnvironmentsClient) ListWorkerPools(ctx context.Context, resourceGroupName string, name string) (result WorkerPoolCollectionPage, err error) { +// workerPoolName - name of the worker pool. +func (client AppServiceEnvironmentsClient) ListWorkerPoolSkus(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result SkuInfoCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.ListWorkerPools") + ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.ListWorkerPoolSkus") defer func() { sc := -1 - if result.wpc.Response.Response != nil { - sc = result.wpc.Response.Response.StatusCode + if result.sic.Response.Response != nil { + sc = result.sic.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3733,29 +3903,29 @@ func (client AppServiceEnvironmentsClient) ListWorkerPools(ctx context.Context, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppServiceEnvironmentsClient", "ListWorkerPools", err.Error()) + return result, validation.NewError("web.AppServiceEnvironmentsClient", "ListWorkerPoolSkus", err.Error()) } - result.fn = client.listWorkerPoolsNextResults - req, err := client.ListWorkerPoolsPreparer(ctx, resourceGroupName, name) + result.fn = client.listWorkerPoolSkusNextResults + req, err := client.ListWorkerPoolSkusPreparer(ctx, resourceGroupName, name, workerPoolName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListWorkerPools", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListWorkerPoolSkus", nil, "Failure preparing request") return } - resp, err := client.ListWorkerPoolsSender(req) + resp, err := client.ListWorkerPoolSkusSender(req) if err != nil { - result.wpc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListWorkerPools", resp, "Failure sending request") + result.sic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListWorkerPoolSkus", resp, "Failure sending request") return } - result.wpc, err = client.ListWorkerPoolsResponder(resp) + result.sic, err = client.ListWorkerPoolSkusResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListWorkerPools", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListWorkerPoolSkus", resp, "Failure responding to request") return } - if result.wpc.hasNextLink() && result.wpc.IsEmpty() { + if result.sic.hasNextLink() && result.sic.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -3763,15 +3933,16 @@ func (client AppServiceEnvironmentsClient) ListWorkerPools(ctx context.Context, return } -// ListWorkerPoolsPreparer prepares the ListWorkerPools request. -func (client AppServiceEnvironmentsClient) ListWorkerPoolsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// ListWorkerPoolSkusPreparer prepares the ListWorkerPoolSkus request. +func (client AppServiceEnvironmentsClient) ListWorkerPoolSkusPreparer(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workerPoolName": autorest.Encode("path", workerPoolName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -3779,20 +3950,20 @@ func (client AppServiceEnvironmentsClient) ListWorkerPoolsPreparer(ctx context.C preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListWorkerPoolsSender sends the ListWorkerPools request. The method will close the +// ListWorkerPoolSkusSender sends the ListWorkerPoolSkus request. The method will close the // http.Response Body if it receives an error. -func (client AppServiceEnvironmentsClient) ListWorkerPoolsSender(req *http.Request) (*http.Response, error) { +func (client AppServiceEnvironmentsClient) ListWorkerPoolSkusSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListWorkerPoolsResponder handles the response to the ListWorkerPools request. The method always +// ListWorkerPoolSkusResponder handles the response to the ListWorkerPoolSkus request. The method always // closes the http.Response Body. -func (client AppServiceEnvironmentsClient) ListWorkerPoolsResponder(resp *http.Response) (result WorkerPoolCollection, err error) { +func (client AppServiceEnvironmentsClient) ListWorkerPoolSkusResponder(resp *http.Response) (result SkuInfoCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -3802,31 +3973,31 @@ func (client AppServiceEnvironmentsClient) ListWorkerPoolsResponder(resp *http.R return } -// listWorkerPoolsNextResults retrieves the next set of results, if any. -func (client AppServiceEnvironmentsClient) listWorkerPoolsNextResults(ctx context.Context, lastResults WorkerPoolCollection) (result WorkerPoolCollection, err error) { - req, err := lastResults.workerPoolCollectionPreparer(ctx) +// listWorkerPoolSkusNextResults retrieves the next set of results, if any. +func (client AppServiceEnvironmentsClient) listWorkerPoolSkusNextResults(ctx context.Context, lastResults SkuInfoCollection) (result SkuInfoCollection, err error) { + req, err := lastResults.skuInfoCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listWorkerPoolsNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listWorkerPoolSkusNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListWorkerPoolsSender(req) + resp, err := client.ListWorkerPoolSkusSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listWorkerPoolsNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listWorkerPoolSkusNextResults", resp, "Failure sending next results request") } - result, err = client.ListWorkerPoolsResponder(resp) + result, err = client.ListWorkerPoolSkusResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listWorkerPoolsNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listWorkerPoolSkusNextResults", resp, "Failure responding to next results request") } return } -// ListWorkerPoolsComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppServiceEnvironmentsClient) ListWorkerPoolsComplete(ctx context.Context, resourceGroupName string, name string) (result WorkerPoolCollectionIterator, err error) { +// ListWorkerPoolSkusComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppServiceEnvironmentsClient) ListWorkerPoolSkusComplete(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result SkuInfoCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.ListWorkerPools") + ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.ListWorkerPoolSkus") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -3835,22 +4006,21 @@ func (client AppServiceEnvironmentsClient) ListWorkerPoolsComplete(ctx context.C tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListWorkerPools(ctx, resourceGroupName, name) + result.page, err = client.ListWorkerPoolSkus(ctx, resourceGroupName, name, workerPoolName) return } -// ListWorkerPoolSkus description for Get available SKUs for scaling a worker pool. +// ListWorkerPools description for Get all worker pools of an App Service Environment. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the App Service Environment. -// workerPoolName - name of the worker pool. -func (client AppServiceEnvironmentsClient) ListWorkerPoolSkus(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result SkuInfoCollectionPage, err error) { +func (client AppServiceEnvironmentsClient) ListWorkerPools(ctx context.Context, resourceGroupName string, name string) (result WorkerPoolCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.ListWorkerPoolSkus") + ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.ListWorkerPools") defer func() { sc := -1 - if result.sic.Response.Response != nil { - sc = result.sic.Response.Response.StatusCode + if result.wpc.Response.Response != nil { + sc = result.wpc.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3860,29 +4030,29 @@ func (client AppServiceEnvironmentsClient) ListWorkerPoolSkus(ctx context.Contex Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppServiceEnvironmentsClient", "ListWorkerPoolSkus", err.Error()) + return result, validation.NewError("web.AppServiceEnvironmentsClient", "ListWorkerPools", err.Error()) } - result.fn = client.listWorkerPoolSkusNextResults - req, err := client.ListWorkerPoolSkusPreparer(ctx, resourceGroupName, name, workerPoolName) + result.fn = client.listWorkerPoolsNextResults + req, err := client.ListWorkerPoolsPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListWorkerPoolSkus", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListWorkerPools", nil, "Failure preparing request") return } - resp, err := client.ListWorkerPoolSkusSender(req) + resp, err := client.ListWorkerPoolsSender(req) if err != nil { - result.sic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListWorkerPoolSkus", resp, "Failure sending request") + result.wpc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListWorkerPools", resp, "Failure sending request") return } - result.sic, err = client.ListWorkerPoolSkusResponder(resp) + result.wpc, err = client.ListWorkerPoolsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListWorkerPoolSkus", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "ListWorkerPools", resp, "Failure responding to request") return } - if result.sic.hasNextLink() && result.sic.IsEmpty() { + if result.wpc.hasNextLink() && result.wpc.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -3890,16 +4060,15 @@ func (client AppServiceEnvironmentsClient) ListWorkerPoolSkus(ctx context.Contex return } -// ListWorkerPoolSkusPreparer prepares the ListWorkerPoolSkus request. -func (client AppServiceEnvironmentsClient) ListWorkerPoolSkusPreparer(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (*http.Request, error) { +// ListWorkerPoolsPreparer prepares the ListWorkerPools request. +func (client AppServiceEnvironmentsClient) ListWorkerPoolsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workerPoolName": autorest.Encode("path", workerPoolName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -3907,20 +4076,20 @@ func (client AppServiceEnvironmentsClient) ListWorkerPoolSkusPreparer(ctx contex preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListWorkerPoolSkusSender sends the ListWorkerPoolSkus request. The method will close the +// ListWorkerPoolsSender sends the ListWorkerPools request. The method will close the // http.Response Body if it receives an error. -func (client AppServiceEnvironmentsClient) ListWorkerPoolSkusSender(req *http.Request) (*http.Response, error) { +func (client AppServiceEnvironmentsClient) ListWorkerPoolsSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListWorkerPoolSkusResponder handles the response to the ListWorkerPoolSkus request. The method always +// ListWorkerPoolsResponder handles the response to the ListWorkerPools request. The method always // closes the http.Response Body. -func (client AppServiceEnvironmentsClient) ListWorkerPoolSkusResponder(resp *http.Response) (result SkuInfoCollection, err error) { +func (client AppServiceEnvironmentsClient) ListWorkerPoolsResponder(resp *http.Response) (result WorkerPoolCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -3930,31 +4099,31 @@ func (client AppServiceEnvironmentsClient) ListWorkerPoolSkusResponder(resp *htt return } -// listWorkerPoolSkusNextResults retrieves the next set of results, if any. -func (client AppServiceEnvironmentsClient) listWorkerPoolSkusNextResults(ctx context.Context, lastResults SkuInfoCollection) (result SkuInfoCollection, err error) { - req, err := lastResults.skuInfoCollectionPreparer(ctx) +// listWorkerPoolsNextResults retrieves the next set of results, if any. +func (client AppServiceEnvironmentsClient) listWorkerPoolsNextResults(ctx context.Context, lastResults WorkerPoolCollection) (result WorkerPoolCollection, err error) { + req, err := lastResults.workerPoolCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listWorkerPoolSkusNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listWorkerPoolsNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListWorkerPoolSkusSender(req) + resp, err := client.ListWorkerPoolsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listWorkerPoolSkusNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listWorkerPoolsNextResults", resp, "Failure sending next results request") } - result, err = client.ListWorkerPoolSkusResponder(resp) + result, err = client.ListWorkerPoolsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listWorkerPoolSkusNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "listWorkerPoolsNextResults", resp, "Failure responding to next results request") } return } -// ListWorkerPoolSkusComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppServiceEnvironmentsClient) ListWorkerPoolSkusComplete(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result SkuInfoCollectionIterator, err error) { +// ListWorkerPoolsComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppServiceEnvironmentsClient) ListWorkerPoolsComplete(ctx context.Context, resourceGroupName string, name string) (result WorkerPoolCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.ListWorkerPoolSkus") + ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.ListWorkerPools") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -3963,7 +4132,7 @@ func (client AppServiceEnvironmentsClient) ListWorkerPoolSkusComplete(ctx contex tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListWorkerPoolSkus(ctx, resourceGroupName, name, workerPoolName) + result.page, err = client.ListWorkerPools(ctx, resourceGroupName, name) return } @@ -4020,7 +4189,7 @@ func (client AppServiceEnvironmentsClient) RebootPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -4096,7 +4265,7 @@ func (client AppServiceEnvironmentsClient) ResumePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -4224,7 +4393,7 @@ func (client AppServiceEnvironmentsClient) SuspendPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -4306,6 +4475,89 @@ func (client AppServiceEnvironmentsClient) SuspendComplete(ctx context.Context, return } +// TestUpgradeAvailableNotification sends the test upgrade available notification request. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the App Service Environment. +func (client AppServiceEnvironmentsClient) TestUpgradeAvailableNotification(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.TestUpgradeAvailableNotification") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppServiceEnvironmentsClient", "TestUpgradeAvailableNotification", err.Error()) + } + + req, err := client.TestUpgradeAvailableNotificationPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "TestUpgradeAvailableNotification", nil, "Failure preparing request") + return + } + + resp, err := client.TestUpgradeAvailableNotificationSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "TestUpgradeAvailableNotification", resp, "Failure sending request") + return + } + + result, err = client.TestUpgradeAvailableNotificationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "TestUpgradeAvailableNotification", resp, "Failure responding to request") + return + } + + return +} + +// TestUpgradeAvailableNotificationPreparer prepares the TestUpgradeAvailableNotification request. +func (client AppServiceEnvironmentsClient) TestUpgradeAvailableNotificationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/testUpgradeAvailableNotification", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// TestUpgradeAvailableNotificationSender sends the TestUpgradeAvailableNotification request. The method will close the +// http.Response Body if it receives an error. +func (client AppServiceEnvironmentsClient) TestUpgradeAvailableNotificationSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// TestUpgradeAvailableNotificationResponder handles the response to the TestUpgradeAvailableNotification request. The method always +// closes the http.Response Body. +func (client AppServiceEnvironmentsClient) TestUpgradeAvailableNotificationResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + // Update description for Create or update an App Service Environment. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. @@ -4360,7 +4612,7 @@ func (client AppServiceEnvironmentsClient) UpdatePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -4393,6 +4645,92 @@ func (client AppServiceEnvironmentsClient) UpdateResponder(resp *http.Response) return } +// UpdateAseCustomDNSSuffixConfiguration sends the update ase custom dns suffix configuration request. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the App Service Environment. +func (client AppServiceEnvironmentsClient) UpdateAseCustomDNSSuffixConfiguration(ctx context.Context, resourceGroupName string, name string, customDNSSuffixConfiguration CustomDNSSuffixConfiguration) (result CustomDNSSuffixConfiguration, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.UpdateAseCustomDNSSuffixConfiguration") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppServiceEnvironmentsClient", "UpdateAseCustomDNSSuffixConfiguration", err.Error()) + } + + req, err := client.UpdateAseCustomDNSSuffixConfigurationPreparer(ctx, resourceGroupName, name, customDNSSuffixConfiguration) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "UpdateAseCustomDNSSuffixConfiguration", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateAseCustomDNSSuffixConfigurationSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "UpdateAseCustomDNSSuffixConfiguration", resp, "Failure sending request") + return + } + + result, err = client.UpdateAseCustomDNSSuffixConfigurationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "UpdateAseCustomDNSSuffixConfiguration", resp, "Failure responding to request") + return + } + + return +} + +// UpdateAseCustomDNSSuffixConfigurationPreparer prepares the UpdateAseCustomDNSSuffixConfiguration request. +func (client AppServiceEnvironmentsClient) UpdateAseCustomDNSSuffixConfigurationPreparer(ctx context.Context, resourceGroupName string, name string, customDNSSuffixConfiguration CustomDNSSuffixConfiguration) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix", pathParameters), + autorest.WithJSON(customDNSSuffixConfiguration), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateAseCustomDNSSuffixConfigurationSender sends the UpdateAseCustomDNSSuffixConfiguration request. The method will close the +// http.Response Body if it receives an error. +func (client AppServiceEnvironmentsClient) UpdateAseCustomDNSSuffixConfigurationSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateAseCustomDNSSuffixConfigurationResponder handles the response to the UpdateAseCustomDNSSuffixConfiguration request. The method always +// closes the http.Response Body. +func (client AppServiceEnvironmentsClient) UpdateAseCustomDNSSuffixConfigurationResponder(resp *http.Response) (result CustomDNSSuffixConfiguration, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // UpdateAseNetworkingConfiguration description for Update networking configuration of an App Service Environment // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. @@ -4446,7 +4784,7 @@ func (client AppServiceEnvironmentsClient) UpdateAseNetworkingConfigurationPrepa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -4533,7 +4871,7 @@ func (client AppServiceEnvironmentsClient) UpdateMultiRolePoolPreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -4622,7 +4960,7 @@ func (client AppServiceEnvironmentsClient) UpdateWorkerPoolPreparer(ctx context. "workerPoolName": autorest.Encode("path", workerPoolName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -4654,3 +4992,89 @@ func (client AppServiceEnvironmentsClient) UpdateWorkerPoolResponder(resp *http. result.Response = autorest.Response{Response: resp} return } + +// Upgrade description for Initiate an upgrade of an App Service Environment if one is available. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the App Service Environment. +func (client AppServiceEnvironmentsClient) Upgrade(ctx context.Context, resourceGroupName string, name string) (result AppServiceEnvironmentsUpgradeFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.Upgrade") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppServiceEnvironmentsClient", "Upgrade", err.Error()) + } + + req, err := client.UpgradePreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "Upgrade", nil, "Failure preparing request") + return + } + + result, err = client.UpgradeSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "Upgrade", result.Response(), "Failure sending request") + return + } + + return +} + +// UpgradePreparer prepares the Upgrade request. +func (client AppServiceEnvironmentsClient) UpgradePreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/upgrade", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpgradeSender sends the Upgrade request. The method will close the +// http.Response Body if it receives an error. +func (client AppServiceEnvironmentsClient) UpgradeSender(req *http.Request) (future AppServiceEnvironmentsUpgradeFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpgradeResponder handles the response to the Upgrade request. The method always +// closes the http.Response Body. +func (client AppServiceEnvironmentsClient) UpgradeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/appserviceplans.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/appserviceplans.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/appserviceplans.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/appserviceplans.go index 90503203f87d..9dd79c9e66e1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/appserviceplans.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/appserviceplans.go @@ -8,11 +8,12 @@ package web import ( "context" + "net/http" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" - "net/http" ) // AppServicePlansClient is the webSite Management Client @@ -78,7 +79,7 @@ func (client AppServicePlansClient) CreateOrUpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -179,7 +180,7 @@ func (client AppServicePlansClient) CreateOrUpdateVnetRoutePreparer(ctx context. "vnetName": autorest.Encode("path", vnetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -265,7 +266,7 @@ func (client AppServicePlansClient) DeletePreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -352,7 +353,7 @@ func (client AppServicePlansClient) DeleteHybridConnectionPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -439,7 +440,7 @@ func (client AppServicePlansClient) DeleteVnetRoutePreparer(ctx context.Context, "vnetName": autorest.Encode("path", vnetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -522,7 +523,7 @@ func (client AppServicePlansClient) GetPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -610,7 +611,7 @@ func (client AppServicePlansClient) GetHybridConnectionPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -695,7 +696,7 @@ func (client AppServicePlansClient) GetHybridConnectionPlanLimitPreparer(ctx con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -783,7 +784,7 @@ func (client AppServicePlansClient) GetRouteForVnetPreparer(ctx context.Context, "vnetName": autorest.Encode("path", vnetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -867,7 +868,7 @@ func (client AppServicePlansClient) GetServerFarmSkusPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -953,7 +954,7 @@ func (client AppServicePlansClient) GetVnetFromServerFarmPreparer(ctx context.Co "vnetName": autorest.Encode("path", vnetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1041,7 +1042,7 @@ func (client AppServicePlansClient) GetVnetGatewayPreparer(ctx context.Context, "vnetName": autorest.Encode("path", vnetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1121,7 +1122,7 @@ func (client AppServicePlansClient) ListPreparer(ctx context.Context, detailed * "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1248,7 +1249,7 @@ func (client AppServicePlansClient) ListByResourceGroupPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1369,7 +1370,7 @@ func (client AppServicePlansClient) ListCapabilitiesPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1457,7 +1458,7 @@ func (client AppServicePlansClient) ListHybridConnectionKeysPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1546,7 +1547,7 @@ func (client AppServicePlansClient) ListHybridConnectionsPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1669,7 +1670,7 @@ func (client AppServicePlansClient) ListRoutesForVnetPreparer(ctx context.Contex "vnetName": autorest.Encode("path", vnetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1760,7 +1761,7 @@ func (client AppServicePlansClient) ListUsagesPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1884,7 +1885,7 @@ func (client AppServicePlansClient) ListVnetsPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1978,7 +1979,7 @@ func (client AppServicePlansClient) ListWebAppsPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2117,7 +2118,7 @@ func (client AppServicePlansClient) ListWebAppsByHybridConnectionPreparer(ctx co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2240,7 +2241,7 @@ func (client AppServicePlansClient) RebootWorkerPreparer(ctx context.Context, re "workerName": autorest.Encode("path", workerName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2326,7 +2327,7 @@ func (client AppServicePlansClient) RestartWebAppsPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2413,7 +2414,7 @@ func (client AppServicePlansClient) UpdatePreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2507,7 +2508,7 @@ func (client AppServicePlansClient) UpdateVnetGatewayPreparer(ctx context.Contex "vnetName": autorest.Encode("path", vnetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2598,7 +2599,7 @@ func (client AppServicePlansClient) UpdateVnetRoutePreparer(ctx context.Context, "vnetName": autorest.Encode("path", vnetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/certificateordersdiagnostics.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/certificateordersdiagnostics.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/certificateordersdiagnostics.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/certificateordersdiagnostics.go index 5394a46f0ee1..339fc9038e6a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/certificateordersdiagnostics.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/certificateordersdiagnostics.go @@ -8,12 +8,13 @@ package web import ( "context" + "net/http" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" - "net/http" ) // CertificateOrdersDiagnosticsClient is the webSite Management Client @@ -95,7 +96,7 @@ func (client CertificateOrdersDiagnosticsClient) GetAppServiceCertificateOrderDe "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -194,7 +195,7 @@ func (client CertificateOrdersDiagnosticsClient) ListAppServiceCertificateOrderD "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/certificateregistrationprovider.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/certificateregistrationprovider.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/certificateregistrationprovider.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/certificateregistrationprovider.go index f551c2b175c7..076d0a2aa684 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/certificateregistrationprovider.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/certificateregistrationprovider.go @@ -8,10 +8,11 @@ package web import ( "context" + "net/http" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/tracing" - "net/http" ) // CertificateRegistrationProviderClient is the webSite Management Client @@ -73,7 +74,7 @@ func (client CertificateRegistrationProviderClient) ListOperations(ctx context.C // ListOperationsPreparer prepares the ListOperations request. func (client CertificateRegistrationProviderClient) ListOperationsPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/certificates.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/certificates.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/certificates.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/certificates.go index b10e3b7cb595..d472e5256a65 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/certificates.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/certificates.go @@ -8,11 +8,12 @@ package web import ( "context" + "net/http" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" - "net/http" ) // CertificatesClient is the webSite Management Client @@ -85,7 +86,7 @@ func (client CertificatesClient) CreateOrUpdatePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -171,7 +172,7 @@ func (client CertificatesClient) DeletePreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -254,7 +255,7 @@ func (client CertificatesClient) GetPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -333,7 +334,7 @@ func (client CertificatesClient) ListPreparer(ctx context.Context, filter string "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -460,7 +461,7 @@ func (client CertificatesClient) ListByResourceGroupPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -582,7 +583,7 @@ func (client CertificatesClient) UpdatePreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/client.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/client.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/client.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/client.go index 76dabba5da8d..df565a6dc792 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/client.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/client.go @@ -1,6 +1,4 @@ -// Deprecated: Please note, this package has been deprecated. A replacement package is available [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice). We strongly encourage you to upgrade to continue receiving updates. See [Migration Guide](https://aka.ms/azsdk/golang/t2/migration) for guidance on upgrading. Refer to our [deprecation policy](https://azure.github.io/azure-sdk/policies_support.html) for more details. -// -// Package web implements the Azure ARM Web service API version 2021-03-01. +// Package web implements the Azure ARM Web service API version 2022-09-01. // // WebSite Management Client package web @@ -13,11 +11,12 @@ package web import ( "context" + "net/http" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" - "net/http" ) const ( @@ -95,7 +94,7 @@ func (client BaseClient) CheckNameAvailabilityPreparer(ctx context.Context, requ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -164,7 +163,7 @@ func (client BaseClient) GetPublishingUser(ctx context.Context) (result User, er // GetPublishingUserPreparer prepares the GetPublishingUser request. func (client BaseClient) GetPublishingUserPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -237,7 +236,7 @@ func (client BaseClient) GetSourceControlPreparer(ctx context.Context, sourceCon "sourceControlType": autorest.Encode("path", sourceControlType), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -308,7 +307,7 @@ func (client BaseClient) GetSubscriptionDeploymentLocationsPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -387,7 +386,7 @@ func (client BaseClient) ListBillingMetersPreparer(ctx context.Context, billingL "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -462,7 +461,9 @@ func (client BaseClient) ListBillingMetersComplete(ctx context.Context, billingL } // ListCustomHostNameSites sends the list custom host name sites request. -func (client BaseClient) ListCustomHostNameSites(ctx context.Context) (result CustomHostnameSitesCollectionPage, err error) { +// Parameters: +// hostname - specific hostname +func (client BaseClient) ListCustomHostNameSites(ctx context.Context, hostname string) (result CustomHostnameSitesCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ListCustomHostNameSites") defer func() { @@ -474,7 +475,7 @@ func (client BaseClient) ListCustomHostNameSites(ctx context.Context) (result Cu }() } result.fn = client.listCustomHostNameSitesNextResults - req, err := client.ListCustomHostNameSitesPreparer(ctx) + req, err := client.ListCustomHostNameSitesPreparer(ctx, hostname) if err != nil { err = autorest.NewErrorWithError(err, "web.BaseClient", "ListCustomHostNameSites", nil, "Failure preparing request") return @@ -501,15 +502,18 @@ func (client BaseClient) ListCustomHostNameSites(ctx context.Context) (result Cu } // ListCustomHostNameSitesPreparer prepares the ListCustomHostNameSites request. -func (client BaseClient) ListCustomHostNameSitesPreparer(ctx context.Context) (*http.Request, error) { +func (client BaseClient) ListCustomHostNameSitesPreparer(ctx context.Context, hostname string) (*http.Request, error) { pathParameters := map[string]interface{}{ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(hostname) > 0 { + queryParameters["hostname"] = autorest.Encode("query", hostname) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -559,7 +563,7 @@ func (client BaseClient) listCustomHostNameSitesNextResults(ctx context.Context, } // ListCustomHostNameSitesComplete enumerates all values, automatically crossing page boundaries as required. -func (client BaseClient) ListCustomHostNameSitesComplete(ctx context.Context) (result CustomHostnameSitesCollectionIterator, err error) { +func (client BaseClient) ListCustomHostNameSitesComplete(ctx context.Context, hostname string) (result CustomHostnameSitesCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ListCustomHostNameSites") defer func() { @@ -570,7 +574,7 @@ func (client BaseClient) ListCustomHostNameSitesComplete(ctx context.Context) (r tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListCustomHostNameSites(ctx) + result.page, err = client.ListCustomHostNameSites(ctx, hostname) return } @@ -627,7 +631,7 @@ func (client BaseClient) ListGeoRegionsPreparer(ctx context.Context, sku SkuName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -752,7 +756,7 @@ func (client BaseClient) ListPremierAddOnOffersPreparer(ctx context.Context) (*h "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -867,7 +871,7 @@ func (client BaseClient) ListSiteIdentifiersAssignedToHostNamePreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -977,7 +981,7 @@ func (client BaseClient) ListSkusPreparer(ctx context.Context) (*http.Request, e "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1049,7 +1053,7 @@ func (client BaseClient) ListSourceControls(ctx context.Context) (result SourceC // ListSourceControlsPreparer prepares the ListSourceControls request. func (client BaseClient) ListSourceControlsPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1175,7 +1179,7 @@ func (client BaseClient) MovePreparer(ctx context.Context, resourceGroupName str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1252,7 +1256,7 @@ func (client BaseClient) UpdatePublishingUser(ctx context.Context, userDetails U // UpdatePublishingUserPreparer prepares the UpdatePublishingUser request. func (client BaseClient) UpdatePublishingUserPreparer(ctx context.Context, userDetails User) (*http.Request, error) { - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1328,7 +1332,7 @@ func (client BaseClient) UpdateSourceControlPreparer(ctx context.Context, source "sourceControlType": autorest.Encode("path", sourceControlType), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1424,7 +1428,7 @@ func (client BaseClient) ValidatePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1515,7 +1519,7 @@ func (client BaseClient) ValidateMovePreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1590,7 +1594,7 @@ func (client BaseClient) VerifyHostingEnvironmentVnetPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/containerapps.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/containerapps.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/containerapps.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/containerapps.go index 6c999ce689be..d729509acc55 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/containerapps.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/containerapps.go @@ -8,11 +8,12 @@ package web import ( "context" + "net/http" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" - "net/http" ) // ContainerAppsClient is the webSite Management Client @@ -77,7 +78,7 @@ func (client ContainerAppsClient) CreateOrUpdatePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -166,7 +167,7 @@ func (client ContainerAppsClient) DeletePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -259,7 +260,7 @@ func (client ContainerAppsClient) GetPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -346,7 +347,7 @@ func (client ContainerAppsClient) ListByResourceGroupPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -459,7 +460,7 @@ func (client ContainerAppsClient) ListBySubscriptionPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -570,7 +571,7 @@ func (client ContainerAppsClient) ListSecretsPreparer(ctx context.Context, name "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/containerappsrevisions.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/containerappsrevisions.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/containerappsrevisions.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/containerappsrevisions.go index e12a386c7b64..13a8bd672c1a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/containerappsrevisions.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/containerappsrevisions.go @@ -8,11 +8,12 @@ package web import ( "context" + "net/http" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" - "net/http" ) // ContainerAppsRevisionsClient is the webSite Management Client @@ -87,7 +88,7 @@ func (client ContainerAppsRevisionsClient) ActivateRevisionPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -172,7 +173,7 @@ func (client ContainerAppsRevisionsClient) DeactivateRevisionPreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -257,7 +258,7 @@ func (client ContainerAppsRevisionsClient) GetRevisionPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -346,7 +347,7 @@ func (client ContainerAppsRevisionsClient) ListRevisionsPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -469,7 +470,7 @@ func (client ContainerAppsRevisionsClient) RestartRevisionPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/deletedwebapps.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/deletedwebapps.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/deletedwebapps.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/deletedwebapps.go index 8bd440611dba..36ea9b604d11 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/deletedwebapps.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/deletedwebapps.go @@ -8,10 +8,11 @@ package web import ( "context" + "net/http" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/tracing" - "net/http" ) // DeletedWebAppsClient is the webSite Management Client @@ -74,7 +75,7 @@ func (client DeletedWebAppsClient) GetDeletedWebAppByLocationPreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -150,7 +151,7 @@ func (client DeletedWebAppsClient) ListPreparer(ctx context.Context) (*http.Requ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -264,7 +265,7 @@ func (client DeletedWebAppsClient) ListByLocationPreparer(ctx context.Context, l "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/diagnostics.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/diagnostics.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/diagnostics.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/diagnostics.go index 43988e0c81c4..b0cf1d618454 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/diagnostics.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/diagnostics.go @@ -8,12 +8,13 @@ package web import ( "context" + "net/http" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" - "net/http" ) // DiagnosticsClient is the webSite Management Client @@ -95,7 +96,7 @@ func (client DiagnosticsClient) ExecuteSiteAnalysisPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -200,7 +201,7 @@ func (client DiagnosticsClient) ExecuteSiteAnalysisSlotPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -303,7 +304,7 @@ func (client DiagnosticsClient) ExecuteSiteDetectorPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -408,7 +409,7 @@ func (client DiagnosticsClient) ExecuteSiteDetectorSlotPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -509,7 +510,7 @@ func (client DiagnosticsClient) GetHostingEnvironmentDetectorResponsePreparer(ct "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -606,7 +607,7 @@ func (client DiagnosticsClient) GetSiteAnalysisPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -696,7 +697,7 @@ func (client DiagnosticsClient) GetSiteAnalysisSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -784,7 +785,7 @@ func (client DiagnosticsClient) GetSiteDetectorPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -876,7 +877,7 @@ func (client DiagnosticsClient) GetSiteDetectorResponsePreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -979,7 +980,7 @@ func (client DiagnosticsClient) GetSiteDetectorResponseSlotPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1078,7 +1079,7 @@ func (client DiagnosticsClient) GetSiteDetectorSlotPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1164,7 +1165,7 @@ func (client DiagnosticsClient) GetSiteDiagnosticCategoryPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1252,7 +1253,7 @@ func (client DiagnosticsClient) GetSiteDiagnosticCategorySlotPreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1341,7 +1342,7 @@ func (client DiagnosticsClient) ListHostingEnvironmentDetectorResponsesPreparer( "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1469,7 +1470,7 @@ func (client DiagnosticsClient) ListSiteAnalysesPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1599,7 +1600,7 @@ func (client DiagnosticsClient) ListSiteAnalysesSlotPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1725,7 +1726,7 @@ func (client DiagnosticsClient) ListSiteDetectorResponsesPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1853,7 +1854,7 @@ func (client DiagnosticsClient) ListSiteDetectorResponsesSlotPreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1981,7 +1982,7 @@ func (client DiagnosticsClient) ListSiteDetectorsPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2111,7 +2112,7 @@ func (client DiagnosticsClient) ListSiteDetectorsSlotPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2237,7 +2238,7 @@ func (client DiagnosticsClient) ListSiteDiagnosticCategoriesPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2365,7 +2366,7 @@ func (client DiagnosticsClient) ListSiteDiagnosticCategoriesSlotPreparer(ctx con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/domainregistrationprovider.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/domainregistrationprovider.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/domainregistrationprovider.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/domainregistrationprovider.go index a04e086e447c..0283e7f8329c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/domainregistrationprovider.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/domainregistrationprovider.go @@ -8,10 +8,11 @@ package web import ( "context" + "net/http" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/tracing" - "net/http" ) // DomainRegistrationProviderClient is the webSite Management Client @@ -73,7 +74,7 @@ func (client DomainRegistrationProviderClient) ListOperations(ctx context.Contex // ListOperationsPreparer prepares the ListOperations request. func (client DomainRegistrationProviderClient) ListOperationsPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/domains.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/domains.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/domains.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/domains.go index 1c9d9b47fe37..2272270caf9e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/domains.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/domains.go @@ -8,11 +8,12 @@ package web import ( "context" + "net/http" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" - "net/http" ) // DomainsClient is the webSite Management Client @@ -73,7 +74,7 @@ func (client DomainsClient) CheckAvailabilityPreparer(ctx context.Context, ident "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -211,7 +212,7 @@ func (client DomainsClient) CreateOrUpdatePreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -311,7 +312,7 @@ func (client DomainsClient) CreateOrUpdateOwnershipIdentifierPreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -399,7 +400,7 @@ func (client DomainsClient) DeletePreparer(ctx context.Context, resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -487,7 +488,7 @@ func (client DomainsClient) DeleteOwnershipIdentifierPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -570,7 +571,7 @@ func (client DomainsClient) GetPreparer(ctx context.Context, resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -641,7 +642,7 @@ func (client DomainsClient) GetControlCenterSsoRequestPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -727,7 +728,7 @@ func (client DomainsClient) GetOwnershipIdentifierPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -803,7 +804,7 @@ func (client DomainsClient) ListPreparer(ctx context.Context) (*http.Request, er "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -927,7 +928,7 @@ func (client DomainsClient) ListByResourceGroupPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1053,7 +1054,7 @@ func (client DomainsClient) ListOwnershipIdentifiersPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1168,7 +1169,7 @@ func (client DomainsClient) ListRecommendationsPreparer(ctx context.Context, par "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1291,7 +1292,7 @@ func (client DomainsClient) RenewPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1374,7 +1375,7 @@ func (client DomainsClient) TransferOutPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1461,7 +1462,7 @@ func (client DomainsClient) UpdatePreparer(ctx context.Context, resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1551,7 +1552,7 @@ func (client DomainsClient) UpdateOwnershipIdentifierPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/enums.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/enums.go similarity index 75% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/enums.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/enums.go index 1d61f48637d3..3f67255d91d9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/enums.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/enums.go @@ -116,12 +116,12 @@ type BackupItemStatus string const ( // BackupItemStatusCreated ... BackupItemStatusCreated BackupItemStatus = "Created" - // BackupItemStatusDeleted ... - BackupItemStatusDeleted BackupItemStatus = "Deleted" // BackupItemStatusDeleteFailed ... BackupItemStatusDeleteFailed BackupItemStatus = "DeleteFailed" // BackupItemStatusDeleteInProgress ... BackupItemStatusDeleteInProgress BackupItemStatus = "DeleteInProgress" + // BackupItemStatusDeleted ... + BackupItemStatusDeleted BackupItemStatus = "Deleted" // BackupItemStatusFailed ... BackupItemStatusFailed BackupItemStatus = "Failed" // BackupItemStatusInProgress ... @@ -138,7 +138,7 @@ const ( // PossibleBackupItemStatusValues returns an array of possible values for the BackupItemStatus const type. func PossibleBackupItemStatusValues() []BackupItemStatus { - return []BackupItemStatus{BackupItemStatusCreated, BackupItemStatusDeleted, BackupItemStatusDeleteFailed, BackupItemStatusDeleteInProgress, BackupItemStatusFailed, BackupItemStatusInProgress, BackupItemStatusPartiallySucceeded, BackupItemStatusSkipped, BackupItemStatusSucceeded, BackupItemStatusTimedOut} + return []BackupItemStatus{BackupItemStatusCreated, BackupItemStatusDeleteFailed, BackupItemStatusDeleteInProgress, BackupItemStatusDeleted, BackupItemStatusFailed, BackupItemStatusInProgress, BackupItemStatusPartiallySucceeded, BackupItemStatusSkipped, BackupItemStatusSucceeded, BackupItemStatusTimedOut} } // BackupRestoreOperationType enumerates the values for backup restore operation type. @@ -263,10 +263,10 @@ const ( CertificateOrderStatusIssued CertificateOrderStatus = "Issued" // CertificateOrderStatusNotSubmitted ... CertificateOrderStatusNotSubmitted CertificateOrderStatus = "NotSubmitted" - // CertificateOrderStatusPendingissuance ... - CertificateOrderStatusPendingissuance CertificateOrderStatus = "Pendingissuance" // CertificateOrderStatusPendingRekey ... CertificateOrderStatusPendingRekey CertificateOrderStatus = "PendingRekey" + // CertificateOrderStatusPendingissuance ... + CertificateOrderStatusPendingissuance CertificateOrderStatus = "Pendingissuance" // CertificateOrderStatusPendingrevocation ... CertificateOrderStatusPendingrevocation CertificateOrderStatus = "Pendingrevocation" // CertificateOrderStatusRevoked ... @@ -277,7 +277,7 @@ const ( // PossibleCertificateOrderStatusValues returns an array of possible values for the CertificateOrderStatus const type. func PossibleCertificateOrderStatusValues() []CertificateOrderStatus { - return []CertificateOrderStatus{CertificateOrderStatusCanceled, CertificateOrderStatusDenied, CertificateOrderStatusExpired, CertificateOrderStatusIssued, CertificateOrderStatusNotSubmitted, CertificateOrderStatusPendingissuance, CertificateOrderStatusPendingRekey, CertificateOrderStatusPendingrevocation, CertificateOrderStatusRevoked, CertificateOrderStatusUnused} + return []CertificateOrderStatus{CertificateOrderStatusCanceled, CertificateOrderStatusDenied, CertificateOrderStatusExpired, CertificateOrderStatusIssued, CertificateOrderStatusNotSubmitted, CertificateOrderStatusPendingRekey, CertificateOrderStatusPendingissuance, CertificateOrderStatusPendingrevocation, CertificateOrderStatusRevoked, CertificateOrderStatusUnused} } // CertificateProductType enumerates the values for certificate product type. @@ -299,10 +299,10 @@ func PossibleCertificateProductTypeValues() []CertificateProductType { type Channels string const ( - // ChannelsAll ... - ChannelsAll Channels = "All" // ChannelsAPI ... ChannelsAPI Channels = "Api" + // ChannelsAll ... + ChannelsAll Channels = "All" // ChannelsEmail ... ChannelsEmail Channels = "Email" // ChannelsNotification ... @@ -313,7 +313,7 @@ const ( // PossibleChannelsValues returns an array of possible values for the Channels const type. func PossibleChannelsValues() []Channels { - return []Channels{ChannelsAll, ChannelsAPI, ChannelsEmail, ChannelsNotification, ChannelsWebhook} + return []Channels{ChannelsAPI, ChannelsAll, ChannelsEmail, ChannelsNotification, ChannelsWebhook} } // CheckNameResourceTypes enumerates the values for check name resource types. @@ -440,17 +440,17 @@ const ( ConnectionStringTypePostgreSQL ConnectionStringType = "PostgreSQL" // ConnectionStringTypeRedisCache ... ConnectionStringTypeRedisCache ConnectionStringType = "RedisCache" - // ConnectionStringTypeServiceBus ... - ConnectionStringTypeServiceBus ConnectionStringType = "ServiceBus" // ConnectionStringTypeSQLAzure ... ConnectionStringTypeSQLAzure ConnectionStringType = "SQLAzure" // ConnectionStringTypeSQLServer ... ConnectionStringTypeSQLServer ConnectionStringType = "SQLServer" + // ConnectionStringTypeServiceBus ... + ConnectionStringTypeServiceBus ConnectionStringType = "ServiceBus" ) // PossibleConnectionStringTypeValues returns an array of possible values for the ConnectionStringType const type. func PossibleConnectionStringTypeValues() []ConnectionStringType { - return []ConnectionStringType{ConnectionStringTypeAPIHub, ConnectionStringTypeCustom, ConnectionStringTypeDocDb, ConnectionStringTypeEventHub, ConnectionStringTypeMySQL, ConnectionStringTypeNotificationHub, ConnectionStringTypePostgreSQL, ConnectionStringTypeRedisCache, ConnectionStringTypeServiceBus, ConnectionStringTypeSQLAzure, ConnectionStringTypeSQLServer} + return []ConnectionStringType{ConnectionStringTypeAPIHub, ConnectionStringTypeCustom, ConnectionStringTypeDocDb, ConnectionStringTypeEventHub, ConnectionStringTypeMySQL, ConnectionStringTypeNotificationHub, ConnectionStringTypePostgreSQL, ConnectionStringTypeRedisCache, ConnectionStringTypeSQLAzure, ConnectionStringTypeSQLServer, ConnectionStringTypeServiceBus} } // ContainerAppProvisioningState enumerates the values for container app provisioning state. @@ -508,6 +508,25 @@ func PossibleCookieExpirationConventionValues() []CookieExpirationConvention { return []CookieExpirationConvention{CookieExpirationConventionFixedTime, CookieExpirationConventionIdentityProviderDerived} } +// CustomDNSSuffixProvisioningState enumerates the values for custom dns suffix provisioning state. +type CustomDNSSuffixProvisioningState string + +const ( + // CustomDNSSuffixProvisioningStateDegraded ... + CustomDNSSuffixProvisioningStateDegraded CustomDNSSuffixProvisioningState = "Degraded" + // CustomDNSSuffixProvisioningStateFailed ... + CustomDNSSuffixProvisioningStateFailed CustomDNSSuffixProvisioningState = "Failed" + // CustomDNSSuffixProvisioningStateInProgress ... + CustomDNSSuffixProvisioningStateInProgress CustomDNSSuffixProvisioningState = "InProgress" + // CustomDNSSuffixProvisioningStateSucceeded ... + CustomDNSSuffixProvisioningStateSucceeded CustomDNSSuffixProvisioningState = "Succeeded" +) + +// PossibleCustomDNSSuffixProvisioningStateValues returns an array of possible values for the CustomDNSSuffixProvisioningState const type. +func PossibleCustomDNSSuffixProvisioningStateValues() []CustomDNSSuffixProvisioningState { + return []CustomDNSSuffixProvisioningState{CustomDNSSuffixProvisioningStateDegraded, CustomDNSSuffixProvisioningStateFailed, CustomDNSSuffixProvisioningStateInProgress, CustomDNSSuffixProvisioningStateSucceeded} +} + // CustomDomainStatus enumerates the values for custom domain status. type CustomDomainStatus string @@ -522,13 +541,15 @@ const ( CustomDomainStatusReady CustomDomainStatus = "Ready" // CustomDomainStatusRetrievingValidationToken ... CustomDomainStatusRetrievingValidationToken CustomDomainStatus = "RetrievingValidationToken" + // CustomDomainStatusUnhealthy ... + CustomDomainStatusUnhealthy CustomDomainStatus = "Unhealthy" // CustomDomainStatusValidating ... CustomDomainStatusValidating CustomDomainStatus = "Validating" ) // PossibleCustomDomainStatusValues returns an array of possible values for the CustomDomainStatus const type. func PossibleCustomDomainStatusValues() []CustomDomainStatus { - return []CustomDomainStatus{CustomDomainStatusAdding, CustomDomainStatusDeleting, CustomDomainStatusFailed, CustomDomainStatusReady, CustomDomainStatusRetrievingValidationToken, CustomDomainStatusValidating} + return []CustomDomainStatus{CustomDomainStatusAdding, CustomDomainStatusDeleting, CustomDomainStatusFailed, CustomDomainStatusReady, CustomDomainStatusRetrievingValidationToken, CustomDomainStatusUnhealthy, CustomDomainStatusValidating} } // CustomHostNameDNSRecordType enumerates the values for custom host name dns record type. @@ -546,6 +567,38 @@ func PossibleCustomHostNameDNSRecordTypeValues() []CustomHostNameDNSRecordType { return []CustomHostNameDNSRecordType{CustomHostNameDNSRecordTypeA, CustomHostNameDNSRecordTypeCName} } +// DNSType enumerates the values for dns type. +type DNSType string + +const ( + // DNSTypeAzureDNS ... + DNSTypeAzureDNS DNSType = "AzureDns" + // DNSTypeDefaultDomainRegistrarDNS ... + DNSTypeDefaultDomainRegistrarDNS DNSType = "DefaultDomainRegistrarDns" +) + +// PossibleDNSTypeValues returns an array of possible values for the DNSType const type. +func PossibleDNSTypeValues() []DNSType { + return []DNSType{DNSTypeAzureDNS, DNSTypeDefaultDomainRegistrarDNS} +} + +// DNSVerificationTestResult enumerates the values for dns verification test result. +type DNSVerificationTestResult string + +const ( + // DNSVerificationTestResultFailed ... + DNSVerificationTestResultFailed DNSVerificationTestResult = "Failed" + // DNSVerificationTestResultPassed ... + DNSVerificationTestResultPassed DNSVerificationTestResult = "Passed" + // DNSVerificationTestResultSkipped ... + DNSVerificationTestResultSkipped DNSVerificationTestResult = "Skipped" +) + +// PossibleDNSVerificationTestResultValues returns an array of possible values for the DNSVerificationTestResult const type. +func PossibleDNSVerificationTestResultValues() []DNSVerificationTestResult { + return []DNSVerificationTestResult{DNSVerificationTestResultFailed, DNSVerificationTestResultPassed, DNSVerificationTestResultSkipped} +} + // DatabaseType enumerates the values for database type. type DatabaseType string @@ -565,53 +618,123 @@ func PossibleDatabaseTypeValues() []DatabaseType { return []DatabaseType{DatabaseTypeLocalMySQL, DatabaseTypeMySQL, DatabaseTypePostgreSQL, DatabaseTypeSQLAzure} } -// DetectorType enumerates the values for detector type. -type DetectorType string +// DayOfWeek enumerates the values for day of week. +type DayOfWeek string const ( - // DetectorTypeAnalysis ... - DetectorTypeAnalysis DetectorType = "Analysis" - // DetectorTypeCategoryOverview ... - DetectorTypeCategoryOverview DetectorType = "CategoryOverview" - // DetectorTypeDetector ... - DetectorTypeDetector DetectorType = "Detector" + // DayOfWeekFriday ... + DayOfWeekFriday DayOfWeek = "Friday" + // DayOfWeekMonday ... + DayOfWeekMonday DayOfWeek = "Monday" + // DayOfWeekSaturday ... + DayOfWeekSaturday DayOfWeek = "Saturday" + // DayOfWeekSunday ... + DayOfWeekSunday DayOfWeek = "Sunday" + // DayOfWeekThursday ... + DayOfWeekThursday DayOfWeek = "Thursday" + // DayOfWeekTuesday ... + DayOfWeekTuesday DayOfWeek = "Tuesday" + // DayOfWeekWednesday ... + DayOfWeekWednesday DayOfWeek = "Wednesday" ) -// PossibleDetectorTypeValues returns an array of possible values for the DetectorType const type. -func PossibleDetectorTypeValues() []DetectorType { - return []DetectorType{DetectorTypeAnalysis, DetectorTypeCategoryOverview, DetectorTypeDetector} +// PossibleDayOfWeekValues returns an array of possible values for the DayOfWeek const type. +func PossibleDayOfWeekValues() []DayOfWeek { + return []DayOfWeek{DayOfWeekFriday, DayOfWeekMonday, DayOfWeekSaturday, DayOfWeekSunday, DayOfWeekThursday, DayOfWeekTuesday, DayOfWeekWednesday} } -// DNSType enumerates the values for dns type. -type DNSType string +// DaysOfWeek enumerates the values for days of week. +type DaysOfWeek string const ( - // DNSTypeAzureDNS ... - DNSTypeAzureDNS DNSType = "AzureDns" - // DNSTypeDefaultDomainRegistrarDNS ... - DNSTypeDefaultDomainRegistrarDNS DNSType = "DefaultDomainRegistrarDns" + // DaysOfWeekFriday ... + DaysOfWeekFriday DaysOfWeek = "Friday" + // DaysOfWeekMonday ... + DaysOfWeekMonday DaysOfWeek = "Monday" + // DaysOfWeekSaturday ... + DaysOfWeekSaturday DaysOfWeek = "Saturday" + // DaysOfWeekSunday ... + DaysOfWeekSunday DaysOfWeek = "Sunday" + // DaysOfWeekThursday ... + DaysOfWeekThursday DaysOfWeek = "Thursday" + // DaysOfWeekTuesday ... + DaysOfWeekTuesday DaysOfWeek = "Tuesday" + // DaysOfWeekWednesday ... + DaysOfWeekWednesday DaysOfWeek = "Wednesday" ) -// PossibleDNSTypeValues returns an array of possible values for the DNSType const type. -func PossibleDNSTypeValues() []DNSType { - return []DNSType{DNSTypeAzureDNS, DNSTypeDefaultDomainRegistrarDNS} +// PossibleDaysOfWeekValues returns an array of possible values for the DaysOfWeek const type. +func PossibleDaysOfWeekValues() []DaysOfWeek { + return []DaysOfWeek{DaysOfWeekFriday, DaysOfWeekMonday, DaysOfWeekSaturday, DaysOfWeekSunday, DaysOfWeekThursday, DaysOfWeekTuesday, DaysOfWeekWednesday} } -// DNSVerificationTestResult enumerates the values for dns verification test result. -type DNSVerificationTestResult string +// DefaultAction enumerates the values for default action. +type DefaultAction string const ( - // DNSVerificationTestResultFailed ... - DNSVerificationTestResultFailed DNSVerificationTestResult = "Failed" - // DNSVerificationTestResultPassed ... - DNSVerificationTestResultPassed DNSVerificationTestResult = "Passed" - // DNSVerificationTestResultSkipped ... - DNSVerificationTestResultSkipped DNSVerificationTestResult = "Skipped" + // DefaultActionAllow ... + DefaultActionAllow DefaultAction = "Allow" + // DefaultActionDeny ... + DefaultActionDeny DefaultAction = "Deny" ) -// PossibleDNSVerificationTestResultValues returns an array of possible values for the DNSVerificationTestResult const type. -func PossibleDNSVerificationTestResultValues() []DNSVerificationTestResult { - return []DNSVerificationTestResult{DNSVerificationTestResultFailed, DNSVerificationTestResultPassed, DNSVerificationTestResultSkipped} +// PossibleDefaultActionValues returns an array of possible values for the DefaultAction const type. +func PossibleDefaultActionValues() []DefaultAction { + return []DefaultAction{DefaultActionAllow, DefaultActionDeny} +} + +// DeploymentBuildStatus enumerates the values for deployment build status. +type DeploymentBuildStatus string + +const ( + // DeploymentBuildStatusBuildAborted ... + DeploymentBuildStatusBuildAborted DeploymentBuildStatus = "BuildAborted" + // DeploymentBuildStatusBuildFailed ... + DeploymentBuildStatusBuildFailed DeploymentBuildStatus = "BuildFailed" + // DeploymentBuildStatusBuildInProgress ... + DeploymentBuildStatusBuildInProgress DeploymentBuildStatus = "BuildInProgress" + // DeploymentBuildStatusBuildPending ... + DeploymentBuildStatusBuildPending DeploymentBuildStatus = "BuildPending" + // DeploymentBuildStatusBuildRequestReceived ... + DeploymentBuildStatusBuildRequestReceived DeploymentBuildStatus = "BuildRequestReceived" + // DeploymentBuildStatusBuildSuccessful ... + DeploymentBuildStatusBuildSuccessful DeploymentBuildStatus = "BuildSuccessful" + // DeploymentBuildStatusPostBuildRestartRequired ... + DeploymentBuildStatusPostBuildRestartRequired DeploymentBuildStatus = "PostBuildRestartRequired" + // DeploymentBuildStatusRuntimeFailed ... + DeploymentBuildStatusRuntimeFailed DeploymentBuildStatus = "RuntimeFailed" + // DeploymentBuildStatusRuntimeStarting ... + DeploymentBuildStatusRuntimeStarting DeploymentBuildStatus = "RuntimeStarting" + // DeploymentBuildStatusRuntimeSuccessful ... + DeploymentBuildStatusRuntimeSuccessful DeploymentBuildStatus = "RuntimeSuccessful" + // DeploymentBuildStatusStartPolling ... + DeploymentBuildStatusStartPolling DeploymentBuildStatus = "StartPolling" + // DeploymentBuildStatusStartPollingWithRestart ... + DeploymentBuildStatusStartPollingWithRestart DeploymentBuildStatus = "StartPollingWithRestart" + // DeploymentBuildStatusTimedOut ... + DeploymentBuildStatusTimedOut DeploymentBuildStatus = "TimedOut" +) + +// PossibleDeploymentBuildStatusValues returns an array of 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 enumerates the values for detector type. +type DetectorType string + +const ( + // DetectorTypeAnalysis ... + DetectorTypeAnalysis DetectorType = "Analysis" + // DetectorTypeCategoryOverview ... + DetectorTypeCategoryOverview DetectorType = "CategoryOverview" + // DetectorTypeDetector ... + DetectorTypeDetector DetectorType = "Detector" +) + +// PossibleDetectorTypeValues returns an array of possible values for the DetectorType const type. +func PossibleDetectorTypeValues() []DetectorType { + return []DetectorType{DetectorTypeAnalysis, DetectorTypeCategoryOverview, DetectorTypeDetector} } // DomainStatus enumerates the values for domain status. @@ -765,25 +888,6 @@ func PossibleFtpsStateValues() []FtpsState { return []FtpsState{FtpsStateAllAllowed, FtpsStateDisabled, FtpsStateFtpsOnly} } -// HostingEnvironmentStatus enumerates the values for hosting environment status. -type HostingEnvironmentStatus string - -const ( - // HostingEnvironmentStatusDeleting ... - HostingEnvironmentStatusDeleting HostingEnvironmentStatus = "Deleting" - // HostingEnvironmentStatusPreparing ... - HostingEnvironmentStatusPreparing HostingEnvironmentStatus = "Preparing" - // HostingEnvironmentStatusReady ... - HostingEnvironmentStatusReady HostingEnvironmentStatus = "Ready" - // HostingEnvironmentStatusScaling ... - HostingEnvironmentStatusScaling HostingEnvironmentStatus = "Scaling" -) - -// PossibleHostingEnvironmentStatusValues returns an array of possible values for the HostingEnvironmentStatus const type. -func PossibleHostingEnvironmentStatusValues() []HostingEnvironmentStatus { - return []HostingEnvironmentStatus{HostingEnvironmentStatusDeleting, HostingEnvironmentStatusPreparing, HostingEnvironmentStatusReady, HostingEnvironmentStatusScaling} -} - // HostNameType enumerates the values for host name type. type HostNameType string @@ -814,6 +918,42 @@ func PossibleHostTypeValues() []HostType { return []HostType{HostTypeRepository, HostTypeStandard} } +// HostingEnvironmentStatus enumerates the values for hosting environment status. +type HostingEnvironmentStatus string + +const ( + // HostingEnvironmentStatusDeleting ... + HostingEnvironmentStatusDeleting HostingEnvironmentStatus = "Deleting" + // HostingEnvironmentStatusPreparing ... + HostingEnvironmentStatusPreparing HostingEnvironmentStatus = "Preparing" + // HostingEnvironmentStatusReady ... + HostingEnvironmentStatusReady HostingEnvironmentStatus = "Ready" + // HostingEnvironmentStatusScaling ... + HostingEnvironmentStatusScaling HostingEnvironmentStatus = "Scaling" +) + +// PossibleHostingEnvironmentStatusValues returns an array of possible values for the HostingEnvironmentStatus const type. +func PossibleHostingEnvironmentStatusValues() []HostingEnvironmentStatus { + return []HostingEnvironmentStatus{HostingEnvironmentStatusDeleting, HostingEnvironmentStatusPreparing, HostingEnvironmentStatusReady, HostingEnvironmentStatusScaling} +} + +// IPFilterTag enumerates the values for ip filter tag. +type IPFilterTag string + +const ( + // IPFilterTagDefault ... + IPFilterTagDefault IPFilterTag = "Default" + // IPFilterTagServiceTag ... + IPFilterTagServiceTag IPFilterTag = "ServiceTag" + // IPFilterTagXffProxy ... + IPFilterTagXffProxy IPFilterTag = "XffProxy" +) + +// PossibleIPFilterTagValues returns an array of possible values for the IPFilterTag const type. +func PossibleIPFilterTagValues() []IPFilterTag { + return []IPFilterTag{IPFilterTagDefault, IPFilterTagServiceTag, IPFilterTagXffProxy} +} + // InAvailabilityReasonType enumerates the values for in availability reason type. type InAvailabilityReasonType string @@ -867,23 +1007,6 @@ func PossibleInsightStatusValues() []InsightStatus { return []InsightStatus{InsightStatusCritical, InsightStatusInfo, InsightStatusNone, InsightStatusSuccess, InsightStatusWarning} } -// IPFilterTag enumerates the values for ip filter tag. -type IPFilterTag string - -const ( - // IPFilterTagDefault ... - IPFilterTagDefault IPFilterTag = "Default" - // IPFilterTagServiceTag ... - IPFilterTagServiceTag IPFilterTag = "ServiceTag" - // IPFilterTagXffProxy ... - IPFilterTagXffProxy IPFilterTag = "XffProxy" -) - -// PossibleIPFilterTagValues returns an array of possible values for the IPFilterTag const type. -func PossibleIPFilterTagValues() []IPFilterTag { - return []IPFilterTag{IPFilterTagDefault, IPFilterTagServiceTag, IPFilterTagXffProxy} -} - // IssueType enumerates the values for issue type. type IssueType string @@ -926,6 +1049,23 @@ func PossibleJobTypeValues() []JobType { return []JobType{JobTypeContinuous, JobTypeTriggered} } +// KeyType enumerates the values for key type. +type KeyType string + +const ( + // KeyTypeNotSpecified ... + KeyTypeNotSpecified KeyType = "NotSpecified" + // KeyTypePrimary ... + KeyTypePrimary KeyType = "Primary" + // KeyTypeSecondary ... + KeyTypeSecondary KeyType = "Secondary" +) + +// PossibleKeyTypeValues returns an array of possible values for the KeyType const type. +func PossibleKeyTypeValues() []KeyType { + return []KeyType{KeyTypeNotSpecified, KeyTypePrimary, KeyTypeSecondary} +} + // KeyVaultSecretStatus enumerates the values for key vault secret status. type KeyVaultSecretStatus string @@ -959,6 +1099,21 @@ func PossibleKeyVaultSecretStatusValues() []KeyVaultSecretStatus { return []KeyVaultSecretStatus{KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault, KeyVaultSecretStatusCertificateOrderFailed, KeyVaultSecretStatusExternalPrivateKey, KeyVaultSecretStatusInitialized, KeyVaultSecretStatusKeyVaultDoesNotExist, KeyVaultSecretStatusKeyVaultSecretDoesNotExist, KeyVaultSecretStatusOperationNotPermittedOnKeyVault, KeyVaultSecretStatusSucceeded, KeyVaultSecretStatusUnknown, KeyVaultSecretStatusUnknownError, KeyVaultSecretStatusWaitingOnCertificateOrder} } +// Kind enumerates the values for kind. +type Kind string + +const ( + // KindStateful ... + KindStateful Kind = "Stateful" + // KindStateless ... + KindStateless Kind = "Stateless" +) + +// PossibleKindValues returns an array of possible values for the Kind const type. +func PossibleKindValues() []Kind { + return []Kind{KindStateful, KindStateless} +} + // KubeEnvironmentProvisioningState enumerates the values for kube environment provisioning state. type KubeEnvironmentProvisioningState string @@ -1030,40 +1185,6 @@ func PossibleLogLevelValues() []LogLevel { return []LogLevel{LogLevelError, LogLevelInformation, LogLevelOff, LogLevelVerbose, LogLevelWarning} } -// ManagedPipelineMode enumerates the values for managed pipeline mode. -type ManagedPipelineMode string - -const ( - // ManagedPipelineModeClassic ... - ManagedPipelineModeClassic ManagedPipelineMode = "Classic" - // ManagedPipelineModeIntegrated ... - ManagedPipelineModeIntegrated ManagedPipelineMode = "Integrated" -) - -// PossibleManagedPipelineModeValues returns an array of possible values for the ManagedPipelineMode const type. -func PossibleManagedPipelineModeValues() []ManagedPipelineMode { - return []ManagedPipelineMode{ManagedPipelineModeClassic, ManagedPipelineModeIntegrated} -} - -// ManagedServiceIdentityType enumerates the values for managed service identity type. -type ManagedServiceIdentityType string - -const ( - // ManagedServiceIdentityTypeNone ... - ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" - // ManagedServiceIdentityTypeSystemAssigned ... - ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned" - // ManagedServiceIdentityTypeSystemAssignedUserAssigned ... - ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned, UserAssigned" - // ManagedServiceIdentityTypeUserAssigned ... - ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" -) - -// PossibleManagedServiceIdentityTypeValues returns an array of possible values for the ManagedServiceIdentityType const type. -func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { - return []ManagedServiceIdentityType{ManagedServiceIdentityTypeNone, ManagedServiceIdentityTypeSystemAssigned, ManagedServiceIdentityTypeSystemAssignedUserAssigned, ManagedServiceIdentityTypeUserAssigned} -} - // MSDeployLogEntryType enumerates the values for ms deploy log entry type. type MSDeployLogEntryType string @@ -1102,6 +1223,40 @@ func PossibleMSDeployProvisioningStateValues() []MSDeployProvisioningState { return []MSDeployProvisioningState{MSDeployProvisioningStateAccepted, MSDeployProvisioningStateCanceled, MSDeployProvisioningStateFailed, MSDeployProvisioningStateRunning, MSDeployProvisioningStateSucceeded} } +// ManagedPipelineMode enumerates the values for managed pipeline mode. +type ManagedPipelineMode string + +const ( + // ManagedPipelineModeClassic ... + ManagedPipelineModeClassic ManagedPipelineMode = "Classic" + // ManagedPipelineModeIntegrated ... + ManagedPipelineModeIntegrated ManagedPipelineMode = "Integrated" +) + +// PossibleManagedPipelineModeValues returns an array of possible values for the ManagedPipelineMode const type. +func PossibleManagedPipelineModeValues() []ManagedPipelineMode { + return []ManagedPipelineMode{ManagedPipelineModeClassic, ManagedPipelineModeIntegrated} +} + +// ManagedServiceIdentityType enumerates the values for managed service identity type. +type ManagedServiceIdentityType string + +const ( + // ManagedServiceIdentityTypeNone ... + ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" + // ManagedServiceIdentityTypeSystemAssigned ... + ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned" + // ManagedServiceIdentityTypeSystemAssignedUserAssigned ... + ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned, UserAssigned" + // ManagedServiceIdentityTypeUserAssigned ... + ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" +) + +// PossibleManagedServiceIdentityTypeValues returns an array of possible values for the ManagedServiceIdentityType const type. +func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { + return []ManagedServiceIdentityType{ManagedServiceIdentityTypeNone, ManagedServiceIdentityTypeSystemAssigned, ManagedServiceIdentityTypeSystemAssignedUserAssigned, ManagedServiceIdentityTypeUserAssigned} +} + // MySQLMigrationType enumerates the values for my sql migration type. type MySQLMigrationType string @@ -1136,6 +1291,19 @@ func PossibleNotificationLevelValues() []NotificationLevel { return []NotificationLevel{NotificationLevelCritical, NotificationLevelInformation, NotificationLevelNonUrgentSuggestion, NotificationLevelWarning} } +// OpenAuthenticationProviderType enumerates the values for open authentication provider type. +type OpenAuthenticationProviderType string + +const ( + // OpenAuthenticationProviderTypeAAD ... + OpenAuthenticationProviderTypeAAD OpenAuthenticationProviderType = "AAD" +) + +// PossibleOpenAuthenticationProviderTypeValues returns an array of possible values for the OpenAuthenticationProviderType const type. +func PossibleOpenAuthenticationProviderTypeValues() []OpenAuthenticationProviderType { + return []OpenAuthenticationProviderType{OpenAuthenticationProviderTypeAAD} +} + // OperationStatus enumerates the values for operation status. type OperationStatus string @@ -1157,6 +1325,73 @@ func PossibleOperationStatusValues() []OperationStatus { return []OperationStatus{OperationStatusCreated, OperationStatusFailed, OperationStatusInProgress, OperationStatusSucceeded, OperationStatusTimedOut} } +// ParameterType enumerates the values for parameter type. +type ParameterType string + +const ( + // ParameterTypeArray ... + ParameterTypeArray ParameterType = "Array" + // ParameterTypeBool ... + ParameterTypeBool ParameterType = "Bool" + // ParameterTypeFloat ... + ParameterTypeFloat ParameterType = "Float" + // ParameterTypeInt ... + ParameterTypeInt ParameterType = "Int" + // ParameterTypeNotSpecified ... + ParameterTypeNotSpecified ParameterType = "NotSpecified" + // ParameterTypeObject ... + ParameterTypeObject ParameterType = "Object" + // ParameterTypeSecureObject ... + ParameterTypeSecureObject ParameterType = "SecureObject" + // ParameterTypeSecureString ... + ParameterTypeSecureString ParameterType = "SecureString" + // ParameterTypeString ... + ParameterTypeString ParameterType = "String" +) + +// PossibleParameterTypeValues returns an array of possible values for the ParameterType const type. +func PossibleParameterTypeValues() []ParameterType { + return []ParameterType{ParameterTypeArray, ParameterTypeBool, ParameterTypeFloat, ParameterTypeInt, ParameterTypeNotSpecified, ParameterTypeObject, ParameterTypeSecureObject, ParameterTypeSecureString, ParameterTypeString} +} + +// ProviderOsTypeSelected enumerates the values for provider os type selected. +type ProviderOsTypeSelected string + +const ( + // ProviderOsTypeSelectedAll ... + ProviderOsTypeSelectedAll ProviderOsTypeSelected = "All" + // ProviderOsTypeSelectedLinux ... + ProviderOsTypeSelectedLinux ProviderOsTypeSelected = "Linux" + // ProviderOsTypeSelectedLinuxFunctions ... + ProviderOsTypeSelectedLinuxFunctions ProviderOsTypeSelected = "LinuxFunctions" + // ProviderOsTypeSelectedWindows ... + ProviderOsTypeSelectedWindows ProviderOsTypeSelected = "Windows" + // ProviderOsTypeSelectedWindowsFunctions ... + ProviderOsTypeSelectedWindowsFunctions ProviderOsTypeSelected = "WindowsFunctions" +) + +// PossibleProviderOsTypeSelectedValues returns an array of possible values for the ProviderOsTypeSelected const type. +func PossibleProviderOsTypeSelectedValues() []ProviderOsTypeSelected { + return []ProviderOsTypeSelected{ProviderOsTypeSelectedAll, ProviderOsTypeSelectedLinux, ProviderOsTypeSelectedLinuxFunctions, ProviderOsTypeSelectedWindows, ProviderOsTypeSelectedWindowsFunctions} +} + +// ProviderStackOsType enumerates the values for provider stack os type. +type ProviderStackOsType string + +const ( + // ProviderStackOsTypeAll ... + ProviderStackOsTypeAll ProviderStackOsType = "All" + // ProviderStackOsTypeLinux ... + ProviderStackOsTypeLinux ProviderStackOsType = "Linux" + // ProviderStackOsTypeWindows ... + ProviderStackOsTypeWindows ProviderStackOsType = "Windows" +) + +// PossibleProviderStackOsTypeValues returns an array of possible values for the ProviderStackOsType const type. +func PossibleProviderStackOsTypeValues() []ProviderStackOsType { + return []ProviderStackOsType{ProviderStackOsTypeAll, ProviderStackOsTypeLinux, ProviderStackOsTypeWindows} +} + // ProvisioningState enumerates the values for provisioning state. type ProvisioningState string @@ -1212,6 +1447,33 @@ func PossiblePublishingProfileFormatValues() []PublishingProfileFormat { return []PublishingProfileFormat{PublishingProfileFormatFileZilla3, PublishingProfileFormatFtp, PublishingProfileFormatWebDeploy} } +// RecurrenceFrequency enumerates the values for recurrence frequency. +type RecurrenceFrequency string + +const ( + // RecurrenceFrequencyDay ... + RecurrenceFrequencyDay RecurrenceFrequency = "Day" + // RecurrenceFrequencyHour ... + RecurrenceFrequencyHour RecurrenceFrequency = "Hour" + // RecurrenceFrequencyMinute ... + RecurrenceFrequencyMinute RecurrenceFrequency = "Minute" + // RecurrenceFrequencyMonth ... + RecurrenceFrequencyMonth RecurrenceFrequency = "Month" + // RecurrenceFrequencyNotSpecified ... + RecurrenceFrequencyNotSpecified RecurrenceFrequency = "NotSpecified" + // RecurrenceFrequencySecond ... + RecurrenceFrequencySecond RecurrenceFrequency = "Second" + // RecurrenceFrequencyWeek ... + RecurrenceFrequencyWeek RecurrenceFrequency = "Week" + // RecurrenceFrequencyYear ... + RecurrenceFrequencyYear RecurrenceFrequency = "Year" +) + +// PossibleRecurrenceFrequencyValues returns an array of possible values for the RecurrenceFrequency const type. +func PossibleRecurrenceFrequencyValues() []RecurrenceFrequency { + return []RecurrenceFrequency{RecurrenceFrequencyDay, RecurrenceFrequencyHour, RecurrenceFrequencyMinute, RecurrenceFrequencyMonth, RecurrenceFrequencyNotSpecified, RecurrenceFrequencySecond, RecurrenceFrequencyWeek, RecurrenceFrequencyYear} +} + // RedundancyMode enumerates the values for redundancy mode. type RedundancyMode string @@ -1327,6 +1589,23 @@ func PossibleResolveStatusValues() []ResolveStatus { return []ResolveStatus{ResolveStatusAccessToKeyVaultDenied, ResolveStatusFetchTimedOut, ResolveStatusInitialized, ResolveStatusInvalidSyntax, ResolveStatusMSINotEnabled, ResolveStatusOtherReasons, ResolveStatusResolved, ResolveStatusSecretNotFound, ResolveStatusSecretVersionNotFound, ResolveStatusUnauthorizedClient, ResolveStatusVaultNotFound} } +// ResourceNotRenewableReason enumerates the values for resource not renewable reason. +type ResourceNotRenewableReason string + +const ( + // ResourceNotRenewableReasonExpirationNotInRenewalTimeRange ... + ResourceNotRenewableReasonExpirationNotInRenewalTimeRange ResourceNotRenewableReason = "ExpirationNotInRenewalTimeRange" + // ResourceNotRenewableReasonRegistrationStatusNotSupportedForRenewal ... + ResourceNotRenewableReasonRegistrationStatusNotSupportedForRenewal ResourceNotRenewableReason = "RegistrationStatusNotSupportedForRenewal" + // ResourceNotRenewableReasonSubscriptionNotActive ... + ResourceNotRenewableReasonSubscriptionNotActive ResourceNotRenewableReason = "SubscriptionNotActive" +) + +// PossibleResourceNotRenewableReasonValues returns an array of possible values for the ResourceNotRenewableReason const type. +func PossibleResourceNotRenewableReasonValues() []ResourceNotRenewableReason { + return []ResourceNotRenewableReason{ResourceNotRenewableReasonExpirationNotInRenewalTimeRange, ResourceNotRenewableReasonRegistrationStatusNotSupportedForRenewal, ResourceNotRenewableReasonSubscriptionNotActive} +} + // ResourceScopeType enumerates the values for resource scope type. type ResourceScopeType string @@ -1660,6 +1939,21 @@ func PossibleSupportedTLSVersionsValues() []SupportedTLSVersions { return []SupportedTLSVersions{SupportedTLSVersionsOneFullStopOne, SupportedTLSVersionsOneFullStopTwo, SupportedTLSVersionsOneFullStopZero} } +// TriggerTypes enumerates the values for trigger types. +type TriggerTypes string + +const ( + // TriggerTypesHTTPTrigger ... + TriggerTypesHTTPTrigger TriggerTypes = "HttpTrigger" + // TriggerTypesUnknown ... + TriggerTypesUnknown TriggerTypes = "Unknown" +) + +// PossibleTriggerTypesValues returns an array of possible values for the TriggerTypes const type. +func PossibleTriggerTypesValues() []TriggerTypes { + return []TriggerTypes{TriggerTypesHTTPTrigger, TriggerTypesUnknown} +} + // TriggeredWebJobStatus enumerates the values for triggered web job status. type TriggeredWebJobStatus string @@ -1677,21 +1971,6 @@ func PossibleTriggeredWebJobStatusValues() []TriggeredWebJobStatus { return []TriggeredWebJobStatus{TriggeredWebJobStatusError, TriggeredWebJobStatusFailed, TriggeredWebJobStatusSuccess} } -// TriggerTypes enumerates the values for trigger types. -type TriggerTypes string - -const ( - // TriggerTypesHTTPTrigger ... - TriggerTypesHTTPTrigger TriggerTypes = "HttpTrigger" - // TriggerTypesUnknown ... - TriggerTypesUnknown TriggerTypes = "Unknown" -) - -// PossibleTriggerTypesValues returns an array of possible values for the TriggerTypes const type. -func PossibleTriggerTypesValues() []TriggerTypes { - return []TriggerTypes{TriggerTypesHTTPTrigger, TriggerTypesUnknown} -} - // UnauthenticatedClientAction enumerates the values for unauthenticated client action. type UnauthenticatedClientAction string @@ -1726,6 +2005,43 @@ func PossibleUnauthenticatedClientActionV2Values() []UnauthenticatedClientAction return []UnauthenticatedClientActionV2{UnauthenticatedClientActionV2AllowAnonymous, UnauthenticatedClientActionV2RedirectToLoginPage, UnauthenticatedClientActionV2Return401, UnauthenticatedClientActionV2Return403} } +// UpgradeAvailability enumerates the values for upgrade availability. +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 an array of possible values for the UpgradeAvailability const type. +func PossibleUpgradeAvailabilityValues() []UpgradeAvailability { + return []UpgradeAvailability{UpgradeAvailabilityNone, UpgradeAvailabilityReady} +} + +// UpgradePreference enumerates the values for 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 an array of possible values for the UpgradePreference const type. +func PossibleUpgradePreferenceValues() []UpgradePreference { + return []UpgradePreference{UpgradePreferenceEarly, UpgradePreferenceLate, UpgradePreferenceManual, UpgradePreferenceNone} +} + // UsageState enumerates the values for usage state. type UsageState string @@ -1792,3 +2108,207 @@ const ( func PossibleWorkerSizeOptionsValues() []WorkerSizeOptions { return []WorkerSizeOptions{WorkerSizeOptionsD1, WorkerSizeOptionsD2, WorkerSizeOptionsD3, WorkerSizeOptionsDefault, WorkerSizeOptionsLarge, WorkerSizeOptionsLargeV3, WorkerSizeOptionsMedium, WorkerSizeOptionsMediumV3, WorkerSizeOptionsNestedSmall, WorkerSizeOptionsNestedSmallLinux, WorkerSizeOptionsSmall, WorkerSizeOptionsSmallV3} } + +// WorkflowHealthState enumerates the values for workflow health state. +type WorkflowHealthState string + +const ( + // WorkflowHealthStateHealthy ... + WorkflowHealthStateHealthy WorkflowHealthState = "Healthy" + // WorkflowHealthStateNotSpecified ... + WorkflowHealthStateNotSpecified WorkflowHealthState = "NotSpecified" + // WorkflowHealthStateUnhealthy ... + WorkflowHealthStateUnhealthy WorkflowHealthState = "Unhealthy" + // WorkflowHealthStateUnknown ... + WorkflowHealthStateUnknown WorkflowHealthState = "Unknown" +) + +// PossibleWorkflowHealthStateValues returns an array of possible values for the WorkflowHealthState const type. +func PossibleWorkflowHealthStateValues() []WorkflowHealthState { + return []WorkflowHealthState{WorkflowHealthStateHealthy, WorkflowHealthStateNotSpecified, WorkflowHealthStateUnhealthy, WorkflowHealthStateUnknown} +} + +// WorkflowProvisioningState enumerates the values for workflow provisioning state. +type WorkflowProvisioningState string + +const ( + // WorkflowProvisioningStateAccepted ... + WorkflowProvisioningStateAccepted WorkflowProvisioningState = "Accepted" + // WorkflowProvisioningStateCanceled ... + WorkflowProvisioningStateCanceled WorkflowProvisioningState = "Canceled" + // WorkflowProvisioningStateCompleted ... + WorkflowProvisioningStateCompleted WorkflowProvisioningState = "Completed" + // WorkflowProvisioningStateCreated ... + WorkflowProvisioningStateCreated WorkflowProvisioningState = "Created" + // WorkflowProvisioningStateCreating ... + WorkflowProvisioningStateCreating WorkflowProvisioningState = "Creating" + // WorkflowProvisioningStateDeleted ... + WorkflowProvisioningStateDeleted WorkflowProvisioningState = "Deleted" + // WorkflowProvisioningStateDeleting ... + WorkflowProvisioningStateDeleting WorkflowProvisioningState = "Deleting" + // WorkflowProvisioningStateFailed ... + WorkflowProvisioningStateFailed WorkflowProvisioningState = "Failed" + // WorkflowProvisioningStateInProgress ... + WorkflowProvisioningStateInProgress WorkflowProvisioningState = "InProgress" + // WorkflowProvisioningStateMoving ... + WorkflowProvisioningStateMoving WorkflowProvisioningState = "Moving" + // WorkflowProvisioningStateNotSpecified ... + WorkflowProvisioningStateNotSpecified WorkflowProvisioningState = "NotSpecified" + // WorkflowProvisioningStatePending ... + WorkflowProvisioningStatePending WorkflowProvisioningState = "Pending" + // WorkflowProvisioningStateReady ... + WorkflowProvisioningStateReady WorkflowProvisioningState = "Ready" + // WorkflowProvisioningStateRegistered ... + WorkflowProvisioningStateRegistered WorkflowProvisioningState = "Registered" + // WorkflowProvisioningStateRegistering ... + WorkflowProvisioningStateRegistering WorkflowProvisioningState = "Registering" + // WorkflowProvisioningStateRenewing ... + WorkflowProvisioningStateRenewing WorkflowProvisioningState = "Renewing" + // WorkflowProvisioningStateRunning ... + WorkflowProvisioningStateRunning WorkflowProvisioningState = "Running" + // WorkflowProvisioningStateSucceeded ... + WorkflowProvisioningStateSucceeded WorkflowProvisioningState = "Succeeded" + // WorkflowProvisioningStateUnregistered ... + WorkflowProvisioningStateUnregistered WorkflowProvisioningState = "Unregistered" + // WorkflowProvisioningStateUnregistering ... + WorkflowProvisioningStateUnregistering WorkflowProvisioningState = "Unregistering" + // WorkflowProvisioningStateUpdating ... + WorkflowProvisioningStateUpdating WorkflowProvisioningState = "Updating" + // WorkflowProvisioningStateWaiting ... + WorkflowProvisioningStateWaiting WorkflowProvisioningState = "Waiting" +) + +// PossibleWorkflowProvisioningStateValues returns an array of 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 enumerates the values for workflow sku name. +type WorkflowSkuName string + +const ( + // WorkflowSkuNameBasic ... + WorkflowSkuNameBasic WorkflowSkuName = "Basic" + // WorkflowSkuNameFree ... + WorkflowSkuNameFree WorkflowSkuName = "Free" + // WorkflowSkuNameNotSpecified ... + WorkflowSkuNameNotSpecified WorkflowSkuName = "NotSpecified" + // WorkflowSkuNamePremium ... + WorkflowSkuNamePremium WorkflowSkuName = "Premium" + // WorkflowSkuNameShared ... + WorkflowSkuNameShared WorkflowSkuName = "Shared" + // WorkflowSkuNameStandard ... + WorkflowSkuNameStandard WorkflowSkuName = "Standard" +) + +// PossibleWorkflowSkuNameValues returns an array of possible values for the WorkflowSkuName const type. +func PossibleWorkflowSkuNameValues() []WorkflowSkuName { + return []WorkflowSkuName{WorkflowSkuNameBasic, WorkflowSkuNameFree, WorkflowSkuNameNotSpecified, WorkflowSkuNamePremium, WorkflowSkuNameShared, WorkflowSkuNameStandard} +} + +// WorkflowState enumerates the values for workflow state. +type WorkflowState string + +const ( + // WorkflowStateCompleted ... + WorkflowStateCompleted WorkflowState = "Completed" + // WorkflowStateDeleted ... + WorkflowStateDeleted WorkflowState = "Deleted" + // WorkflowStateDisabled ... + WorkflowStateDisabled WorkflowState = "Disabled" + // WorkflowStateEnabled ... + WorkflowStateEnabled WorkflowState = "Enabled" + // WorkflowStateNotSpecified ... + WorkflowStateNotSpecified WorkflowState = "NotSpecified" + // WorkflowStateSuspended ... + WorkflowStateSuspended WorkflowState = "Suspended" +) + +// PossibleWorkflowStateValues returns an array of possible values for the WorkflowState const type. +func PossibleWorkflowStateValues() []WorkflowState { + return []WorkflowState{WorkflowStateCompleted, WorkflowStateDeleted, WorkflowStateDisabled, WorkflowStateEnabled, WorkflowStateNotSpecified, WorkflowStateSuspended} +} + +// WorkflowStatus enumerates the values for workflow status. +type WorkflowStatus string + +const ( + // WorkflowStatusAborted ... + WorkflowStatusAborted WorkflowStatus = "Aborted" + // WorkflowStatusCancelled ... + WorkflowStatusCancelled WorkflowStatus = "Cancelled" + // WorkflowStatusFailed ... + WorkflowStatusFailed WorkflowStatus = "Failed" + // WorkflowStatusFaulted ... + WorkflowStatusFaulted WorkflowStatus = "Faulted" + // WorkflowStatusIgnored ... + WorkflowStatusIgnored WorkflowStatus = "Ignored" + // WorkflowStatusNotSpecified ... + WorkflowStatusNotSpecified WorkflowStatus = "NotSpecified" + // WorkflowStatusPaused ... + WorkflowStatusPaused WorkflowStatus = "Paused" + // WorkflowStatusRunning ... + WorkflowStatusRunning WorkflowStatus = "Running" + // WorkflowStatusSkipped ... + WorkflowStatusSkipped WorkflowStatus = "Skipped" + // WorkflowStatusSucceeded ... + WorkflowStatusSucceeded WorkflowStatus = "Succeeded" + // WorkflowStatusSuspended ... + WorkflowStatusSuspended WorkflowStatus = "Suspended" + // WorkflowStatusTimedOut ... + WorkflowStatusTimedOut WorkflowStatus = "TimedOut" + // WorkflowStatusWaiting ... + WorkflowStatusWaiting WorkflowStatus = "Waiting" +) + +// PossibleWorkflowStatusValues returns an array of 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 enumerates the values for workflow trigger provisioning state. +type WorkflowTriggerProvisioningState string + +const ( + // WorkflowTriggerProvisioningStateAccepted ... + WorkflowTriggerProvisioningStateAccepted WorkflowTriggerProvisioningState = "Accepted" + // WorkflowTriggerProvisioningStateCanceled ... + WorkflowTriggerProvisioningStateCanceled WorkflowTriggerProvisioningState = "Canceled" + // WorkflowTriggerProvisioningStateCompleted ... + WorkflowTriggerProvisioningStateCompleted WorkflowTriggerProvisioningState = "Completed" + // WorkflowTriggerProvisioningStateCreated ... + WorkflowTriggerProvisioningStateCreated WorkflowTriggerProvisioningState = "Created" + // WorkflowTriggerProvisioningStateCreating ... + WorkflowTriggerProvisioningStateCreating WorkflowTriggerProvisioningState = "Creating" + // WorkflowTriggerProvisioningStateDeleted ... + WorkflowTriggerProvisioningStateDeleted WorkflowTriggerProvisioningState = "Deleted" + // WorkflowTriggerProvisioningStateDeleting ... + WorkflowTriggerProvisioningStateDeleting WorkflowTriggerProvisioningState = "Deleting" + // WorkflowTriggerProvisioningStateFailed ... + WorkflowTriggerProvisioningStateFailed WorkflowTriggerProvisioningState = "Failed" + // WorkflowTriggerProvisioningStateMoving ... + WorkflowTriggerProvisioningStateMoving WorkflowTriggerProvisioningState = "Moving" + // WorkflowTriggerProvisioningStateNotSpecified ... + WorkflowTriggerProvisioningStateNotSpecified WorkflowTriggerProvisioningState = "NotSpecified" + // WorkflowTriggerProvisioningStateReady ... + WorkflowTriggerProvisioningStateReady WorkflowTriggerProvisioningState = "Ready" + // WorkflowTriggerProvisioningStateRegistered ... + WorkflowTriggerProvisioningStateRegistered WorkflowTriggerProvisioningState = "Registered" + // WorkflowTriggerProvisioningStateRegistering ... + WorkflowTriggerProvisioningStateRegistering WorkflowTriggerProvisioningState = "Registering" + // WorkflowTriggerProvisioningStateRunning ... + WorkflowTriggerProvisioningStateRunning WorkflowTriggerProvisioningState = "Running" + // WorkflowTriggerProvisioningStateSucceeded ... + WorkflowTriggerProvisioningStateSucceeded WorkflowTriggerProvisioningState = "Succeeded" + // WorkflowTriggerProvisioningStateUnregistered ... + WorkflowTriggerProvisioningStateUnregistered WorkflowTriggerProvisioningState = "Unregistered" + // WorkflowTriggerProvisioningStateUnregistering ... + WorkflowTriggerProvisioningStateUnregistering WorkflowTriggerProvisioningState = "Unregistering" + // WorkflowTriggerProvisioningStateUpdating ... + WorkflowTriggerProvisioningStateUpdating WorkflowTriggerProvisioningState = "Updating" +) + +// PossibleWorkflowTriggerProvisioningStateValues returns an array of 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/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/global.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/global.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/global.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/global.go index 3e7d015aea25..c17f428fe343 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/global.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/global.go @@ -8,10 +8,11 @@ package web import ( "context" + "net/http" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/tracing" - "net/http" ) // GlobalClient is the webSite Management Client @@ -73,7 +74,7 @@ func (client GlobalClient) GetDeletedWebAppPreparer(ctx context.Context, deleted "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -147,7 +148,7 @@ func (client GlobalClient) GetDeletedWebAppSnapshotsPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -223,7 +224,7 @@ func (client GlobalClient) GetSubscriptionOperationWithAsyncResponsePreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/kubeenvironments.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/kubeenvironments.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/kubeenvironments.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/kubeenvironments.go index 6b8a3cca1e4a..deefd99e8442 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/kubeenvironments.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/kubeenvironments.go @@ -8,11 +8,12 @@ package web import ( "context" + "net/http" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" - "net/http" ) // KubeEnvironmentsClient is the webSite Management Client @@ -79,7 +80,7 @@ func (client KubeEnvironmentsClient) CreateOrUpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -168,7 +169,7 @@ func (client KubeEnvironmentsClient) DeletePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -261,7 +262,7 @@ func (client KubeEnvironmentsClient) GetPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -348,7 +349,7 @@ func (client KubeEnvironmentsClient) ListByResourceGroupPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -461,7 +462,7 @@ func (client KubeEnvironmentsClient) ListBySubscriptionPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -583,7 +584,7 @@ func (client KubeEnvironmentsClient) UpdatePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/models.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/models.go similarity index 86% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/models.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/models.go index 9867b5dc40e6..15f1665bfdb3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/models.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/models.go @@ -9,18 +9,301 @@ package web import ( "context" "encoding/json" + "io" + "net/http" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" "github.com/Azure/go-autorest/tracing" "github.com/gofrs/uuid" - "io" - "net/http" ) // The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web" +const fqdn = "home/runner/work/kermit/kermit/sdk/web/2022-09-01/web" + +// APIDefinitionInfo information about the formal API definition for the app. +type APIDefinitionInfo struct { + // URL - The URL of the API definition. + URL *string `json:"url,omitempty"` +} + +// APIKVReference description of site key vault references. +type APIKVReference struct { + autorest.Response `json:"-"` + // APIKVReferenceProperties - ApiKVReference resource specific properties + *APIKVReferenceProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for APIKVReference. +func (akr APIKVReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if akr.APIKVReferenceProperties != nil { + objectMap["properties"] = akr.APIKVReferenceProperties + } + if akr.Kind != nil { + objectMap["kind"] = akr.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for APIKVReference struct. +func (akr *APIKVReference) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var aPIKVReferenceProperties APIKVReferenceProperties + err = json.Unmarshal(*v, &aPIKVReferenceProperties) + if err != nil { + return err + } + akr.APIKVReferenceProperties = &aPIKVReferenceProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + akr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + akr.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + akr.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + akr.Type = &typeVar + } + } + } + + return nil +} + +// APIKVReferenceCollection ... +type APIKVReferenceCollection struct { + autorest.Response `json:"-"` + // Value - Collection of resources. + Value *[]APIKVReference `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for APIKVReferenceCollection. +func (akrc APIKVReferenceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if akrc.Value != nil { + objectMap["value"] = akrc.Value + } + return json.Marshal(objectMap) +} + +// APIKVReferenceCollectionIterator provides access to a complete listing of APIKVReference values. +type APIKVReferenceCollectionIterator struct { + i int + page APIKVReferenceCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *APIKVReferenceCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/APIKVReferenceCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *APIKVReferenceCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter APIKVReferenceCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter APIKVReferenceCollectionIterator) Response() APIKVReferenceCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter APIKVReferenceCollectionIterator) Value() APIKVReference { + if !iter.page.NotDone() { + return APIKVReference{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the APIKVReferenceCollectionIterator type. +func NewAPIKVReferenceCollectionIterator(page APIKVReferenceCollectionPage) APIKVReferenceCollectionIterator { + return APIKVReferenceCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (akrc APIKVReferenceCollection) IsEmpty() bool { + return akrc.Value == nil || len(*akrc.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (akrc APIKVReferenceCollection) hasNextLink() bool { + return akrc.NextLink != nil && len(*akrc.NextLink) != 0 +} + +// aPIKVReferenceCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (akrc APIKVReferenceCollection) aPIKVReferenceCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !akrc.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(akrc.NextLink))) +} + +// APIKVReferenceCollectionPage contains a page of APIKVReference values. +type APIKVReferenceCollectionPage struct { + fn func(context.Context, APIKVReferenceCollection) (APIKVReferenceCollection, error) + arc APIKVReferenceCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *APIKVReferenceCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/APIKVReferenceCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.arc) + if err != nil { + return err + } + page.arc = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *APIKVReferenceCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page APIKVReferenceCollectionPage) NotDone() bool { + return !page.arc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page APIKVReferenceCollectionPage) Response() APIKVReferenceCollection { + return page.arc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page APIKVReferenceCollectionPage) Values() []APIKVReference { + if page.arc.IsEmpty() { + return nil + } + return *page.arc.Value +} + +// Creates a new instance of the APIKVReferenceCollectionPage type. +func NewAPIKVReferenceCollectionPage(cur APIKVReferenceCollection, getNextPage func(context.Context, APIKVReferenceCollection) (APIKVReferenceCollection, error)) APIKVReferenceCollectionPage { + return APIKVReferenceCollectionPage{ + fn: getNextPage, + arc: cur, + } +} + +// APIKVReferenceProperties apiKVReference resource specific properties +type APIKVReferenceProperties struct { + Reference *string `json:"reference,omitempty"` + // Status - Possible values include: 'ResolveStatusInitialized', 'ResolveStatusResolved', 'ResolveStatusInvalidSyntax', 'ResolveStatusMSINotEnabled', 'ResolveStatusVaultNotFound', 'ResolveStatusSecretNotFound', 'ResolveStatusSecretVersionNotFound', 'ResolveStatusAccessToKeyVaultDenied', 'ResolveStatusOtherReasons', 'ResolveStatusFetchTimedOut', 'ResolveStatusUnauthorizedClient' + Status ResolveStatus `json:"status,omitempty"` + VaultName *string `json:"vaultName,omitempty"` + SecretName *string `json:"secretName,omitempty"` + SecretVersion *string `json:"secretVersion,omitempty"` + IdentityType *ManagedServiceIdentity `json:"identityType,omitempty"` + Details *string `json:"details,omitempty"` + // Source - Possible values include: 'ConfigReferenceSourceKeyVault' + Source ConfigReferenceSource `json:"source,omitempty"` + ActiveVersion *string `json:"activeVersion,omitempty"` +} + +// APIManagementConfig azure API management (APIM) configuration linked to the app. +type APIManagementConfig struct { + // ID - APIM-Api Identifier. + ID *string `json:"id,omitempty"` +} // AbnormalTimePeriod class representing Abnormal Time Period identified in diagnosis type AbnormalTimePeriod struct { @@ -276,128 +559,35 @@ func (ad AnalysisDefinitionProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// APIDefinitionInfo information about the formal API definition for the app. -type APIDefinitionInfo struct { - // URL - The URL of the API definition. - URL *string `json:"url,omitempty"` -} - -// APIKVReference description of site key vault references. -type APIKVReference struct { - autorest.Response `json:"-"` - // APIKVReferenceProperties - ApiKVReference resource specific properties - *APIKVReferenceProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for APIKVReference. -func (akr APIKVReference) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if akr.APIKVReferenceProperties != nil { - objectMap["properties"] = akr.APIKVReferenceProperties - } - if akr.Kind != nil { - objectMap["kind"] = akr.Kind - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for APIKVReference struct. -func (akr *APIKVReference) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var aPIKVReferenceProperties APIKVReferenceProperties - err = json.Unmarshal(*v, &aPIKVReferenceProperties) - if err != nil { - return err - } - akr.APIKVReferenceProperties = &aPIKVReferenceProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - akr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - akr.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - akr.Kind = &kind - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - akr.Type = &typeVar - } - } - } - - return nil -} - -// APIKVReferenceCollection ... -type APIKVReferenceCollection struct { +// AppCollection collection of App Service apps. +type AppCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]APIKVReference `json:"value,omitempty"` + Value *[]Site `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for APIKVReferenceCollection. -func (akrc APIKVReferenceCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for AppCollection. +func (ac AppCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if akrc.Value != nil { - objectMap["value"] = akrc.Value + if ac.Value != nil { + objectMap["value"] = ac.Value } return json.Marshal(objectMap) } -// APIKVReferenceCollectionIterator provides access to a complete listing of APIKVReference values. -type APIKVReferenceCollectionIterator struct { +// AppCollectionIterator provides access to a complete listing of Site values. +type AppCollectionIterator struct { i int - page APIKVReferenceCollectionPage + page AppCollectionPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *APIKVReferenceCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *AppCollectionIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/APIKVReferenceCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/AppCollectionIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -422,67 +612,67 @@ func (iter *APIKVReferenceCollectionIterator) NextWithContext(ctx context.Contex // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *APIKVReferenceCollectionIterator) Next() error { +func (iter *AppCollectionIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter APIKVReferenceCollectionIterator) NotDone() bool { +func (iter AppCollectionIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter APIKVReferenceCollectionIterator) Response() APIKVReferenceCollection { +func (iter AppCollectionIterator) Response() AppCollection { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter APIKVReferenceCollectionIterator) Value() APIKVReference { +func (iter AppCollectionIterator) Value() Site { if !iter.page.NotDone() { - return APIKVReference{} + return Site{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the APIKVReferenceCollectionIterator type. -func NewAPIKVReferenceCollectionIterator(page APIKVReferenceCollectionPage) APIKVReferenceCollectionIterator { - return APIKVReferenceCollectionIterator{page: page} +// Creates a new instance of the AppCollectionIterator type. +func NewAppCollectionIterator(page AppCollectionPage) AppCollectionIterator { + return AppCollectionIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (akrc APIKVReferenceCollection) IsEmpty() bool { - return akrc.Value == nil || len(*akrc.Value) == 0 +func (ac AppCollection) IsEmpty() bool { + return ac.Value == nil || len(*ac.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (akrc APIKVReferenceCollection) hasNextLink() bool { - return akrc.NextLink != nil && len(*akrc.NextLink) != 0 +func (ac AppCollection) hasNextLink() bool { + return ac.NextLink != nil && len(*ac.NextLink) != 0 } -// aPIKVReferenceCollectionPreparer prepares a request to retrieve the next set of results. +// appCollectionPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (akrc APIKVReferenceCollection) aPIKVReferenceCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !akrc.hasNextLink() { +func (ac AppCollection) appCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !ac.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(akrc.NextLink))) + autorest.WithBaseURL(to.String(ac.NextLink))) } -// APIKVReferenceCollectionPage contains a page of APIKVReference values. -type APIKVReferenceCollectionPage struct { - fn func(context.Context, APIKVReferenceCollection) (APIKVReferenceCollection, error) - arc APIKVReferenceCollection +// AppCollectionPage contains a page of Site values. +type AppCollectionPage struct { + fn func(context.Context, AppCollection) (AppCollection, error) + ac AppCollection } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *APIKVReferenceCollectionPage) NextWithContext(ctx context.Context) (err error) { +func (page *AppCollectionPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/APIKVReferenceCollectionPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/AppCollectionPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -492,11 +682,11 @@ func (page *APIKVReferenceCollectionPage) NextWithContext(ctx context.Context) ( }() } for { - next, err := page.fn(ctx, page.arc) + next, err := page.fn(ctx, page.ac) if err != nil { return err } - page.arc = next + page.ac = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -507,244 +697,55 @@ func (page *APIKVReferenceCollectionPage) NextWithContext(ctx context.Context) ( // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *APIKVReferenceCollectionPage) Next() error { +func (page *AppCollectionPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page APIKVReferenceCollectionPage) NotDone() bool { - return !page.arc.IsEmpty() +func (page AppCollectionPage) NotDone() bool { + return !page.ac.IsEmpty() } // Response returns the raw server response from the last page request. -func (page APIKVReferenceCollectionPage) Response() APIKVReferenceCollection { - return page.arc +func (page AppCollectionPage) Response() AppCollection { + return page.ac } // Values returns the slice of values for the current page or nil if there are no values. -func (page APIKVReferenceCollectionPage) Values() []APIKVReference { - if page.arc.IsEmpty() { +func (page AppCollectionPage) Values() []Site { + if page.ac.IsEmpty() { return nil } - return *page.arc.Value + return *page.ac.Value } -// Creates a new instance of the APIKVReferenceCollectionPage type. -func NewAPIKVReferenceCollectionPage(cur APIKVReferenceCollection, getNextPage func(context.Context, APIKVReferenceCollection) (APIKVReferenceCollection, error)) APIKVReferenceCollectionPage { - return APIKVReferenceCollectionPage{ - fn: getNextPage, - arc: cur, +// Creates a new instance of the AppCollectionPage type. +func NewAppCollectionPage(cur AppCollection, getNextPage func(context.Context, AppCollection) (AppCollection, error)) AppCollectionPage { + return AppCollectionPage{ + fn: getNextPage, + ac: cur, } } -// APIKVReferenceProperties apiKVReference resource specific properties -type APIKVReferenceProperties struct { - Reference *string `json:"reference,omitempty"` - // Status - Possible values include: 'ResolveStatusInitialized', 'ResolveStatusResolved', 'ResolveStatusInvalidSyntax', 'ResolveStatusMSINotEnabled', 'ResolveStatusVaultNotFound', 'ResolveStatusSecretNotFound', 'ResolveStatusSecretVersionNotFound', 'ResolveStatusAccessToKeyVaultDenied', 'ResolveStatusOtherReasons', 'ResolveStatusFetchTimedOut', 'ResolveStatusUnauthorizedClient' - Status ResolveStatus `json:"status,omitempty"` - VaultName *string `json:"vaultName,omitempty"` - SecretName *string `json:"secretName,omitempty"` - SecretVersion *string `json:"secretVersion,omitempty"` - IdentityType *ManagedServiceIdentity `json:"identityType,omitempty"` - Details *string `json:"details,omitempty"` - // Source - Possible values include: 'ConfigReferenceSourceKeyVault' - Source ConfigReferenceSource `json:"source,omitempty"` - ActiveVersion *string `json:"activeVersion,omitempty"` +// AppInsightsWebAppStackSettings app Insights Web App stack settings. +type AppInsightsWebAppStackSettings struct { + // IsSupported - READ-ONLY; true if remote Application Insights is supported for the stack; otherwise, false. + IsSupported *bool `json:"isSupported,omitempty"` + // IsDefaultOff - READ-ONLY; true if Application Insights is disabled by default for the stack; otherwise, false. + IsDefaultOff *bool `json:"isDefaultOff,omitempty"` } -// APIManagementConfig azure API management (APIM) configuration linked to the app. -type APIManagementConfig struct { - // ID - APIM-Api Identifier. - ID *string `json:"id,omitempty"` +// MarshalJSON is the custom marshaler for AppInsightsWebAppStackSettings. +func (aiwass AppInsightsWebAppStackSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) } -// AppCollection collection of App Service apps. -type AppCollection struct { +// AppInstanceStatusCollection collection of app instances. +type AppInstanceStatusCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]Site `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for AppCollection. -func (ac AppCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ac.Value != nil { - objectMap["value"] = ac.Value - } - return json.Marshal(objectMap) -} - -// AppCollectionIterator provides access to a complete listing of Site values. -type AppCollectionIterator struct { - i int - page AppCollectionPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *AppCollectionIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppCollectionIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *AppCollectionIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter AppCollectionIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter AppCollectionIterator) Response() AppCollection { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter AppCollectionIterator) Value() Site { - if !iter.page.NotDone() { - return Site{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the AppCollectionIterator type. -func NewAppCollectionIterator(page AppCollectionPage) AppCollectionIterator { - return AppCollectionIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (ac AppCollection) IsEmpty() bool { - return ac.Value == nil || len(*ac.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (ac AppCollection) hasNextLink() bool { - return ac.NextLink != nil && len(*ac.NextLink) != 0 -} - -// appCollectionPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (ac AppCollection) appCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !ac.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ac.NextLink))) -} - -// AppCollectionPage contains a page of Site values. -type AppCollectionPage struct { - fn func(context.Context, AppCollection) (AppCollection, error) - ac AppCollection -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *AppCollectionPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppCollectionPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.ac) - if err != nil { - return err - } - page.ac = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *AppCollectionPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page AppCollectionPage) NotDone() bool { - return !page.ac.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page AppCollectionPage) Response() AppCollection { - return page.ac -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page AppCollectionPage) Values() []Site { - if page.ac.IsEmpty() { - return nil - } - return *page.ac.Value -} - -// Creates a new instance of the AppCollectionPage type. -func NewAppCollectionPage(cur AppCollection, getNextPage func(context.Context, AppCollection) (AppCollection, error)) AppCollectionPage { - return AppCollectionPage{ - fn: getNextPage, - ac: cur, - } -} - -// AppInsightsWebAppStackSettings app Insights Web App stack settings. -type AppInsightsWebAppStackSettings struct { - // IsSupported - READ-ONLY; true if remote Application Insights is supported for the stack; otherwise, false. - IsSupported *bool `json:"isSupported,omitempty"` - // IsDefaultOff - READ-ONLY; true if Application Insights is disabled by default for the stack; otherwise, false. - IsDefaultOff *bool `json:"isDefaultOff,omitempty"` -} - -// MarshalJSON is the custom marshaler for AppInsightsWebAppStackSettings. -func (aiwass AppInsightsWebAppStackSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// AppInstanceStatusCollection collection of app instances. -type AppInstanceStatusCollection struct { - autorest.Response `json:"-"` - // Value - Collection of resources. - Value *[]SiteInstanceStatus `json:"value,omitempty"` + Value *[]SiteInstanceStatus `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } @@ -908,80 +909,153 @@ func NewAppInstanceStatusCollectionPage(cur AppInstanceStatusCollection, getNext } } -// Apple the configuration settings of the Apple provider. -type Apple struct { - // Enabled - false if the Apple provider should not be enabled despite the set registration; otherwise, true. - Enabled *bool `json:"enabled,omitempty"` - // Registration - The configuration settings of the Apple registration. - Registration *AppleRegistration `json:"registration,omitempty"` - // Login - The configuration settings of the login flow. - Login *LoginScopes `json:"login,omitempty"` +// AppLogsConfiguration ... +type AppLogsConfiguration struct { + Destination *string `json:"destination,omitempty"` + LogAnalyticsConfiguration *LogAnalyticsConfiguration `json:"logAnalyticsConfiguration,omitempty"` } -// AppleRegistration the configuration settings of the registration for the Apple provider -type AppleRegistration struct { - // ClientID - The Client ID of the app used for login. - ClientID *string `json:"clientId,omitempty"` - // ClientSecretSettingName - The app setting name that contains the client secret. - ClientSecretSettingName *string `json:"clientSecretSettingName,omitempty"` +// AppMajorVersion web App stack major version. +type AppMajorVersion struct { + // DisplayText - READ-ONLY; Web App stack major version (display only). + DisplayText *string `json:"displayText,omitempty"` + // Value - READ-ONLY; Web App stack major version name. + Value *string `json:"value,omitempty"` + // MinorVersions - READ-ONLY; Minor versions associated with the major version. + MinorVersions *[]AppMinorVersion `json:"minorVersions,omitempty"` } -// ApplicationLogsConfig application logs configuration. -type ApplicationLogsConfig struct { - // FileSystem - Application logs to file system configuration. - FileSystem *FileSystemApplicationLogsConfig `json:"fileSystem,omitempty"` - // AzureTableStorage - Application logs to azure table storage configuration. - AzureTableStorage *AzureTableStorageApplicationLogsConfig `json:"azureTableStorage,omitempty"` - // AzureBlobStorage - Application logs to blob storage configuration. - AzureBlobStorage *AzureBlobStorageApplicationLogsConfig `json:"azureBlobStorage,omitempty"` +// MarshalJSON is the custom marshaler for AppMajorVersion. +func (amv AppMajorVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) } -// ApplicationStack application stack. -type ApplicationStack struct { - // Name - Application stack name. - Name *string `json:"name,omitempty"` - // Display - Application stack display name. - Display *string `json:"display,omitempty"` - // Dependency - Application stack dependency. - Dependency *string `json:"dependency,omitempty"` - // MajorVersions - List of major versions available. - MajorVersions *[]StackMajorVersion `json:"majorVersions,omitempty"` - // Frameworks - List of frameworks associated with application stack. - Frameworks *[]ApplicationStack `json:"frameworks,omitempty"` - // IsDeprecated - true if this is the stack is deprecated; otherwise, false. - IsDeprecated *[]ApplicationStack `json:"isDeprecated,omitempty"` +// AppMinorVersion web App stack minor version. +type AppMinorVersion struct { + // DisplayText - READ-ONLY; Web App stack minor version (display only). + DisplayText *string `json:"displayText,omitempty"` + // Value - READ-ONLY; Web App stack major version name. + Value *string `json:"value,omitempty"` + // StackSettings - READ-ONLY; Settings associated with the minor version. + StackSettings *AppRuntimes `json:"stackSettings,omitempty"` } -// ApplicationStackCollection collection of Application Stacks -type ApplicationStackCollection struct { +// MarshalJSON is the custom marshaler for AppMinorVersion. +func (amv AppMinorVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// AppRegistration the configuration settings of the app registration for providers that have app ids and +// app secrets +type AppRegistration struct { + // AppID - The App ID of the app used for login. + AppID *string `json:"appId,omitempty"` + // AppSecretSettingName - The app setting name that contains the app secret. + AppSecretSettingName *string `json:"appSecretSettingName,omitempty"` +} + +// AppRuntimeSettings web App runtime settings. +type AppRuntimeSettings struct { + // RuntimeVersion - READ-ONLY; Web App stack minor version (runtime only). + RuntimeVersion *string `json:"runtimeVersion,omitempty"` + // RemoteDebuggingSupported - READ-ONLY; true if remote debugging is supported for the stack; otherwise, false. + RemoteDebuggingSupported *bool `json:"remoteDebuggingSupported,omitempty"` + // AppInsightsSettings - READ-ONLY; Application Insights settings associated with the minor version. + AppInsightsSettings *AppInsightsWebAppStackSettings `json:"appInsightsSettings,omitempty"` + // GitHubActionSettings - READ-ONLY; GitHub Actions settings associated with the minor version. + GitHubActionSettings *GitHubActionWebAppStackSettings `json:"gitHubActionSettings,omitempty"` + // IsPreview - READ-ONLY; true if the stack is in preview; otherwise, false. + IsPreview *bool `json:"isPreview,omitempty"` + // IsDeprecated - READ-ONLY; true if the stack is deprecated; otherwise, false. + IsDeprecated *bool `json:"isDeprecated,omitempty"` + // IsHidden - READ-ONLY; true if the stack should be hidden; otherwise, false. + IsHidden *bool `json:"isHidden,omitempty"` + // EndOfLifeDate - READ-ONLY; End-of-life date for the minor version. + EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` + // IsAutoUpdate - READ-ONLY; true if the stack version is auto-updated; otherwise, false. + IsAutoUpdate *bool `json:"isAutoUpdate,omitempty"` + // IsEarlyAccess - READ-ONLY; true if the minor version is early-access; otherwise, false. + IsEarlyAccess *bool `json:"isEarlyAccess,omitempty"` +} + +// MarshalJSON is the custom marshaler for AppRuntimeSettings. +func (ars AppRuntimeSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// AppRuntimes web App stack runtimes. +type AppRuntimes struct { + // LinuxRuntimeSettings - READ-ONLY; Linux-specific settings associated with the minor version. + LinuxRuntimeSettings *AppRuntimeSettings `json:"linuxRuntimeSettings,omitempty"` + // WindowsRuntimeSettings - READ-ONLY; Windows-specific settings associated with the minor version. + WindowsRuntimeSettings *AppRuntimeSettings `json:"windowsRuntimeSettings,omitempty"` + // LinuxContainerSettings - READ-ONLY; Linux-specific settings associated with the Java container minor version. + LinuxContainerSettings *LinuxJavaContainerSettings `json:"linuxContainerSettings,omitempty"` + // WindowsContainerSettings - READ-ONLY; Windows-specific settings associated with the Java container minor version. + WindowsContainerSettings *WindowsJavaContainerSettings `json:"windowsContainerSettings,omitempty"` +} + +// MarshalJSON is the custom marshaler for AppRuntimes. +func (ar AppRuntimes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// AppServiceCertificate key Vault container for a certificate that is purchased through Azure. +type AppServiceCertificate struct { + // KeyVaultID - Key Vault resource Id. + KeyVaultID *string `json:"keyVaultId,omitempty"` + // KeyVaultSecretName - Key Vault secret name. + KeyVaultSecretName *string `json:"keyVaultSecretName,omitempty"` + // ProvisioningState - READ-ONLY; Status of the Key Vault secret. Possible values include: 'KeyVaultSecretStatusInitialized', 'KeyVaultSecretStatusWaitingOnCertificateOrder', 'KeyVaultSecretStatusSucceeded', 'KeyVaultSecretStatusCertificateOrderFailed', 'KeyVaultSecretStatusOperationNotPermittedOnKeyVault', 'KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultSecretStatusKeyVaultDoesNotExist', 'KeyVaultSecretStatusKeyVaultSecretDoesNotExist', 'KeyVaultSecretStatusUnknownError', 'KeyVaultSecretStatusExternalPrivateKey', 'KeyVaultSecretStatusUnknown' + ProvisioningState KeyVaultSecretStatus `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for AppServiceCertificate. +func (asc AppServiceCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asc.KeyVaultID != nil { + objectMap["keyVaultId"] = asc.KeyVaultID + } + if asc.KeyVaultSecretName != nil { + objectMap["keyVaultSecretName"] = asc.KeyVaultSecretName + } + return json.Marshal(objectMap) +} + +// AppServiceCertificateCollection collection of certificate order certificates. +type AppServiceCertificateCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]ApplicationStackResource `json:"value,omitempty"` + Value *[]AppServiceCertificateResource `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for ApplicationStackCollection. -func (asc ApplicationStackCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for AppServiceCertificateCollection. +func (ascc AppServiceCertificateCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if asc.Value != nil { - objectMap["value"] = asc.Value + if ascc.Value != nil { + objectMap["value"] = ascc.Value } return json.Marshal(objectMap) } -// ApplicationStackCollectionIterator provides access to a complete listing of ApplicationStackResource -// values. -type ApplicationStackCollectionIterator struct { +// AppServiceCertificateCollectionIterator provides access to a complete listing of +// AppServiceCertificateResource values. +type AppServiceCertificateCollectionIterator struct { i int - page ApplicationStackCollectionPage + page AppServiceCertificateCollectionPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ApplicationStackCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *AppServiceCertificateCollectionIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationStackCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceCertificateCollectionIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -1006,67 +1080,67 @@ func (iter *ApplicationStackCollectionIterator) NextWithContext(ctx context.Cont // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ApplicationStackCollectionIterator) Next() error { +func (iter *AppServiceCertificateCollectionIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ApplicationStackCollectionIterator) NotDone() bool { +func (iter AppServiceCertificateCollectionIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ApplicationStackCollectionIterator) Response() ApplicationStackCollection { +func (iter AppServiceCertificateCollectionIterator) Response() AppServiceCertificateCollection { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ApplicationStackCollectionIterator) Value() ApplicationStackResource { +func (iter AppServiceCertificateCollectionIterator) Value() AppServiceCertificateResource { if !iter.page.NotDone() { - return ApplicationStackResource{} + return AppServiceCertificateResource{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ApplicationStackCollectionIterator type. -func NewApplicationStackCollectionIterator(page ApplicationStackCollectionPage) ApplicationStackCollectionIterator { - return ApplicationStackCollectionIterator{page: page} +// Creates a new instance of the AppServiceCertificateCollectionIterator type. +func NewAppServiceCertificateCollectionIterator(page AppServiceCertificateCollectionPage) AppServiceCertificateCollectionIterator { + return AppServiceCertificateCollectionIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (asc ApplicationStackCollection) IsEmpty() bool { - return asc.Value == nil || len(*asc.Value) == 0 +func (ascc AppServiceCertificateCollection) IsEmpty() bool { + return ascc.Value == nil || len(*ascc.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (asc ApplicationStackCollection) hasNextLink() bool { - return asc.NextLink != nil && len(*asc.NextLink) != 0 +func (ascc AppServiceCertificateCollection) hasNextLink() bool { + return ascc.NextLink != nil && len(*ascc.NextLink) != 0 } -// applicationStackCollectionPreparer prepares a request to retrieve the next set of results. +// appServiceCertificateCollectionPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (asc ApplicationStackCollection) applicationStackCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !asc.hasNextLink() { +func (ascc AppServiceCertificateCollection) appServiceCertificateCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !ascc.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(asc.NextLink))) + autorest.WithBaseURL(to.String(ascc.NextLink))) } -// ApplicationStackCollectionPage contains a page of ApplicationStackResource values. -type ApplicationStackCollectionPage struct { - fn func(context.Context, ApplicationStackCollection) (ApplicationStackCollection, error) - asc ApplicationStackCollection +// AppServiceCertificateCollectionPage contains a page of AppServiceCertificateResource values. +type AppServiceCertificateCollectionPage struct { + fn func(context.Context, AppServiceCertificateCollection) (AppServiceCertificateCollection, error) + ascc AppServiceCertificateCollection } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ApplicationStackCollectionPage) NextWithContext(ctx context.Context) (err error) { +func (page *AppServiceCertificateCollectionPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationStackCollectionPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceCertificateCollectionPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -1076,11 +1150,11 @@ func (page *ApplicationStackCollectionPage) NextWithContext(ctx context.Context) }() } for { - next, err := page.fn(ctx, page.asc) + next, err := page.fn(ctx, page.ascc) if err != nil { return err } - page.asc = next + page.ascc = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -1091,64 +1165,75 @@ func (page *ApplicationStackCollectionPage) NextWithContext(ctx context.Context) // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *ApplicationStackCollectionPage) Next() error { +func (page *AppServiceCertificateCollectionPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ApplicationStackCollectionPage) NotDone() bool { - return !page.asc.IsEmpty() +func (page AppServiceCertificateCollectionPage) NotDone() bool { + return !page.ascc.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ApplicationStackCollectionPage) Response() ApplicationStackCollection { - return page.asc +func (page AppServiceCertificateCollectionPage) Response() AppServiceCertificateCollection { + return page.ascc } // Values returns the slice of values for the current page or nil if there are no values. -func (page ApplicationStackCollectionPage) Values() []ApplicationStackResource { - if page.asc.IsEmpty() { +func (page AppServiceCertificateCollectionPage) Values() []AppServiceCertificateResource { + if page.ascc.IsEmpty() { return nil } - return *page.asc.Value + return *page.ascc.Value } -// Creates a new instance of the ApplicationStackCollectionPage type. -func NewApplicationStackCollectionPage(cur ApplicationStackCollection, getNextPage func(context.Context, ApplicationStackCollection) (ApplicationStackCollection, error)) ApplicationStackCollectionPage { - return ApplicationStackCollectionPage{ - fn: getNextPage, - asc: cur, +// Creates a new instance of the AppServiceCertificateCollectionPage type. +func NewAppServiceCertificateCollectionPage(cur AppServiceCertificateCollection, getNextPage func(context.Context, AppServiceCertificateCollection) (AppServiceCertificateCollection, error)) AppServiceCertificateCollectionPage { + return AppServiceCertificateCollectionPage{ + fn: getNextPage, + ascc: cur, } } -// ApplicationStackResource ARM resource for a ApplicationStack. -type ApplicationStackResource struct { - // ApplicationStack - Core resource properties - *ApplicationStack `json:"properties,omitempty"` +// AppServiceCertificateOrder SSL certificate purchase order. +type AppServiceCertificateOrder struct { + autorest.Response `json:"-"` + // AppServiceCertificateOrderProperties - AppServiceCertificateOrder resource specific properties + *AppServiceCertificateOrderProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. Name *string `json:"name,omitempty"` // Kind - Kind of resource. Kind *string `json:"kind,omitempty"` + // Location - Resource Location. + Location *string `json:"location,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for ApplicationStackResource. -func (asr ApplicationStackResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for AppServiceCertificateOrder. +func (asco AppServiceCertificateOrder) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if asr.ApplicationStack != nil { - objectMap["properties"] = asr.ApplicationStack + if asco.AppServiceCertificateOrderProperties != nil { + objectMap["properties"] = asco.AppServiceCertificateOrderProperties } - if asr.Kind != nil { - objectMap["kind"] = asr.Kind + if asco.Kind != nil { + objectMap["kind"] = asco.Kind + } + if asco.Location != nil { + objectMap["location"] = asco.Location + } + if asco.Tags != nil { + objectMap["tags"] = asco.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ApplicationStackResource struct. -func (asr *ApplicationStackResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for AppServiceCertificateOrder struct. +func (asco *AppServiceCertificateOrder) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -1158,12 +1243,12 @@ func (asr *ApplicationStackResource) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var applicationStack ApplicationStack - err = json.Unmarshal(*v, &applicationStack) + var appServiceCertificateOrderProperties AppServiceCertificateOrderProperties + err = json.Unmarshal(*v, &appServiceCertificateOrderProperties) if err != nil { return err } - asr.ApplicationStack = &applicationStack + asco.AppServiceCertificateOrderProperties = &appServiceCertificateOrderProperties } case "id": if v != nil { @@ -1172,7 +1257,7 @@ func (asr *ApplicationStackResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - asr.ID = &ID + asco.ID = &ID } case "name": if v != nil { @@ -1181,7 +1266,7 @@ func (asr *ApplicationStackResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - asr.Name = &name + asco.Name = &name } case "kind": if v != nil { @@ -1190,7 +1275,16 @@ func (asr *ApplicationStackResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - asr.Kind = &kind + asco.Kind = &kind + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + asco.Location = &location } case "type": if v != nil { @@ -1199,7 +1293,16 @@ func (asr *ApplicationStackResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - asr.Type = &typeVar + asco.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + asco.Tags = tags } } } @@ -1207,155 +1310,416 @@ func (asr *ApplicationStackResource) UnmarshalJSON(body []byte) error { return nil } -// AppLogsConfiguration ... -type AppLogsConfiguration struct { - Destination *string `json:"destination,omitempty"` - LogAnalyticsConfiguration *LogAnalyticsConfiguration `json:"logAnalyticsConfiguration,omitempty"` +// AppServiceCertificateOrderCollection collection of certificate orders. +type AppServiceCertificateOrderCollection struct { + autorest.Response `json:"-"` + // Value - Collection of resources. + Value *[]AppServiceCertificateOrder `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty"` } -// AppMajorVersion web App stack major version. -type AppMajorVersion struct { - // DisplayText - READ-ONLY; Web App stack major version (display only). - DisplayText *string `json:"displayText,omitempty"` - // Value - READ-ONLY; Web App stack major version name. - Value *string `json:"value,omitempty"` - // MinorVersions - READ-ONLY; Minor versions associated with the major version. - MinorVersions *[]AppMinorVersion `json:"minorVersions,omitempty"` -} - -// MarshalJSON is the custom marshaler for AppMajorVersion. -func (amv AppMajorVersion) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for AppServiceCertificateOrderCollection. +func (ascoc AppServiceCertificateOrderCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if ascoc.Value != nil { + objectMap["value"] = ascoc.Value + } return json.Marshal(objectMap) } -// AppMinorVersion web App stack minor version. -type AppMinorVersion struct { - // DisplayText - READ-ONLY; Web App stack minor version (display only). - DisplayText *string `json:"displayText,omitempty"` - // Value - READ-ONLY; Web App stack major version name. - Value *string `json:"value,omitempty"` - // StackSettings - READ-ONLY; Settings associated with the minor version. - StackSettings *AppRuntimes `json:"stackSettings,omitempty"` +// AppServiceCertificateOrderCollectionIterator provides access to a complete listing of +// AppServiceCertificateOrder values. +type AppServiceCertificateOrderCollectionIterator struct { + i int + page AppServiceCertificateOrderCollectionPage } -// MarshalJSON is the custom marshaler for AppMinorVersion. -func (amv AppMinorVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *AppServiceCertificateOrderCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceCertificateOrderCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil } -// AppRegistration the configuration settings of the app registration for providers that have app ids and -// app secrets -type AppRegistration struct { - // AppID - The App ID of the app used for login. - AppID *string `json:"appId,omitempty"` - // AppSecretSettingName - The app setting name that contains the app secret. - AppSecretSettingName *string `json:"appSecretSettingName,omitempty"` +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *AppServiceCertificateOrderCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) } -// AppRuntimes web App stack runtimes. -type AppRuntimes struct { - // LinuxRuntimeSettings - READ-ONLY; Linux-specific settings associated with the minor version. - LinuxRuntimeSettings *AppRuntimeSettings `json:"linuxRuntimeSettings,omitempty"` - // WindowsRuntimeSettings - READ-ONLY; Windows-specific settings associated with the minor version. - WindowsRuntimeSettings *AppRuntimeSettings `json:"windowsRuntimeSettings,omitempty"` - // LinuxContainerSettings - READ-ONLY; Linux-specific settings associated with the Java container minor version. - LinuxContainerSettings *LinuxJavaContainerSettings `json:"linuxContainerSettings,omitempty"` - // WindowsContainerSettings - READ-ONLY; Windows-specific settings associated with the Java container minor version. - WindowsContainerSettings *WindowsJavaContainerSettings `json:"windowsContainerSettings,omitempty"` +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AppServiceCertificateOrderCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) } -// MarshalJSON is the custom marshaler for AppRuntimes. -func (ar AppRuntimes) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) +// Response returns the raw server response from the last page request. +func (iter AppServiceCertificateOrderCollectionIterator) Response() AppServiceCertificateOrderCollection { + return iter.page.Response() } -// AppRuntimeSettings web App runtime settings. -type AppRuntimeSettings struct { - // RuntimeVersion - READ-ONLY; Web App stack minor version (runtime only). - RuntimeVersion *string `json:"runtimeVersion,omitempty"` - // RemoteDebuggingSupported - READ-ONLY; true if remote debugging is supported for the stack; otherwise, false. - RemoteDebuggingSupported *bool `json:"remoteDebuggingSupported,omitempty"` - // AppInsightsSettings - READ-ONLY; Application Insights settings associated with the minor version. - AppInsightsSettings *AppInsightsWebAppStackSettings `json:"appInsightsSettings,omitempty"` - // GitHubActionSettings - READ-ONLY; GitHub Actions settings associated with the minor version. - GitHubActionSettings *GitHubActionWebAppStackSettings `json:"gitHubActionSettings,omitempty"` - // IsPreview - READ-ONLY; true if the stack is in preview; otherwise, false. - IsPreview *bool `json:"isPreview,omitempty"` - // IsDeprecated - READ-ONLY; true if the stack is deprecated; otherwise, false. - IsDeprecated *bool `json:"isDeprecated,omitempty"` - // IsHidden - READ-ONLY; true if the stack should be hidden; otherwise, false. - IsHidden *bool `json:"isHidden,omitempty"` - // EndOfLifeDate - READ-ONLY; End-of-life date for the minor version. - EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` - // IsAutoUpdate - READ-ONLY; true if the stack version is auto-updated; otherwise, false. - IsAutoUpdate *bool `json:"isAutoUpdate,omitempty"` - // IsEarlyAccess - READ-ONLY; true if the minor version is early-access; otherwise, false. - IsEarlyAccess *bool `json:"isEarlyAccess,omitempty"` +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter AppServiceCertificateOrderCollectionIterator) Value() AppServiceCertificateOrder { + if !iter.page.NotDone() { + return AppServiceCertificateOrder{} + } + return iter.page.Values()[iter.i] } -// MarshalJSON is the custom marshaler for AppRuntimeSettings. -func (ars AppRuntimeSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) +// Creates a new instance of the AppServiceCertificateOrderCollectionIterator type. +func NewAppServiceCertificateOrderCollectionIterator(page AppServiceCertificateOrderCollectionPage) AppServiceCertificateOrderCollectionIterator { + return AppServiceCertificateOrderCollectionIterator{page: page} } -// AppsApproveOrRejectPrivateEndpointConnectionFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type AppsApproveOrRejectPrivateEndpointConnectionFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(AppsClient) (RemotePrivateEndpointConnectionARMResource, error) +// IsEmpty returns true if the ListResult contains no values. +func (ascoc AppServiceCertificateOrderCollection) IsEmpty() bool { + return ascoc.Value == nil || len(*ascoc.Value) == 0 } -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppsApproveOrRejectPrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err +// hasNextLink returns true if the NextLink is not empty. +func (ascoc AppServiceCertificateOrderCollection) hasNextLink() bool { + return ascoc.NextLink != nil && len(*ascoc.NextLink) != 0 +} + +// appServiceCertificateOrderCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ascoc AppServiceCertificateOrderCollection) appServiceCertificateOrderCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !ascoc.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ascoc.NextLink))) +} + +// AppServiceCertificateOrderCollectionPage contains a page of AppServiceCertificateOrder values. +type AppServiceCertificateOrderCollectionPage struct { + fn func(context.Context, AppServiceCertificateOrderCollection) (AppServiceCertificateOrderCollection, error) + ascoc AppServiceCertificateOrderCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *AppServiceCertificateOrderCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceCertificateOrderCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.ascoc) + if err != nil { + return err + } + page.ascoc = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - future.FutureAPI = &azFuture - future.Result = future.result return nil } -// result is the default implementation for AppsApproveOrRejectPrivateEndpointConnectionFuture.Result. -func (future *AppsApproveOrRejectPrivateEndpointConnectionFuture) result(client AppsClient) (rpecar RemotePrivateEndpointConnectionARMResource, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsApproveOrRejectPrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure") - return +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *AppServiceCertificateOrderCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AppServiceCertificateOrderCollectionPage) NotDone() bool { + return !page.ascoc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AppServiceCertificateOrderCollectionPage) Response() AppServiceCertificateOrderCollection { + return page.ascoc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AppServiceCertificateOrderCollectionPage) Values() []AppServiceCertificateOrder { + if page.ascoc.IsEmpty() { + return nil } - if !done { - rpecar.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppsApproveOrRejectPrivateEndpointConnectionFuture") - return + return *page.ascoc.Value +} + +// Creates a new instance of the AppServiceCertificateOrderCollectionPage type. +func NewAppServiceCertificateOrderCollectionPage(cur AppServiceCertificateOrderCollection, getNextPage func(context.Context, AppServiceCertificateOrderCollection) (AppServiceCertificateOrderCollection, error)) AppServiceCertificateOrderCollectionPage { + return AppServiceCertificateOrderCollectionPage{ + fn: getNextPage, + ascoc: cur, } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rpecar.Response.Response, err = future.GetResult(sender); err == nil && rpecar.Response.Response.StatusCode != http.StatusNoContent { - rpecar, err = client.ApproveOrRejectPrivateEndpointConnectionResponder(rpecar.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsApproveOrRejectPrivateEndpointConnectionFuture", "Result", rpecar.Response.Response, "Failure responding to request") +} + +// AppServiceCertificateOrderPatchResource ARM resource for a certificate order that is purchased through +// Azure. +type AppServiceCertificateOrderPatchResource struct { + // AppServiceCertificateOrderPatchResourceProperties - AppServiceCertificateOrderPatchResource resource specific properties + *AppServiceCertificateOrderPatchResourceProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for AppServiceCertificateOrderPatchResource. +func (ascopr AppServiceCertificateOrderPatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ascopr.AppServiceCertificateOrderPatchResourceProperties != nil { + objectMap["properties"] = ascopr.AppServiceCertificateOrderPatchResourceProperties + } + if ascopr.Kind != nil { + objectMap["kind"] = ascopr.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AppServiceCertificateOrderPatchResource struct. +func (ascopr *AppServiceCertificateOrderPatchResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var appServiceCertificateOrderPatchResourceProperties AppServiceCertificateOrderPatchResourceProperties + err = json.Unmarshal(*v, &appServiceCertificateOrderPatchResourceProperties) + if err != nil { + return err + } + ascopr.AppServiceCertificateOrderPatchResourceProperties = &appServiceCertificateOrderPatchResourceProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ascopr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ascopr.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + ascopr.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ascopr.Type = &typeVar + } } } - return + + return nil } -// AppsApproveOrRejectPrivateEndpointConnectionSlotFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type AppsApproveOrRejectPrivateEndpointConnectionSlotFuture struct { +// AppServiceCertificateOrderPatchResourceProperties appServiceCertificateOrderPatchResource resource +// specific properties +type AppServiceCertificateOrderPatchResourceProperties struct { + // Certificates - State of the Key Vault secret. + Certificates map[string]*AppServiceCertificate `json:"certificates"` + // DistinguishedName - Certificate distinguished name. + DistinguishedName *string `json:"distinguishedName,omitempty"` + // DomainVerificationToken - READ-ONLY; Domain verification token. + DomainVerificationToken *string `json:"domainVerificationToken,omitempty"` + // ValidityInYears - Duration in years (must be 1). + ValidityInYears *int32 `json:"validityInYears,omitempty"` + // KeySize - Certificate key size. + KeySize *int32 `json:"keySize,omitempty"` + // ProductType - Certificate product type. Possible values include: 'CertificateProductTypeStandardDomainValidatedSsl', 'CertificateProductTypeStandardDomainValidatedWildCardSsl' + ProductType CertificateProductType `json:"productType,omitempty"` + // AutoRenew - true if the certificate should be automatically renewed when it expires; otherwise, false. + AutoRenew *bool `json:"autoRenew,omitempty"` + // ProvisioningState - READ-ONLY; Status of certificate order. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // Status - READ-ONLY; Current order status. Possible values include: 'CertificateOrderStatusPendingissuance', 'CertificateOrderStatusIssued', 'CertificateOrderStatusRevoked', 'CertificateOrderStatusCanceled', 'CertificateOrderStatusDenied', 'CertificateOrderStatusPendingrevocation', 'CertificateOrderStatusPendingRekey', 'CertificateOrderStatusUnused', 'CertificateOrderStatusExpired', 'CertificateOrderStatusNotSubmitted' + Status CertificateOrderStatus `json:"status,omitempty"` + // SignedCertificate - READ-ONLY; Signed certificate. + SignedCertificate *CertificateDetails `json:"signedCertificate,omitempty"` + // Csr - Last CSR that was created for this order. + Csr *string `json:"csr,omitempty"` + // Intermediate - READ-ONLY; Intermediate certificate. + Intermediate *CertificateDetails `json:"intermediate,omitempty"` + // Root - READ-ONLY; Root certificate. + Root *CertificateDetails `json:"root,omitempty"` + // SerialNumber - READ-ONLY; Current serial number of the certificate. + SerialNumber *string `json:"serialNumber,omitempty"` + // LastCertificateIssuanceTime - READ-ONLY; Certificate last issuance time. + LastCertificateIssuanceTime *date.Time `json:"lastCertificateIssuanceTime,omitempty"` + // ExpirationTime - READ-ONLY; Certificate expiration time. + ExpirationTime *date.Time `json:"expirationTime,omitempty"` + // IsPrivateKeyExternal - READ-ONLY; true if private key is external; otherwise, false. + IsPrivateKeyExternal *bool `json:"isPrivateKeyExternal,omitempty"` + // AppServiceCertificateNotRenewableReasons - READ-ONLY; Reasons why App Service Certificate is not renewable at the current moment. + AppServiceCertificateNotRenewableReasons *[]ResourceNotRenewableReason `json:"appServiceCertificateNotRenewableReasons,omitempty"` + // NextAutoRenewalTimeStamp - READ-ONLY; Time stamp when the certificate would be auto renewed next + NextAutoRenewalTimeStamp *date.Time `json:"nextAutoRenewalTimeStamp,omitempty"` + // Contact - READ-ONLY; Contact info + Contact *CertificateOrderContact `json:"contact,omitempty"` +} + +// MarshalJSON is the custom marshaler for AppServiceCertificateOrderPatchResourceProperties. +func (ascopr AppServiceCertificateOrderPatchResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ascopr.Certificates != nil { + objectMap["certificates"] = ascopr.Certificates + } + if ascopr.DistinguishedName != nil { + objectMap["distinguishedName"] = ascopr.DistinguishedName + } + if ascopr.ValidityInYears != nil { + objectMap["validityInYears"] = ascopr.ValidityInYears + } + if ascopr.KeySize != nil { + objectMap["keySize"] = ascopr.KeySize + } + if ascopr.ProductType != "" { + objectMap["productType"] = ascopr.ProductType + } + if ascopr.AutoRenew != nil { + objectMap["autoRenew"] = ascopr.AutoRenew + } + if ascopr.Csr != nil { + objectMap["csr"] = ascopr.Csr + } + return json.Marshal(objectMap) +} + +// AppServiceCertificateOrderProperties appServiceCertificateOrder resource specific properties +type AppServiceCertificateOrderProperties struct { + // Certificates - State of the Key Vault secret. + Certificates map[string]*AppServiceCertificate `json:"certificates"` + // DistinguishedName - Certificate distinguished name. + DistinguishedName *string `json:"distinguishedName,omitempty"` + // DomainVerificationToken - READ-ONLY; Domain verification token. + DomainVerificationToken *string `json:"domainVerificationToken,omitempty"` + // ValidityInYears - Duration in years (must be 1). + ValidityInYears *int32 `json:"validityInYears,omitempty"` + // KeySize - Certificate key size. + KeySize *int32 `json:"keySize,omitempty"` + // ProductType - Certificate product type. Possible values include: 'CertificateProductTypeStandardDomainValidatedSsl', 'CertificateProductTypeStandardDomainValidatedWildCardSsl' + ProductType CertificateProductType `json:"productType,omitempty"` + // AutoRenew - true if the certificate should be automatically renewed when it expires; otherwise, false. + AutoRenew *bool `json:"autoRenew,omitempty"` + // ProvisioningState - READ-ONLY; Status of certificate order. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // Status - READ-ONLY; Current order status. Possible values include: 'CertificateOrderStatusPendingissuance', 'CertificateOrderStatusIssued', 'CertificateOrderStatusRevoked', 'CertificateOrderStatusCanceled', 'CertificateOrderStatusDenied', 'CertificateOrderStatusPendingrevocation', 'CertificateOrderStatusPendingRekey', 'CertificateOrderStatusUnused', 'CertificateOrderStatusExpired', 'CertificateOrderStatusNotSubmitted' + Status CertificateOrderStatus `json:"status,omitempty"` + // SignedCertificate - READ-ONLY; Signed certificate. + SignedCertificate *CertificateDetails `json:"signedCertificate,omitempty"` + // Csr - Last CSR that was created for this order. + Csr *string `json:"csr,omitempty"` + // Intermediate - READ-ONLY; Intermediate certificate. + Intermediate *CertificateDetails `json:"intermediate,omitempty"` + // Root - READ-ONLY; Root certificate. + Root *CertificateDetails `json:"root,omitempty"` + // SerialNumber - READ-ONLY; Current serial number of the certificate. + SerialNumber *string `json:"serialNumber,omitempty"` + // LastCertificateIssuanceTime - READ-ONLY; Certificate last issuance time. + LastCertificateIssuanceTime *date.Time `json:"lastCertificateIssuanceTime,omitempty"` + // ExpirationTime - READ-ONLY; Certificate expiration time. + ExpirationTime *date.Time `json:"expirationTime,omitempty"` + // IsPrivateKeyExternal - READ-ONLY; true if private key is external; otherwise, false. + IsPrivateKeyExternal *bool `json:"isPrivateKeyExternal,omitempty"` + // AppServiceCertificateNotRenewableReasons - READ-ONLY; Reasons why App Service Certificate is not renewable at the current moment. + AppServiceCertificateNotRenewableReasons *[]ResourceNotRenewableReason `json:"appServiceCertificateNotRenewableReasons,omitempty"` + // NextAutoRenewalTimeStamp - READ-ONLY; Time stamp when the certificate would be auto renewed next + NextAutoRenewalTimeStamp *date.Time `json:"nextAutoRenewalTimeStamp,omitempty"` + // Contact - READ-ONLY; Contact info + Contact *CertificateOrderContact `json:"contact,omitempty"` +} + +// MarshalJSON is the custom marshaler for AppServiceCertificateOrderProperties. +func (asco AppServiceCertificateOrderProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asco.Certificates != nil { + objectMap["certificates"] = asco.Certificates + } + if asco.DistinguishedName != nil { + objectMap["distinguishedName"] = asco.DistinguishedName + } + if asco.ValidityInYears != nil { + objectMap["validityInYears"] = asco.ValidityInYears + } + if asco.KeySize != nil { + objectMap["keySize"] = asco.KeySize + } + if asco.ProductType != "" { + objectMap["productType"] = asco.ProductType + } + if asco.AutoRenew != nil { + objectMap["autoRenew"] = asco.AutoRenew + } + if asco.Csr != nil { + objectMap["csr"] = asco.Csr + } + return json.Marshal(objectMap) +} + +// AppServiceCertificateOrdersCreateOrUpdateCertificateFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type AppServiceCertificateOrdersCreateOrUpdateCertificateFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. - Result func(AppsClient) (RemotePrivateEndpointConnectionARMResource, error) + Result func(AppServiceCertificateOrdersClient) (AppServiceCertificateResource, error) } // UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppsApproveOrRejectPrivateEndpointConnectionSlotFuture) UnmarshalJSON(body []byte) error { +func (future *AppServiceCertificateOrdersCreateOrUpdateCertificateFuture) UnmarshalJSON(body []byte) error { var azFuture azure.Future if err := json.Unmarshal(body, &azFuture); err != nil { return err @@ -1365,40 +1729,40 @@ func (future *AppsApproveOrRejectPrivateEndpointConnectionSlotFuture) UnmarshalJ return nil } -// result is the default implementation for AppsApproveOrRejectPrivateEndpointConnectionSlotFuture.Result. -func (future *AppsApproveOrRejectPrivateEndpointConnectionSlotFuture) result(client AppsClient) (rpecar RemotePrivateEndpointConnectionARMResource, err error) { +// result is the default implementation for AppServiceCertificateOrdersCreateOrUpdateCertificateFuture.Result. +func (future *AppServiceCertificateOrdersCreateOrUpdateCertificateFuture) result(client AppServiceCertificateOrdersClient) (ascr AppServiceCertificateResource, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsApproveOrRejectPrivateEndpointConnectionSlotFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateCertificateFuture", "Result", future.Response(), "Polling failure") return } if !done { - rpecar.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppsApproveOrRejectPrivateEndpointConnectionSlotFuture") + ascr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppServiceCertificateOrdersCreateOrUpdateCertificateFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rpecar.Response.Response, err = future.GetResult(sender); err == nil && rpecar.Response.Response.StatusCode != http.StatusNoContent { - rpecar, err = client.ApproveOrRejectPrivateEndpointConnectionSlotResponder(rpecar.Response.Response) + if ascr.Response.Response, err = future.GetResult(sender); err == nil && ascr.Response.Response.StatusCode != http.StatusNoContent { + ascr, err = client.CreateOrUpdateCertificateResponder(ascr.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsApproveOrRejectPrivateEndpointConnectionSlotFuture", "Result", rpecar.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateCertificateFuture", "Result", ascr.Response.Response, "Failure responding to request") } } return } -// AppsCreateFunctionFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type AppsCreateFunctionFuture struct { +// AppServiceCertificateOrdersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type AppServiceCertificateOrdersCreateOrUpdateFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. - Result func(AppsClient) (FunctionEnvelope, error) + Result func(AppServiceCertificateOrdersClient) (AppServiceCertificateOrder, error) } // UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppsCreateFunctionFuture) UnmarshalJSON(body []byte) error { +func (future *AppServiceCertificateOrdersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { var azFuture azure.Future if err := json.Unmarshal(body, &azFuture); err != nil { return err @@ -1408,639 +1772,435 @@ func (future *AppsCreateFunctionFuture) UnmarshalJSON(body []byte) error { return nil } -// result is the default implementation for AppsCreateFunctionFuture.Result. -func (future *AppsCreateFunctionFuture) result(client AppsClient) (fe FunctionEnvelope, err error) { +// result is the default implementation for AppServiceCertificateOrdersCreateOrUpdateFuture.Result. +func (future *AppServiceCertificateOrdersCreateOrUpdateFuture) result(client AppServiceCertificateOrdersClient) (asco AppServiceCertificateOrder, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsCreateFunctionFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - fe.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppsCreateFunctionFuture") + asco.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppServiceCertificateOrdersCreateOrUpdateFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if fe.Response.Response, err = future.GetResult(sender); err == nil && fe.Response.Response.StatusCode != http.StatusNoContent { - fe, err = client.CreateFunctionResponder(fe.Response.Response) + if asco.Response.Response, err = future.GetResult(sender); err == nil && asco.Response.Response.StatusCode != http.StatusNoContent { + asco, err = client.CreateOrUpdateResponder(asco.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsCreateFunctionFuture", "Result", fe.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateFuture", "Result", asco.Response.Response, "Failure responding to request") } } return } -// AppsCreateInstanceFunctionSlotFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type AppsCreateInstanceFunctionSlotFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(AppsClient) (FunctionEnvelope, error) -} +// AppServiceCertificatePatchResource key Vault container ARM resource for a certificate that is purchased +// through Azure. +type AppServiceCertificatePatchResource struct { + // AppServiceCertificate - Core resource properties + *AppServiceCertificate `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppsCreateInstanceFunctionSlotFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err +// MarshalJSON is the custom marshaler for AppServiceCertificatePatchResource. +func (ascpr AppServiceCertificatePatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ascpr.AppServiceCertificate != nil { + objectMap["properties"] = ascpr.AppServiceCertificate } - future.FutureAPI = &azFuture - future.Result = future.result - return nil + if ascpr.Kind != nil { + objectMap["kind"] = ascpr.Kind + } + return json.Marshal(objectMap) } -// result is the default implementation for AppsCreateInstanceFunctionSlotFuture.Result. -func (future *AppsCreateInstanceFunctionSlotFuture) result(client AppsClient) (fe FunctionEnvelope, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) +// UnmarshalJSON is the custom unmarshaler for AppServiceCertificatePatchResource struct. +func (ascpr *AppServiceCertificatePatchResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceFunctionSlotFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - fe.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceFunctionSlotFuture") - return + return err } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if fe.Response.Response, err = future.GetResult(sender); err == nil && fe.Response.Response.StatusCode != http.StatusNoContent { - fe, err = client.CreateInstanceFunctionSlotResponder(fe.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceFunctionSlotFuture", "Result", fe.Response.Response, "Failure responding to request") + for k, v := range m { + switch k { + case "properties": + if v != nil { + var appServiceCertificate AppServiceCertificate + err = json.Unmarshal(*v, &appServiceCertificate) + if err != nil { + return err + } + ascpr.AppServiceCertificate = &appServiceCertificate + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ascpr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ascpr.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + ascpr.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ascpr.Type = &typeVar + } } } - return -} -// AppsCreateInstanceMSDeployOperationFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type AppsCreateInstanceMSDeployOperationFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(AppsClient) (MSDeployStatus, error) + return nil } -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppsCreateInstanceMSDeployOperationFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil +// AppServiceCertificateResource key Vault container ARM resource for a certificate that is purchased +// through Azure. +type AppServiceCertificateResource struct { + autorest.Response `json:"-"` + // AppServiceCertificate - Core resource properties + *AppServiceCertificate `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Location - Resource Location. + Location *string `json:"location,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` } -// result is the default implementation for AppsCreateInstanceMSDeployOperationFuture.Result. -func (future *AppsCreateInstanceMSDeployOperationFuture) result(client AppsClient) (mds MSDeployStatus, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationFuture", "Result", future.Response(), "Polling failure") - return +// MarshalJSON is the custom marshaler for AppServiceCertificateResource. +func (ascr AppServiceCertificateResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ascr.AppServiceCertificate != nil { + objectMap["properties"] = ascr.AppServiceCertificate } - if !done { - mds.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceMSDeployOperationFuture") - return + if ascr.Kind != nil { + objectMap["kind"] = ascr.Kind } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if mds.Response.Response, err = future.GetResult(sender); err == nil && mds.Response.Response.StatusCode != http.StatusNoContent { - mds, err = client.CreateInstanceMSDeployOperationResponder(mds.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationFuture", "Result", mds.Response.Response, "Failure responding to request") - } + if ascr.Location != nil { + objectMap["location"] = ascr.Location } - return -} - -// AppsCreateInstanceMSDeployOperationSlotFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type AppsCreateInstanceMSDeployOperationSlotFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(AppsClient) (MSDeployStatus, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppsCreateInstanceMSDeployOperationSlotFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err + if ascr.Tags != nil { + objectMap["tags"] = ascr.Tags } - future.FutureAPI = &azFuture - future.Result = future.result - return nil + return json.Marshal(objectMap) } -// result is the default implementation for AppsCreateInstanceMSDeployOperationSlotFuture.Result. -func (future *AppsCreateInstanceMSDeployOperationSlotFuture) result(client AppsClient) (mds MSDeployStatus, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) +// UnmarshalJSON is the custom unmarshaler for AppServiceCertificateResource struct. +func (ascr *AppServiceCertificateResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationSlotFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - mds.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceMSDeployOperationSlotFuture") - return + return err } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if mds.Response.Response, err = future.GetResult(sender); err == nil && mds.Response.Response.StatusCode != http.StatusNoContent { - mds, err = client.CreateInstanceMSDeployOperationSlotResponder(mds.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationSlotFuture", "Result", mds.Response.Response, "Failure responding to request") + for k, v := range m { + switch k { + case "properties": + if v != nil { + var appServiceCertificate AppServiceCertificate + err = json.Unmarshal(*v, &appServiceCertificate) + if err != nil { + return err + } + ascr.AppServiceCertificate = &appServiceCertificate + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ascr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ascr.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + ascr.Kind = &kind + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ascr.Location = &location + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ascr.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ascr.Tags = tags + } } } - return -} -// AppsCreateMSDeployOperationFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type AppsCreateMSDeployOperationFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(AppsClient) (MSDeployStatus, error) + return nil } -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppsCreateMSDeployOperationFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil +// AppServiceEnvironment description of an App Service Environment. +type AppServiceEnvironment struct { + // ProvisioningState - READ-ONLY; Provisioning state of the App Service Environment. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // Status - READ-ONLY; Current status of the App Service Environment. Possible values include: 'HostingEnvironmentStatusPreparing', 'HostingEnvironmentStatusReady', 'HostingEnvironmentStatusScaling', 'HostingEnvironmentStatusDeleting' + Status HostingEnvironmentStatus `json:"status,omitempty"` + // VirtualNetwork - Description of the Virtual Network. + VirtualNetwork *VirtualNetworkProfile `json:"virtualNetwork,omitempty"` + // InternalLoadBalancingMode - Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. Possible values include: 'LoadBalancingModeNone', 'LoadBalancingModeWeb', 'LoadBalancingModePublishing', 'LoadBalancingModeWebPublishing' + InternalLoadBalancingMode LoadBalancingMode `json:"internalLoadBalancingMode,omitempty"` + // MultiSize - Front-end VM size, e.g. "Medium", "Large". + MultiSize *string `json:"multiSize,omitempty"` + // MultiRoleCount - READ-ONLY; Number of front-end instances. + MultiRoleCount *int32 `json:"multiRoleCount,omitempty"` + // IpsslAddressCount - Number of IP SSL addresses reserved for the App Service Environment. + IpsslAddressCount *int32 `json:"ipsslAddressCount,omitempty"` + // DNSSuffix - DNS suffix of the App Service Environment. + DNSSuffix *string `json:"dnsSuffix,omitempty"` + // MaximumNumberOfMachines - READ-ONLY; Maximum number of VMs in the App Service Environment. + MaximumNumberOfMachines *int32 `json:"maximumNumberOfMachines,omitempty"` + // FrontEndScaleFactor - Scale factor for front-ends. + FrontEndScaleFactor *int32 `json:"frontEndScaleFactor,omitempty"` + // Suspended - READ-ONLY; true if the App Service Environment is suspended; otherwise, false. The environment can be suspended, e.g. when the management endpoint is no longer available + // (most likely because NSG blocked the incoming traffic). + Suspended *bool `json:"suspended,omitempty"` + // ClusterSettings - Custom settings for changing the behavior of the App Service Environment. + ClusterSettings *[]NameValuePair `json:"clusterSettings,omitempty"` + // UserWhitelistedIPRanges - User added ip ranges to whitelist on ASE db + UserWhitelistedIPRanges *[]string `json:"userWhitelistedIpRanges,omitempty"` + // HasLinuxWorkers - READ-ONLY; Flag that displays whether an ASE has linux workers or not + HasLinuxWorkers *bool `json:"hasLinuxWorkers,omitempty"` + // UpgradePreference - Upgrade Preference. Possible values include: 'UpgradePreferenceNone', 'UpgradePreferenceEarly', 'UpgradePreferenceLate', 'UpgradePreferenceManual' + UpgradePreference UpgradePreference `json:"upgradePreference,omitempty"` + // DedicatedHostCount - Dedicated Host Count + DedicatedHostCount *int32 `json:"dedicatedHostCount,omitempty"` + // ZoneRedundant - Whether or not this App Service Environment is zone-redundant. + ZoneRedundant *bool `json:"zoneRedundant,omitempty"` + CustomDNSSuffixConfiguration *CustomDNSSuffixConfiguration `json:"customDnsSuffixConfiguration,omitempty"` + NetworkingConfiguration *AseV3NetworkingConfiguration `json:"networkingConfiguration,omitempty"` + // UpgradeAvailability - READ-ONLY; Whether an upgrade is available for this App Service Environment. Possible values include: 'UpgradeAvailabilityNone', 'UpgradeAvailabilityReady' + UpgradeAvailability UpgradeAvailability `json:"upgradeAvailability,omitempty"` } -// result is the default implementation for AppsCreateMSDeployOperationFuture.Result. -func (future *AppsCreateMSDeployOperationFuture) result(client AppsClient) (mds MSDeployStatus, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationFuture", "Result", future.Response(), "Polling failure") - return +// MarshalJSON is the custom marshaler for AppServiceEnvironment. +func (ase AppServiceEnvironment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ase.VirtualNetwork != nil { + objectMap["virtualNetwork"] = ase.VirtualNetwork } - if !done { - mds.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppsCreateMSDeployOperationFuture") - return + if ase.InternalLoadBalancingMode != "" { + objectMap["internalLoadBalancingMode"] = ase.InternalLoadBalancingMode } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if mds.Response.Response, err = future.GetResult(sender); err == nil && mds.Response.Response.StatusCode != http.StatusNoContent { - mds, err = client.CreateMSDeployOperationResponder(mds.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationFuture", "Result", mds.Response.Response, "Failure responding to request") - } + if ase.MultiSize != nil { + objectMap["multiSize"] = ase.MultiSize } - return -} - -// AppsCreateMSDeployOperationSlotFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type AppsCreateMSDeployOperationSlotFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(AppsClient) (MSDeployStatus, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppsCreateMSDeployOperationSlotFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err + if ase.IpsslAddressCount != nil { + objectMap["ipsslAddressCount"] = ase.IpsslAddressCount } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for AppsCreateMSDeployOperationSlotFuture.Result. -func (future *AppsCreateMSDeployOperationSlotFuture) result(client AppsClient) (mds MSDeployStatus, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationSlotFuture", "Result", future.Response(), "Polling failure") - return + if ase.DNSSuffix != nil { + objectMap["dnsSuffix"] = ase.DNSSuffix } - if !done { - mds.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppsCreateMSDeployOperationSlotFuture") - return + if ase.FrontEndScaleFactor != nil { + objectMap["frontEndScaleFactor"] = ase.FrontEndScaleFactor } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if mds.Response.Response, err = future.GetResult(sender); err == nil && mds.Response.Response.StatusCode != http.StatusNoContent { - mds, err = client.CreateMSDeployOperationSlotResponder(mds.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationSlotFuture", "Result", mds.Response.Response, "Failure responding to request") - } + if ase.ClusterSettings != nil { + objectMap["clusterSettings"] = ase.ClusterSettings } - return + if ase.UserWhitelistedIPRanges != nil { + objectMap["userWhitelistedIpRanges"] = ase.UserWhitelistedIPRanges + } + if ase.UpgradePreference != "" { + objectMap["upgradePreference"] = ase.UpgradePreference + } + if ase.DedicatedHostCount != nil { + objectMap["dedicatedHostCount"] = ase.DedicatedHostCount + } + if ase.ZoneRedundant != nil { + objectMap["zoneRedundant"] = ase.ZoneRedundant + } + if ase.CustomDNSSuffixConfiguration != nil { + objectMap["customDnsSuffixConfiguration"] = ase.CustomDNSSuffixConfiguration + } + if ase.NetworkingConfiguration != nil { + objectMap["networkingConfiguration"] = ase.NetworkingConfiguration + } + return json.Marshal(objectMap) } -// AppsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type AppsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(AppsClient) (Site, error) +// AppServiceEnvironmentCollection collection of App Service Environments. +type AppServiceEnvironmentCollection struct { + autorest.Response `json:"-"` + // Value - Collection of resources. + Value *[]AppServiceEnvironmentResource `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty"` } -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err +// MarshalJSON is the custom marshaler for AppServiceEnvironmentCollection. +func (asec AppServiceEnvironmentCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asec.Value != nil { + objectMap["value"] = asec.Value } - future.FutureAPI = &azFuture - future.Result = future.result - return nil + return json.Marshal(objectMap) } -// result is the default implementation for AppsCreateOrUpdateFuture.Result. -func (future *AppsCreateOrUpdateFuture) result(client AppsClient) (s Site, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return +// AppServiceEnvironmentCollectionIterator provides access to a complete listing of +// AppServiceEnvironmentResource values. +type AppServiceEnvironmentCollectionIterator struct { + i int + page AppServiceEnvironmentCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *AppServiceEnvironmentCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - if !done { - s.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateFuture") - return + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { - s, err = client.CreateOrUpdateResponder(s.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request") - } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err } - return + iter.i = 0 + return nil } -// AppsCreateOrUpdateSlotFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type AppsCreateOrUpdateSlotFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(AppsClient) (Site, error) +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *AppServiceEnvironmentCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) } -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppsCreateOrUpdateSlotFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for AppsCreateOrUpdateSlotFuture.Result. -func (future *AppsCreateOrUpdateSlotFuture) result(client AppsClient) (s Site, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSlotFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - s.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSlotFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { - s, err = client.CreateOrUpdateSlotResponder(s.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSlotFuture", "Result", s.Response.Response, "Failure responding to request") - } - } - return -} - -// AppsCreateOrUpdateSourceControlFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type AppsCreateOrUpdateSourceControlFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(AppsClient) (SiteSourceControl, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppsCreateOrUpdateSourceControlFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for AppsCreateOrUpdateSourceControlFuture.Result. -func (future *AppsCreateOrUpdateSourceControlFuture) result(client AppsClient) (ssc SiteSourceControl, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ssc.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSourceControlFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ssc.Response.Response, err = future.GetResult(sender); err == nil && ssc.Response.Response.StatusCode != http.StatusNoContent { - ssc, err = client.CreateOrUpdateSourceControlResponder(ssc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlFuture", "Result", ssc.Response.Response, "Failure responding to request") - } - } - return -} - -// AppsCreateOrUpdateSourceControlSlotFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type AppsCreateOrUpdateSourceControlSlotFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(AppsClient) (SiteSourceControl, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppsCreateOrUpdateSourceControlSlotFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for AppsCreateOrUpdateSourceControlSlotFuture.Result. -func (future *AppsCreateOrUpdateSourceControlSlotFuture) result(client AppsClient) (ssc SiteSourceControl, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlSlotFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ssc.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSourceControlSlotFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ssc.Response.Response, err = future.GetResult(sender); err == nil && ssc.Response.Response.StatusCode != http.StatusNoContent { - ssc, err = client.CreateOrUpdateSourceControlSlotResponder(ssc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlSlotFuture", "Result", ssc.Response.Response, "Failure responding to request") - } - } - return -} - -// AppsDeletePrivateEndpointConnectionFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type AppsDeletePrivateEndpointConnectionFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(AppsClient) (SetObject, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppsDeletePrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for AppsDeletePrivateEndpointConnectionFuture.Result. -func (future *AppsDeletePrivateEndpointConnectionFuture) result(client AppsClient) (so SetObject, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsDeletePrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - so.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppsDeletePrivateEndpointConnectionFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { - so, err = client.DeletePrivateEndpointConnectionResponder(so.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsDeletePrivateEndpointConnectionFuture", "Result", so.Response.Response, "Failure responding to request") - } - } - return -} - -// AppsDeletePrivateEndpointConnectionSlotFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type AppsDeletePrivateEndpointConnectionSlotFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(AppsClient) (SetObject, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppsDeletePrivateEndpointConnectionSlotFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for AppsDeletePrivateEndpointConnectionSlotFuture.Result. -func (future *AppsDeletePrivateEndpointConnectionSlotFuture) result(client AppsClient) (so SetObject, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsDeletePrivateEndpointConnectionSlotFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - so.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppsDeletePrivateEndpointConnectionSlotFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { - so, err = client.DeletePrivateEndpointConnectionSlotResponder(so.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsDeletePrivateEndpointConnectionSlotFuture", "Result", so.Response.Response, "Failure responding to request") - } - } - return -} - -// AppServiceCertificate key Vault container for a certificate that is purchased through Azure. -type AppServiceCertificate struct { - // KeyVaultID - Key Vault resource Id. - KeyVaultID *string `json:"keyVaultId,omitempty"` - // KeyVaultSecretName - Key Vault secret name. - KeyVaultSecretName *string `json:"keyVaultSecretName,omitempty"` - // ProvisioningState - READ-ONLY; Status of the Key Vault secret. Possible values include: 'KeyVaultSecretStatusInitialized', 'KeyVaultSecretStatusWaitingOnCertificateOrder', 'KeyVaultSecretStatusSucceeded', 'KeyVaultSecretStatusCertificateOrderFailed', 'KeyVaultSecretStatusOperationNotPermittedOnKeyVault', 'KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultSecretStatusKeyVaultDoesNotExist', 'KeyVaultSecretStatusKeyVaultSecretDoesNotExist', 'KeyVaultSecretStatusUnknownError', 'KeyVaultSecretStatusExternalPrivateKey', 'KeyVaultSecretStatusUnknown' - ProvisioningState KeyVaultSecretStatus `json:"provisioningState,omitempty"` -} - -// MarshalJSON is the custom marshaler for AppServiceCertificate. -func (asc AppServiceCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if asc.KeyVaultID != nil { - objectMap["keyVaultId"] = asc.KeyVaultID - } - if asc.KeyVaultSecretName != nil { - objectMap["keyVaultSecretName"] = asc.KeyVaultSecretName - } - return json.Marshal(objectMap) -} - -// AppServiceCertificateCollection collection of certificate order certificates. -type AppServiceCertificateCollection struct { - autorest.Response `json:"-"` - // Value - Collection of resources. - Value *[]AppServiceCertificateResource `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for AppServiceCertificateCollection. -func (ascc AppServiceCertificateCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ascc.Value != nil { - objectMap["value"] = ascc.Value - } - return json.Marshal(objectMap) -} - -// AppServiceCertificateCollectionIterator provides access to a complete listing of -// AppServiceCertificateResource values. -type AppServiceCertificateCollectionIterator struct { - i int - page AppServiceCertificateCollectionPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *AppServiceCertificateCollectionIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceCertificateCollectionIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *AppServiceCertificateCollectionIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter AppServiceCertificateCollectionIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AppServiceEnvironmentCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter AppServiceCertificateCollectionIterator) Response() AppServiceCertificateCollection { +func (iter AppServiceEnvironmentCollectionIterator) Response() AppServiceEnvironmentCollection { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter AppServiceCertificateCollectionIterator) Value() AppServiceCertificateResource { +func (iter AppServiceEnvironmentCollectionIterator) Value() AppServiceEnvironmentResource { if !iter.page.NotDone() { - return AppServiceCertificateResource{} + return AppServiceEnvironmentResource{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the AppServiceCertificateCollectionIterator type. -func NewAppServiceCertificateCollectionIterator(page AppServiceCertificateCollectionPage) AppServiceCertificateCollectionIterator { - return AppServiceCertificateCollectionIterator{page: page} +// Creates a new instance of the AppServiceEnvironmentCollectionIterator type. +func NewAppServiceEnvironmentCollectionIterator(page AppServiceEnvironmentCollectionPage) AppServiceEnvironmentCollectionIterator { + return AppServiceEnvironmentCollectionIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (ascc AppServiceCertificateCollection) IsEmpty() bool { - return ascc.Value == nil || len(*ascc.Value) == 0 +func (asec AppServiceEnvironmentCollection) IsEmpty() bool { + return asec.Value == nil || len(*asec.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (ascc AppServiceCertificateCollection) hasNextLink() bool { - return ascc.NextLink != nil && len(*ascc.NextLink) != 0 +func (asec AppServiceEnvironmentCollection) hasNextLink() bool { + return asec.NextLink != nil && len(*asec.NextLink) != 0 } -// appServiceCertificateCollectionPreparer prepares a request to retrieve the next set of results. +// appServiceEnvironmentCollectionPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (ascc AppServiceCertificateCollection) appServiceCertificateCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !ascc.hasNextLink() { +func (asec AppServiceEnvironmentCollection) appServiceEnvironmentCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !asec.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(ascc.NextLink))) + autorest.WithBaseURL(to.String(asec.NextLink))) } -// AppServiceCertificateCollectionPage contains a page of AppServiceCertificateResource values. -type AppServiceCertificateCollectionPage struct { - fn func(context.Context, AppServiceCertificateCollection) (AppServiceCertificateCollection, error) - ascc AppServiceCertificateCollection +// AppServiceEnvironmentCollectionPage contains a page of AppServiceEnvironmentResource values. +type AppServiceEnvironmentCollectionPage struct { + fn func(context.Context, AppServiceEnvironmentCollection) (AppServiceEnvironmentCollection, error) + asec AppServiceEnvironmentCollection } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *AppServiceCertificateCollectionPage) NextWithContext(ctx context.Context) (err error) { +func (page *AppServiceEnvironmentCollectionPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceCertificateCollectionPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentCollectionPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -2050,11 +2210,11 @@ func (page *AppServiceCertificateCollectionPage) NextWithContext(ctx context.Con }() } for { - next, err := page.fn(ctx, page.ascc) + next, err := page.fn(ctx, page.asec) if err != nil { return err } - page.ascc = next + page.asec = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -2065,41 +2225,127 @@ func (page *AppServiceCertificateCollectionPage) NextWithContext(ctx context.Con // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *AppServiceCertificateCollectionPage) Next() error { +func (page *AppServiceEnvironmentCollectionPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page AppServiceCertificateCollectionPage) NotDone() bool { - return !page.ascc.IsEmpty() +func (page AppServiceEnvironmentCollectionPage) NotDone() bool { + return !page.asec.IsEmpty() } // Response returns the raw server response from the last page request. -func (page AppServiceCertificateCollectionPage) Response() AppServiceCertificateCollection { - return page.ascc +func (page AppServiceEnvironmentCollectionPage) Response() AppServiceEnvironmentCollection { + return page.asec } // Values returns the slice of values for the current page or nil if there are no values. -func (page AppServiceCertificateCollectionPage) Values() []AppServiceCertificateResource { - if page.ascc.IsEmpty() { +func (page AppServiceEnvironmentCollectionPage) Values() []AppServiceEnvironmentResource { + if page.asec.IsEmpty() { return nil } - return *page.ascc.Value + return *page.asec.Value } -// Creates a new instance of the AppServiceCertificateCollectionPage type. -func NewAppServiceCertificateCollectionPage(cur AppServiceCertificateCollection, getNextPage func(context.Context, AppServiceCertificateCollection) (AppServiceCertificateCollection, error)) AppServiceCertificateCollectionPage { - return AppServiceCertificateCollectionPage{ +// Creates a new instance of the AppServiceEnvironmentCollectionPage type. +func NewAppServiceEnvironmentCollectionPage(cur AppServiceEnvironmentCollection, getNextPage func(context.Context, AppServiceEnvironmentCollection) (AppServiceEnvironmentCollection, error)) AppServiceEnvironmentCollectionPage { + return AppServiceEnvironmentCollectionPage{ fn: getNextPage, - ascc: cur, + asec: cur, } } -// AppServiceCertificateOrder SSL certificate purchase order. -type AppServiceCertificateOrder struct { +// AppServiceEnvironmentPatchResource ARM resource for a app service environment. +type AppServiceEnvironmentPatchResource struct { + // AppServiceEnvironment - Core resource properties + *AppServiceEnvironment `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for AppServiceEnvironmentPatchResource. +func (asepr AppServiceEnvironmentPatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asepr.AppServiceEnvironment != nil { + objectMap["properties"] = asepr.AppServiceEnvironment + } + if asepr.Kind != nil { + objectMap["kind"] = asepr.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AppServiceEnvironmentPatchResource struct. +func (asepr *AppServiceEnvironmentPatchResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var appServiceEnvironment AppServiceEnvironment + err = json.Unmarshal(*v, &appServiceEnvironment) + if err != nil { + return err + } + asepr.AppServiceEnvironment = &appServiceEnvironment + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + asepr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + asepr.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + asepr.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + asepr.Type = &typeVar + } + } + } + + return nil +} + +// AppServiceEnvironmentResource app Service Environment ARM resource. +type AppServiceEnvironmentResource struct { autorest.Response `json:"-"` - // AppServiceCertificateOrderProperties - AppServiceCertificateOrder resource specific properties - *AppServiceCertificateOrderProperties `json:"properties,omitempty"` + // AppServiceEnvironment - Core resource properties + *AppServiceEnvironment `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -2114,26 +2360,26 @@ type AppServiceCertificateOrder struct { Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for AppServiceCertificateOrder. -func (asco AppServiceCertificateOrder) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for AppServiceEnvironmentResource. +func (aser AppServiceEnvironmentResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if asco.AppServiceCertificateOrderProperties != nil { - objectMap["properties"] = asco.AppServiceCertificateOrderProperties + if aser.AppServiceEnvironment != nil { + objectMap["properties"] = aser.AppServiceEnvironment } - if asco.Kind != nil { - objectMap["kind"] = asco.Kind + if aser.Kind != nil { + objectMap["kind"] = aser.Kind } - if asco.Location != nil { - objectMap["location"] = asco.Location + if aser.Location != nil { + objectMap["location"] = aser.Location } - if asco.Tags != nil { - objectMap["tags"] = asco.Tags + if aser.Tags != nil { + objectMap["tags"] = aser.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for AppServiceCertificateOrder struct. -func (asco *AppServiceCertificateOrder) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for AppServiceEnvironmentResource struct. +func (aser *AppServiceEnvironmentResource) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -2143,12 +2389,12 @@ func (asco *AppServiceCertificateOrder) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var appServiceCertificateOrderProperties AppServiceCertificateOrderProperties - err = json.Unmarshal(*v, &appServiceCertificateOrderProperties) + var appServiceEnvironment AppServiceEnvironment + err = json.Unmarshal(*v, &appServiceEnvironment) if err != nil { return err } - asco.AppServiceCertificateOrderProperties = &appServiceCertificateOrderProperties + aser.AppServiceEnvironment = &appServiceEnvironment } case "id": if v != nil { @@ -2157,7 +2403,7 @@ func (asco *AppServiceCertificateOrder) UnmarshalJSON(body []byte) error { if err != nil { return err } - asco.ID = &ID + aser.ID = &ID } case "name": if v != nil { @@ -2166,7 +2412,7 @@ func (asco *AppServiceCertificateOrder) UnmarshalJSON(body []byte) error { if err != nil { return err } - asco.Name = &name + aser.Name = &name } case "kind": if v != nil { @@ -2175,7 +2421,7 @@ func (asco *AppServiceCertificateOrder) UnmarshalJSON(body []byte) error { if err != nil { return err } - asco.Kind = &kind + aser.Kind = &kind } case "location": if v != nil { @@ -2184,7 +2430,7 @@ func (asco *AppServiceCertificateOrder) UnmarshalJSON(body []byte) error { if err != nil { return err } - asco.Location = &location + aser.Location = &location } case "type": if v != nil { @@ -2193,7 +2439,7 @@ func (asco *AppServiceCertificateOrder) UnmarshalJSON(body []byte) error { if err != nil { return err } - asco.Type = &typeVar + aser.Type = &typeVar } case "tags": if v != nil { @@ -2202,7 +2448,7 @@ func (asco *AppServiceCertificateOrder) UnmarshalJSON(body []byte) error { if err != nil { return err } - asco.Tags = tags + aser.Tags = tags } } } @@ -2210,416 +2456,189 @@ func (asco *AppServiceCertificateOrder) UnmarshalJSON(body []byte) error { return nil } -// AppServiceCertificateOrderCollection collection of certificate orders. -type AppServiceCertificateOrderCollection struct { - autorest.Response `json:"-"` - // Value - Collection of resources. - Value *[]AppServiceCertificateOrder `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty"` +// AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionFuture an abstraction for monitoring and +// retrieving the results of a long-running operation. +type AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AppServiceEnvironmentsClient) (RemotePrivateEndpointConnectionARMResource, error) } -// MarshalJSON is the custom marshaler for AppServiceCertificateOrderCollection. -func (ascoc AppServiceCertificateOrderCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ascoc.Value != nil { - objectMap["value"] = ascoc.Value +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err } - return json.Marshal(objectMap) + future.FutureAPI = &azFuture + future.Result = future.result + return nil } -// AppServiceCertificateOrderCollectionIterator provides access to a complete listing of -// AppServiceCertificateOrder values. -type AppServiceCertificateOrderCollectionIterator struct { - i int - page AppServiceCertificateOrderCollectionPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *AppServiceCertificateOrderCollectionIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceCertificateOrderCollectionIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() +// result is the default implementation for AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionFuture.Result. +func (future *AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionFuture) result(client AppServiceEnvironmentsClient) (rpecar RemotePrivateEndpointConnectionARMResource, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure") + return } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil + if !done { + rpecar.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionFuture") + return } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rpecar.Response.Response, err = future.GetResult(sender); err == nil && rpecar.Response.Response.StatusCode != http.StatusNoContent { + rpecar, err = client.ApproveOrRejectPrivateEndpointConnectionResponder(rpecar.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionFuture", "Result", rpecar.Response.Response, "Failure responding to request") + } } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *AppServiceCertificateOrderCollectionIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter AppServiceCertificateOrderCollectionIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) + return } -// Response returns the raw server response from the last page request. -func (iter AppServiceCertificateOrderCollectionIterator) Response() AppServiceCertificateOrderCollection { - return iter.page.Response() +// AppServiceEnvironmentsChangeVnetAllFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AppServiceEnvironmentsChangeVnetAllFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AppServiceEnvironmentsClient) (AppCollectionPage, error) } -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter AppServiceCertificateOrderCollectionIterator) Value() AppServiceCertificateOrder { - if !iter.page.NotDone() { - return AppServiceCertificateOrder{} +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AppServiceEnvironmentsChangeVnetAllFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the AppServiceCertificateOrderCollectionIterator type. -func NewAppServiceCertificateOrderCollectionIterator(page AppServiceCertificateOrderCollectionPage) AppServiceCertificateOrderCollectionIterator { - return AppServiceCertificateOrderCollectionIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (ascoc AppServiceCertificateOrderCollection) IsEmpty() bool { - return ascoc.Value == nil || len(*ascoc.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (ascoc AppServiceCertificateOrderCollection) hasNextLink() bool { - return ascoc.NextLink != nil && len(*ascoc.NextLink) != 0 + future.FutureAPI = &azFuture + future.Result = future.result + return nil } -// appServiceCertificateOrderCollectionPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (ascoc AppServiceCertificateOrderCollection) appServiceCertificateOrderCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !ascoc.hasNextLink() { - return nil, nil +// result is the default implementation for AppServiceEnvironmentsChangeVnetAllFuture.Result. +func (future *AppServiceEnvironmentsChangeVnetAllFuture) result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsChangeVnetAllFuture", "Result", future.Response(), "Polling failure") + return } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ascoc.NextLink))) -} - -// AppServiceCertificateOrderCollectionPage contains a page of AppServiceCertificateOrder values. -type AppServiceCertificateOrderCollectionPage struct { - fn func(context.Context, AppServiceCertificateOrderCollection) (AppServiceCertificateOrderCollection, error) - ascoc AppServiceCertificateOrderCollection -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *AppServiceCertificateOrderCollectionPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceCertificateOrderCollectionPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() + if !done { + acp.ac.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsChangeVnetAllFuture") + return } - for { - next, err := page.fn(ctx, page.ascoc) + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent { + acp, err = client.ChangeVnetResponder(acp.ac.Response.Response) if err != nil { - return err - } - page.ascoc = next - if !next.hasNextLink() || !next.IsEmpty() { - break + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsChangeVnetAllFuture", "Result", acp.ac.Response.Response, "Failure responding to request") } } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *AppServiceCertificateOrderCollectionPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page AppServiceCertificateOrderCollectionPage) NotDone() bool { - return !page.ascoc.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page AppServiceCertificateOrderCollectionPage) Response() AppServiceCertificateOrderCollection { - return page.ascoc -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page AppServiceCertificateOrderCollectionPage) Values() []AppServiceCertificateOrder { - if page.ascoc.IsEmpty() { - return nil - } - return *page.ascoc.Value -} - -// Creates a new instance of the AppServiceCertificateOrderCollectionPage type. -func NewAppServiceCertificateOrderCollectionPage(cur AppServiceCertificateOrderCollection, getNextPage func(context.Context, AppServiceCertificateOrderCollection) (AppServiceCertificateOrderCollection, error)) AppServiceCertificateOrderCollectionPage { - return AppServiceCertificateOrderCollectionPage{ - fn: getNextPage, - ascoc: cur, - } + return } -// AppServiceCertificateOrderPatchResource ARM resource for a certificate order that is purchased through -// Azure. -type AppServiceCertificateOrderPatchResource struct { - // AppServiceCertificateOrderPatchResourceProperties - AppServiceCertificateOrderPatchResource resource specific properties - *AppServiceCertificateOrderPatchResourceProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` +// AppServiceEnvironmentsChangeVnetFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AppServiceEnvironmentsChangeVnetFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AppServiceEnvironmentsClient) (AppCollectionPage, error) } -// MarshalJSON is the custom marshaler for AppServiceCertificateOrderPatchResource. -func (ascopr AppServiceCertificateOrderPatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ascopr.AppServiceCertificateOrderPatchResourceProperties != nil { - objectMap["properties"] = ascopr.AppServiceCertificateOrderPatchResourceProperties - } - if ascopr.Kind != nil { - objectMap["kind"] = ascopr.Kind +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AppServiceEnvironmentsChangeVnetFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err } - return json.Marshal(objectMap) + future.FutureAPI = &azFuture + future.Result = future.result + return nil } -// UnmarshalJSON is the custom unmarshaler for AppServiceCertificateOrderPatchResource struct. -func (ascopr *AppServiceCertificateOrderPatchResource) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) +// result is the default implementation for AppServiceEnvironmentsChangeVnetFuture.Result. +func (future *AppServiceEnvironmentsChangeVnetFuture) result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) if err != nil { - return err + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsChangeVnetFuture", "Result", future.Response(), "Polling failure") + return } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var appServiceCertificateOrderPatchResourceProperties AppServiceCertificateOrderPatchResourceProperties - err = json.Unmarshal(*v, &appServiceCertificateOrderPatchResourceProperties) - if err != nil { - return err - } - ascopr.AppServiceCertificateOrderPatchResourceProperties = &appServiceCertificateOrderPatchResourceProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ascopr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ascopr.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - ascopr.Kind = &kind - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ascopr.Type = &typeVar - } + if !done { + acp.ac.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsChangeVnetFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent { + acp, err = client.ChangeVnetResponder(acp.ac.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsChangeVnetFuture", "Result", acp.ac.Response.Response, "Failure responding to request") } } - - return nil + return } -// AppServiceCertificateOrderPatchResourceProperties appServiceCertificateOrderPatchResource resource -// specific properties -type AppServiceCertificateOrderPatchResourceProperties struct { - // Certificates - State of the Key Vault secret. - Certificates map[string]*AppServiceCertificate `json:"certificates"` - // DistinguishedName - Certificate distinguished name. - DistinguishedName *string `json:"distinguishedName,omitempty"` - // DomainVerificationToken - READ-ONLY; Domain verification token. - DomainVerificationToken *string `json:"domainVerificationToken,omitempty"` - // ValidityInYears - Duration in years (must be 1). - ValidityInYears *int32 `json:"validityInYears,omitempty"` - // KeySize - Certificate key size. - KeySize *int32 `json:"keySize,omitempty"` - // ProductType - Certificate product type. Possible values include: 'CertificateProductTypeStandardDomainValidatedSsl', 'CertificateProductTypeStandardDomainValidatedWildCardSsl' - ProductType CertificateProductType `json:"productType,omitempty"` - // AutoRenew - true if the certificate should be automatically renewed when it expires; otherwise, false. - AutoRenew *bool `json:"autoRenew,omitempty"` - // ProvisioningState - READ-ONLY; Status of certificate order. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // Status - READ-ONLY; Current order status. Possible values include: 'CertificateOrderStatusPendingissuance', 'CertificateOrderStatusIssued', 'CertificateOrderStatusRevoked', 'CertificateOrderStatusCanceled', 'CertificateOrderStatusDenied', 'CertificateOrderStatusPendingrevocation', 'CertificateOrderStatusPendingRekey', 'CertificateOrderStatusUnused', 'CertificateOrderStatusExpired', 'CertificateOrderStatusNotSubmitted' - Status CertificateOrderStatus `json:"status,omitempty"` - // SignedCertificate - READ-ONLY; Signed certificate. - SignedCertificate *CertificateDetails `json:"signedCertificate,omitempty"` - // Csr - Last CSR that was created for this order. - Csr *string `json:"csr,omitempty"` - // Intermediate - READ-ONLY; Intermediate certificate. - Intermediate *CertificateDetails `json:"intermediate,omitempty"` - // Root - READ-ONLY; Root certificate. - Root *CertificateDetails `json:"root,omitempty"` - // SerialNumber - READ-ONLY; Current serial number of the certificate. - SerialNumber *string `json:"serialNumber,omitempty"` - // LastCertificateIssuanceTime - READ-ONLY; Certificate last issuance time. - LastCertificateIssuanceTime *date.Time `json:"lastCertificateIssuanceTime,omitempty"` - // ExpirationTime - READ-ONLY; Certificate expiration time. - ExpirationTime *date.Time `json:"expirationTime,omitempty"` - // IsPrivateKeyExternal - READ-ONLY; true if private key is external; otherwise, false. - IsPrivateKeyExternal *bool `json:"isPrivateKeyExternal,omitempty"` - // AppServiceCertificateNotRenewableReasons - READ-ONLY; Reasons why App Service Certificate is not renewable at the current moment. - AppServiceCertificateNotRenewableReasons *[]string `json:"appServiceCertificateNotRenewableReasons,omitempty"` - // NextAutoRenewalTimeStamp - READ-ONLY; Time stamp when the certificate would be auto renewed next - NextAutoRenewalTimeStamp *date.Time `json:"nextAutoRenewalTimeStamp,omitempty"` - // Contact - READ-ONLY; Contact info - Contact *CertificateOrderContact `json:"contact,omitempty"` +// AppServiceEnvironmentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AppServiceEnvironmentsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AppServiceEnvironmentsClient) (AppServiceEnvironmentResource, error) } -// MarshalJSON is the custom marshaler for AppServiceCertificateOrderPatchResourceProperties. -func (ascopr AppServiceCertificateOrderPatchResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ascopr.Certificates != nil { - objectMap["certificates"] = ascopr.Certificates - } - if ascopr.DistinguishedName != nil { - objectMap["distinguishedName"] = ascopr.DistinguishedName - } - if ascopr.ValidityInYears != nil { - objectMap["validityInYears"] = ascopr.ValidityInYears - } - if ascopr.KeySize != nil { - objectMap["keySize"] = ascopr.KeySize - } - if ascopr.ProductType != "" { - objectMap["productType"] = ascopr.ProductType - } - if ascopr.AutoRenew != nil { - objectMap["autoRenew"] = ascopr.AutoRenew - } - if ascopr.Csr != nil { - objectMap["csr"] = ascopr.Csr +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AppServiceEnvironmentsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err } - return json.Marshal(objectMap) -} - -// AppServiceCertificateOrderProperties appServiceCertificateOrder resource specific properties -type AppServiceCertificateOrderProperties struct { - // Certificates - State of the Key Vault secret. - Certificates map[string]*AppServiceCertificate `json:"certificates"` - // DistinguishedName - Certificate distinguished name. - DistinguishedName *string `json:"distinguishedName,omitempty"` - // DomainVerificationToken - READ-ONLY; Domain verification token. - DomainVerificationToken *string `json:"domainVerificationToken,omitempty"` - // ValidityInYears - Duration in years (must be 1). - ValidityInYears *int32 `json:"validityInYears,omitempty"` - // KeySize - Certificate key size. - KeySize *int32 `json:"keySize,omitempty"` - // ProductType - Certificate product type. Possible values include: 'CertificateProductTypeStandardDomainValidatedSsl', 'CertificateProductTypeStandardDomainValidatedWildCardSsl' - ProductType CertificateProductType `json:"productType,omitempty"` - // AutoRenew - true if the certificate should be automatically renewed when it expires; otherwise, false. - AutoRenew *bool `json:"autoRenew,omitempty"` - // ProvisioningState - READ-ONLY; Status of certificate order. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // Status - READ-ONLY; Current order status. Possible values include: 'CertificateOrderStatusPendingissuance', 'CertificateOrderStatusIssued', 'CertificateOrderStatusRevoked', 'CertificateOrderStatusCanceled', 'CertificateOrderStatusDenied', 'CertificateOrderStatusPendingrevocation', 'CertificateOrderStatusPendingRekey', 'CertificateOrderStatusUnused', 'CertificateOrderStatusExpired', 'CertificateOrderStatusNotSubmitted' - Status CertificateOrderStatus `json:"status,omitempty"` - // SignedCertificate - READ-ONLY; Signed certificate. - SignedCertificate *CertificateDetails `json:"signedCertificate,omitempty"` - // Csr - Last CSR that was created for this order. - Csr *string `json:"csr,omitempty"` - // Intermediate - READ-ONLY; Intermediate certificate. - Intermediate *CertificateDetails `json:"intermediate,omitempty"` - // Root - READ-ONLY; Root certificate. - Root *CertificateDetails `json:"root,omitempty"` - // SerialNumber - READ-ONLY; Current serial number of the certificate. - SerialNumber *string `json:"serialNumber,omitempty"` - // LastCertificateIssuanceTime - READ-ONLY; Certificate last issuance time. - LastCertificateIssuanceTime *date.Time `json:"lastCertificateIssuanceTime,omitempty"` - // ExpirationTime - READ-ONLY; Certificate expiration time. - ExpirationTime *date.Time `json:"expirationTime,omitempty"` - // IsPrivateKeyExternal - READ-ONLY; true if private key is external; otherwise, false. - IsPrivateKeyExternal *bool `json:"isPrivateKeyExternal,omitempty"` - // AppServiceCertificateNotRenewableReasons - READ-ONLY; Reasons why App Service Certificate is not renewable at the current moment. - AppServiceCertificateNotRenewableReasons *[]string `json:"appServiceCertificateNotRenewableReasons,omitempty"` - // NextAutoRenewalTimeStamp - READ-ONLY; Time stamp when the certificate would be auto renewed next - NextAutoRenewalTimeStamp *date.Time `json:"nextAutoRenewalTimeStamp,omitempty"` - // Contact - READ-ONLY; Contact info - Contact *CertificateOrderContact `json:"contact,omitempty"` + future.FutureAPI = &azFuture + future.Result = future.result + return nil } -// MarshalJSON is the custom marshaler for AppServiceCertificateOrderProperties. -func (asco AppServiceCertificateOrderProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if asco.Certificates != nil { - objectMap["certificates"] = asco.Certificates - } - if asco.DistinguishedName != nil { - objectMap["distinguishedName"] = asco.DistinguishedName - } - if asco.ValidityInYears != nil { - objectMap["validityInYears"] = asco.ValidityInYears - } - if asco.KeySize != nil { - objectMap["keySize"] = asco.KeySize - } - if asco.ProductType != "" { - objectMap["productType"] = asco.ProductType +// result is the default implementation for AppServiceEnvironmentsCreateOrUpdateFuture.Result. +func (future *AppServiceEnvironmentsCreateOrUpdateFuture) result(client AppServiceEnvironmentsClient) (aser AppServiceEnvironmentResource, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return } - if asco.AutoRenew != nil { - objectMap["autoRenew"] = asco.AutoRenew + if !done { + aser.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsCreateOrUpdateFuture") + return } - if asco.Csr != nil { - objectMap["csr"] = asco.Csr + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if aser.Response.Response, err = future.GetResult(sender); err == nil && aser.Response.Response.StatusCode != http.StatusNoContent { + aser, err = client.CreateOrUpdateResponder(aser.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateFuture", "Result", aser.Response.Response, "Failure responding to request") + } } - return json.Marshal(objectMap) + return } -// AppServiceCertificateOrdersCreateOrUpdateCertificateFuture an abstraction for monitoring and retrieving -// the results of a long-running operation. -type AppServiceCertificateOrdersCreateOrUpdateCertificateFuture struct { +// AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. - Result func(AppServiceCertificateOrdersClient) (AppServiceCertificateResource, error) + Result func(AppServiceEnvironmentsClient) (WorkerPoolResource, error) } // UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppServiceCertificateOrdersCreateOrUpdateCertificateFuture) UnmarshalJSON(body []byte) error { +func (future *AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture) UnmarshalJSON(body []byte) error { var azFuture azure.Future if err := json.Unmarshal(body, &azFuture); err != nil { return err @@ -2629,40 +2648,40 @@ func (future *AppServiceCertificateOrdersCreateOrUpdateCertificateFuture) Unmars return nil } -// result is the default implementation for AppServiceCertificateOrdersCreateOrUpdateCertificateFuture.Result. -func (future *AppServiceCertificateOrdersCreateOrUpdateCertificateFuture) result(client AppServiceCertificateOrdersClient) (ascr AppServiceCertificateResource, err error) { +// result is the default implementation for AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture.Result. +func (future *AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture) result(client AppServiceEnvironmentsClient) (wpr WorkerPoolResource, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateCertificateFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture", "Result", future.Response(), "Polling failure") return } if !done { - ascr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppServiceCertificateOrdersCreateOrUpdateCertificateFuture") + wpr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ascr.Response.Response, err = future.GetResult(sender); err == nil && ascr.Response.Response.StatusCode != http.StatusNoContent { - ascr, err = client.CreateOrUpdateCertificateResponder(ascr.Response.Response) + if wpr.Response.Response, err = future.GetResult(sender); err == nil && wpr.Response.Response.StatusCode != http.StatusNoContent { + wpr, err = client.CreateOrUpdateMultiRolePoolResponder(wpr.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateCertificateFuture", "Result", ascr.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture", "Result", wpr.Response.Response, "Failure responding to request") } } return } -// AppServiceCertificateOrdersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type AppServiceCertificateOrdersCreateOrUpdateFuture struct { +// AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. - Result func(AppServiceCertificateOrdersClient) (AppServiceCertificateOrder, error) + Result func(AppServiceEnvironmentsClient) (WorkerPoolResource, error) } // UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppServiceCertificateOrdersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { +func (future *AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture) UnmarshalJSON(body []byte) error { var azFuture azure.Future if err := json.Unmarshal(body, &azFuture); err != nil { return err @@ -2672,122 +2691,325 @@ func (future *AppServiceCertificateOrdersCreateOrUpdateFuture) UnmarshalJSON(bod return nil } -// result is the default implementation for AppServiceCertificateOrdersCreateOrUpdateFuture.Result. -func (future *AppServiceCertificateOrdersCreateOrUpdateFuture) result(client AppServiceCertificateOrdersClient) (asco AppServiceCertificateOrder, err error) { +// result is the default implementation for AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture.Result. +func (future *AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture) result(client AppServiceEnvironmentsClient) (wpr WorkerPoolResource, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture", "Result", future.Response(), "Polling failure") return } if !done { - asco.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppServiceCertificateOrdersCreateOrUpdateFuture") + wpr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if asco.Response.Response, err = future.GetResult(sender); err == nil && asco.Response.Response.StatusCode != http.StatusNoContent { - asco, err = client.CreateOrUpdateResponder(asco.Response.Response) + if wpr.Response.Response, err = future.GetResult(sender); err == nil && wpr.Response.Response.StatusCode != http.StatusNoContent { + wpr, err = client.CreateOrUpdateWorkerPoolResponder(wpr.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateFuture", "Result", asco.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture", "Result", wpr.Response.Response, "Failure responding to request") } } return } -// AppServiceCertificatePatchResource key Vault container ARM resource for a certificate that is purchased -// through Azure. -type AppServiceCertificatePatchResource struct { - // AppServiceCertificate - Core resource properties - *AppServiceCertificate `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` +// AppServiceEnvironmentsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AppServiceEnvironmentsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AppServiceEnvironmentsClient) (autorest.Response, error) } -// MarshalJSON is the custom marshaler for AppServiceCertificatePatchResource. -func (ascpr AppServiceCertificatePatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ascpr.AppServiceCertificate != nil { - objectMap["properties"] = ascpr.AppServiceCertificate +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AppServiceEnvironmentsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err } - if ascpr.Kind != nil { - objectMap["kind"] = ascpr.Kind + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for AppServiceEnvironmentsDeleteFuture.Result. +func (future *AppServiceEnvironmentsDeleteFuture) result(client AppServiceEnvironmentsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsDeleteFuture", "Result", future.Response(), "Polling failure") + return } - return json.Marshal(objectMap) + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsDeleteFuture") + return + } + ar.Response = future.Response() + return } -// UnmarshalJSON is the custom unmarshaler for AppServiceCertificatePatchResource struct. -func (ascpr *AppServiceCertificatePatchResource) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) +// AppServiceEnvironmentsDeletePrivateEndpointConnectionFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type AppServiceEnvironmentsDeletePrivateEndpointConnectionFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AppServiceEnvironmentsClient) (SetObject, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AppServiceEnvironmentsDeletePrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for AppServiceEnvironmentsDeletePrivateEndpointConnectionFuture.Result. +func (future *AppServiceEnvironmentsDeletePrivateEndpointConnectionFuture) result(client AppServiceEnvironmentsClient) (so SetObject, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsDeletePrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + so.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsDeletePrivateEndpointConnectionFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { + so, err = client.DeletePrivateEndpointConnectionResponder(so.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsDeletePrivateEndpointConnectionFuture", "Result", so.Response.Response, "Failure responding to request") + } + } + return +} + +// AppServiceEnvironmentsResumeAllFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AppServiceEnvironmentsResumeAllFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AppServiceEnvironmentsClient) (AppCollectionPage, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AppServiceEnvironmentsResumeAllFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { return err } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var appServiceCertificate AppServiceCertificate - err = json.Unmarshal(*v, &appServiceCertificate) - if err != nil { - return err - } - ascpr.AppServiceCertificate = &appServiceCertificate - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ascpr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ascpr.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - ascpr.Kind = &kind - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ascpr.Type = &typeVar - } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for AppServiceEnvironmentsResumeAllFuture.Result. +func (future *AppServiceEnvironmentsResumeAllFuture) result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeAllFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + acp.ac.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsResumeAllFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent { + acp, err = client.ResumeResponder(acp.ac.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeAllFuture", "Result", acp.ac.Response.Response, "Failure responding to request") + } + } + return +} + +// AppServiceEnvironmentsResumeFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AppServiceEnvironmentsResumeFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AppServiceEnvironmentsClient) (AppCollectionPage, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AppServiceEnvironmentsResumeFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for AppServiceEnvironmentsResumeFuture.Result. +func (future *AppServiceEnvironmentsResumeFuture) result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + acp.ac.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsResumeFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent { + acp, err = client.ResumeResponder(acp.ac.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeFuture", "Result", acp.ac.Response.Response, "Failure responding to request") } } + return +} + +// AppServiceEnvironmentsSuspendAllFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AppServiceEnvironmentsSuspendAllFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AppServiceEnvironmentsClient) (AppCollectionPage, error) +} +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AppServiceEnvironmentsSuspendAllFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result return nil } -// AppServiceCertificateResource key Vault container ARM resource for a certificate that is purchased -// through Azure. -type AppServiceCertificateResource struct { +// result is the default implementation for AppServiceEnvironmentsSuspendAllFuture.Result. +func (future *AppServiceEnvironmentsSuspendAllFuture) result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendAllFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + acp.ac.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsSuspendAllFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent { + acp, err = client.SuspendResponder(acp.ac.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendAllFuture", "Result", acp.ac.Response.Response, "Failure responding to request") + } + } + return +} + +// AppServiceEnvironmentsSuspendFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AppServiceEnvironmentsSuspendFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AppServiceEnvironmentsClient) (AppCollectionPage, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AppServiceEnvironmentsSuspendFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for AppServiceEnvironmentsSuspendFuture.Result. +func (future *AppServiceEnvironmentsSuspendFuture) result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + acp.ac.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsSuspendFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent { + acp, err = client.SuspendResponder(acp.ac.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendFuture", "Result", acp.ac.Response.Response, "Failure responding to request") + } + } + return +} + +// AppServiceEnvironmentsUpgradeFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AppServiceEnvironmentsUpgradeFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AppServiceEnvironmentsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AppServiceEnvironmentsUpgradeFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for AppServiceEnvironmentsUpgradeFuture.Result. +func (future *AppServiceEnvironmentsUpgradeFuture) result(client AppServiceEnvironmentsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsUpgradeFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsUpgradeFuture") + return + } + ar.Response = future.Response() + return +} + +// AppServicePlan app Service plan. +type AppServicePlan struct { autorest.Response `json:"-"` - // AppServiceCertificate - Core resource properties - *AppServiceCertificate `json:"properties,omitempty"` + // AppServicePlanProperties - AppServicePlan resource specific properties + *AppServicePlanProperties `json:"properties,omitempty"` + Sku *SkuDescription `json:"sku,omitempty"` + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -2802,26 +3024,32 @@ type AppServiceCertificateResource struct { Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for AppServiceCertificateResource. -func (ascr AppServiceCertificateResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for AppServicePlan. +func (asp AppServicePlan) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ascr.AppServiceCertificate != nil { - objectMap["properties"] = ascr.AppServiceCertificate + if asp.AppServicePlanProperties != nil { + objectMap["properties"] = asp.AppServicePlanProperties } - if ascr.Kind != nil { - objectMap["kind"] = ascr.Kind + if asp.Sku != nil { + objectMap["sku"] = asp.Sku } - if ascr.Location != nil { - objectMap["location"] = ascr.Location + if asp.ExtendedLocation != nil { + objectMap["extendedLocation"] = asp.ExtendedLocation } - if ascr.Tags != nil { - objectMap["tags"] = ascr.Tags + if asp.Kind != nil { + objectMap["kind"] = asp.Kind + } + if asp.Location != nil { + objectMap["location"] = asp.Location + } + if asp.Tags != nil { + objectMap["tags"] = asp.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for AppServiceCertificateResource struct. -func (ascr *AppServiceCertificateResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for AppServicePlan struct. +func (asp *AppServicePlan) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -2831,12 +3059,30 @@ func (ascr *AppServiceCertificateResource) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var appServiceCertificate AppServiceCertificate - err = json.Unmarshal(*v, &appServiceCertificate) + var appServicePlanProperties AppServicePlanProperties + err = json.Unmarshal(*v, &appServicePlanProperties) if err != nil { return err } - ascr.AppServiceCertificate = &appServiceCertificate + asp.AppServicePlanProperties = &appServicePlanProperties + } + case "sku": + if v != nil { + var sku SkuDescription + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + asp.Sku = &sku + } + case "extendedLocation": + if v != nil { + var extendedLocation ExtendedLocation + err = json.Unmarshal(*v, &extendedLocation) + if err != nil { + return err + } + asp.ExtendedLocation = &extendedLocation } case "id": if v != nil { @@ -2845,7 +3091,7 @@ func (ascr *AppServiceCertificateResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ascr.ID = &ID + asp.ID = &ID } case "name": if v != nil { @@ -2854,7 +3100,7 @@ func (ascr *AppServiceCertificateResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ascr.Name = &name + asp.Name = &name } case "kind": if v != nil { @@ -2863,7 +3109,7 @@ func (ascr *AppServiceCertificateResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ascr.Kind = &kind + asp.Kind = &kind } case "location": if v != nil { @@ -2872,7 +3118,7 @@ func (ascr *AppServiceCertificateResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ascr.Location = &location + asp.Location = &location } case "type": if v != nil { @@ -2881,7 +3127,7 @@ func (ascr *AppServiceCertificateResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ascr.Type = &typeVar + asp.Type = &typeVar } case "tags": if v != nil { @@ -2890,7 +3136,7 @@ func (ascr *AppServiceCertificateResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ascr.Tags = tags + asp.Tags = tags } } } @@ -2898,109 +3144,35 @@ func (ascr *AppServiceCertificateResource) UnmarshalJSON(body []byte) error { return nil } -// AppServiceEnvironment description of an App Service Environment. -type AppServiceEnvironment struct { - // ProvisioningState - READ-ONLY; Provisioning state of the App Service Environment. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // Status - READ-ONLY; Current status of the App Service Environment. Possible values include: 'HostingEnvironmentStatusPreparing', 'HostingEnvironmentStatusReady', 'HostingEnvironmentStatusScaling', 'HostingEnvironmentStatusDeleting' - Status HostingEnvironmentStatus `json:"status,omitempty"` - // VirtualNetwork - Description of the Virtual Network. - VirtualNetwork *VirtualNetworkProfile `json:"virtualNetwork,omitempty"` - // InternalLoadBalancingMode - Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. Possible values include: 'LoadBalancingModeNone', 'LoadBalancingModeWeb', 'LoadBalancingModePublishing', 'LoadBalancingModeWebPublishing' - InternalLoadBalancingMode LoadBalancingMode `json:"internalLoadBalancingMode,omitempty"` - // MultiSize - Front-end VM size, e.g. "Medium", "Large". - MultiSize *string `json:"multiSize,omitempty"` - // MultiRoleCount - READ-ONLY; Number of front-end instances. - MultiRoleCount *int32 `json:"multiRoleCount,omitempty"` - // IpsslAddressCount - Number of IP SSL addresses reserved for the App Service Environment. - IpsslAddressCount *int32 `json:"ipsslAddressCount,omitempty"` - // DNSSuffix - DNS suffix of the App Service Environment. - DNSSuffix *string `json:"dnsSuffix,omitempty"` - // MaximumNumberOfMachines - READ-ONLY; Maximum number of VMs in the App Service Environment. - MaximumNumberOfMachines *int32 `json:"maximumNumberOfMachines,omitempty"` - // FrontEndScaleFactor - Scale factor for front-ends. - FrontEndScaleFactor *int32 `json:"frontEndScaleFactor,omitempty"` - // Suspended - READ-ONLY; true if the App Service Environment is suspended; otherwise, false. The environment can be suspended, e.g. when the management endpoint is no longer available - // (most likely because NSG blocked the incoming traffic). - Suspended *bool `json:"suspended,omitempty"` - // ClusterSettings - Custom settings for changing the behavior of the App Service Environment. - ClusterSettings *[]NameValuePair `json:"clusterSettings,omitempty"` - // UserWhitelistedIPRanges - User added ip ranges to whitelist on ASE db - UserWhitelistedIPRanges *[]string `json:"userWhitelistedIpRanges,omitempty"` - // HasLinuxWorkers - READ-ONLY; Flag that displays whether an ASE has linux workers or not - HasLinuxWorkers *bool `json:"hasLinuxWorkers,omitempty"` - // DedicatedHostCount - Dedicated Host Count - DedicatedHostCount *int32 `json:"dedicatedHostCount,omitempty"` - // ZoneRedundant - Whether or not this App Service Environment is zone-redundant. - ZoneRedundant *bool `json:"zoneRedundant,omitempty"` -} - -// MarshalJSON is the custom marshaler for AppServiceEnvironment. -func (ase AppServiceEnvironment) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ase.VirtualNetwork != nil { - objectMap["virtualNetwork"] = ase.VirtualNetwork - } - if ase.InternalLoadBalancingMode != "" { - objectMap["internalLoadBalancingMode"] = ase.InternalLoadBalancingMode - } - if ase.MultiSize != nil { - objectMap["multiSize"] = ase.MultiSize - } - if ase.IpsslAddressCount != nil { - objectMap["ipsslAddressCount"] = ase.IpsslAddressCount - } - if ase.DNSSuffix != nil { - objectMap["dnsSuffix"] = ase.DNSSuffix - } - if ase.FrontEndScaleFactor != nil { - objectMap["frontEndScaleFactor"] = ase.FrontEndScaleFactor - } - if ase.ClusterSettings != nil { - objectMap["clusterSettings"] = ase.ClusterSettings - } - if ase.UserWhitelistedIPRanges != nil { - objectMap["userWhitelistedIpRanges"] = ase.UserWhitelistedIPRanges - } - if ase.DedicatedHostCount != nil { - objectMap["dedicatedHostCount"] = ase.DedicatedHostCount - } - if ase.ZoneRedundant != nil { - objectMap["zoneRedundant"] = ase.ZoneRedundant - } - return json.Marshal(objectMap) -} - -// AppServiceEnvironmentCollection collection of App Service Environments. -type AppServiceEnvironmentCollection struct { +// AppServicePlanCollection collection of App Service plans. +type AppServicePlanCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]AppServiceEnvironmentResource `json:"value,omitempty"` + Value *[]AppServicePlan `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for AppServiceEnvironmentCollection. -func (asec AppServiceEnvironmentCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for AppServicePlanCollection. +func (aspc AppServicePlanCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if asec.Value != nil { - objectMap["value"] = asec.Value + if aspc.Value != nil { + objectMap["value"] = aspc.Value } return json.Marshal(objectMap) } -// AppServiceEnvironmentCollectionIterator provides access to a complete listing of -// AppServiceEnvironmentResource values. -type AppServiceEnvironmentCollectionIterator struct { +// AppServicePlanCollectionIterator provides access to a complete listing of AppServicePlan values. +type AppServicePlanCollectionIterator struct { i int - page AppServiceEnvironmentCollectionPage + page AppServicePlanCollectionPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *AppServiceEnvironmentCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *AppServicePlanCollectionIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/AppServicePlanCollectionIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -3025,67 +3197,67 @@ func (iter *AppServiceEnvironmentCollectionIterator) NextWithContext(ctx context // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *AppServiceEnvironmentCollectionIterator) Next() error { +func (iter *AppServicePlanCollectionIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter AppServiceEnvironmentCollectionIterator) NotDone() bool { +func (iter AppServicePlanCollectionIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter AppServiceEnvironmentCollectionIterator) Response() AppServiceEnvironmentCollection { +func (iter AppServicePlanCollectionIterator) Response() AppServicePlanCollection { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter AppServiceEnvironmentCollectionIterator) Value() AppServiceEnvironmentResource { +func (iter AppServicePlanCollectionIterator) Value() AppServicePlan { if !iter.page.NotDone() { - return AppServiceEnvironmentResource{} + return AppServicePlan{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the AppServiceEnvironmentCollectionIterator type. -func NewAppServiceEnvironmentCollectionIterator(page AppServiceEnvironmentCollectionPage) AppServiceEnvironmentCollectionIterator { - return AppServiceEnvironmentCollectionIterator{page: page} +// Creates a new instance of the AppServicePlanCollectionIterator type. +func NewAppServicePlanCollectionIterator(page AppServicePlanCollectionPage) AppServicePlanCollectionIterator { + return AppServicePlanCollectionIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (asec AppServiceEnvironmentCollection) IsEmpty() bool { - return asec.Value == nil || len(*asec.Value) == 0 +func (aspc AppServicePlanCollection) IsEmpty() bool { + return aspc.Value == nil || len(*aspc.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (asec AppServiceEnvironmentCollection) hasNextLink() bool { - return asec.NextLink != nil && len(*asec.NextLink) != 0 +func (aspc AppServicePlanCollection) hasNextLink() bool { + return aspc.NextLink != nil && len(*aspc.NextLink) != 0 } -// appServiceEnvironmentCollectionPreparer prepares a request to retrieve the next set of results. +// appServicePlanCollectionPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (asec AppServiceEnvironmentCollection) appServiceEnvironmentCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !asec.hasNextLink() { +func (aspc AppServicePlanCollection) appServicePlanCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !aspc.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(asec.NextLink))) + autorest.WithBaseURL(to.String(aspc.NextLink))) } -// AppServiceEnvironmentCollectionPage contains a page of AppServiceEnvironmentResource values. -type AppServiceEnvironmentCollectionPage struct { - fn func(context.Context, AppServiceEnvironmentCollection) (AppServiceEnvironmentCollection, error) - asec AppServiceEnvironmentCollection +// AppServicePlanCollectionPage contains a page of AppServicePlan values. +type AppServicePlanCollectionPage struct { + fn func(context.Context, AppServicePlanCollection) (AppServicePlanCollection, error) + aspc AppServicePlanCollection } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *AppServiceEnvironmentCollectionPage) NextWithContext(ctx context.Context) (err error) { +func (page *AppServicePlanCollectionPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentCollectionPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/AppServicePlanCollectionPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -3095,11 +3267,11 @@ func (page *AppServiceEnvironmentCollectionPage) NextWithContext(ctx context.Con }() } for { - next, err := page.fn(ctx, page.asec) + next, err := page.fn(ctx, page.aspc) if err != nil { return err } - page.asec = next + page.aspc = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -3110,40 +3282,40 @@ func (page *AppServiceEnvironmentCollectionPage) NextWithContext(ctx context.Con // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *AppServiceEnvironmentCollectionPage) Next() error { +func (page *AppServicePlanCollectionPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page AppServiceEnvironmentCollectionPage) NotDone() bool { - return !page.asec.IsEmpty() +func (page AppServicePlanCollectionPage) NotDone() bool { + return !page.aspc.IsEmpty() } // Response returns the raw server response from the last page request. -func (page AppServiceEnvironmentCollectionPage) Response() AppServiceEnvironmentCollection { - return page.asec +func (page AppServicePlanCollectionPage) Response() AppServicePlanCollection { + return page.aspc } // Values returns the slice of values for the current page or nil if there are no values. -func (page AppServiceEnvironmentCollectionPage) Values() []AppServiceEnvironmentResource { - if page.asec.IsEmpty() { +func (page AppServicePlanCollectionPage) Values() []AppServicePlan { + if page.aspc.IsEmpty() { return nil } - return *page.asec.Value + return *page.aspc.Value } -// Creates a new instance of the AppServiceEnvironmentCollectionPage type. -func NewAppServiceEnvironmentCollectionPage(cur AppServiceEnvironmentCollection, getNextPage func(context.Context, AppServiceEnvironmentCollection) (AppServiceEnvironmentCollection, error)) AppServiceEnvironmentCollectionPage { - return AppServiceEnvironmentCollectionPage{ +// Creates a new instance of the AppServicePlanCollectionPage type. +func NewAppServicePlanCollectionPage(cur AppServicePlanCollection, getNextPage func(context.Context, AppServicePlanCollection) (AppServicePlanCollection, error)) AppServicePlanCollectionPage { + return AppServicePlanCollectionPage{ fn: getNextPage, - asec: cur, + aspc: cur, } } -// AppServiceEnvironmentPatchResource ARM resource for a app service environment. -type AppServiceEnvironmentPatchResource struct { - // AppServiceEnvironment - Core resource properties - *AppServiceEnvironment `json:"properties,omitempty"` +// AppServicePlanPatchResource ARM resource for a app service plan. +type AppServicePlanPatchResource struct { + // AppServicePlanPatchResourceProperties - AppServicePlanPatchResource resource specific properties + *AppServicePlanPatchResourceProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -3154,20 +3326,20 @@ type AppServiceEnvironmentPatchResource struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for AppServiceEnvironmentPatchResource. -func (asepr AppServiceEnvironmentPatchResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for AppServicePlanPatchResource. +func (asppr AppServicePlanPatchResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if asepr.AppServiceEnvironment != nil { - objectMap["properties"] = asepr.AppServiceEnvironment + if asppr.AppServicePlanPatchResourceProperties != nil { + objectMap["properties"] = asppr.AppServicePlanPatchResourceProperties } - if asepr.Kind != nil { - objectMap["kind"] = asepr.Kind + if asppr.Kind != nil { + objectMap["kind"] = asppr.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for AppServiceEnvironmentPatchResource struct. -func (asepr *AppServiceEnvironmentPatchResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for AppServicePlanPatchResource struct. +func (asppr *AppServicePlanPatchResource) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -3177,12 +3349,12 @@ func (asepr *AppServiceEnvironmentPatchResource) UnmarshalJSON(body []byte) erro switch k { case "properties": if v != nil { - var appServiceEnvironment AppServiceEnvironment - err = json.Unmarshal(*v, &appServiceEnvironment) + var appServicePlanPatchResourceProperties AppServicePlanPatchResourceProperties + err = json.Unmarshal(*v, &appServicePlanPatchResourceProperties) if err != nil { return err } - asepr.AppServiceEnvironment = &appServiceEnvironment + asppr.AppServicePlanPatchResourceProperties = &appServicePlanPatchResourceProperties } case "id": if v != nil { @@ -3191,7 +3363,7 @@ func (asepr *AppServiceEnvironmentPatchResource) UnmarshalJSON(body []byte) erro if err != nil { return err } - asepr.ID = &ID + asppr.ID = &ID } case "name": if v != nil { @@ -3200,7 +3372,7 @@ func (asepr *AppServiceEnvironmentPatchResource) UnmarshalJSON(body []byte) erro if err != nil { return err } - asepr.Name = &name + asppr.Name = &name } case "kind": if v != nil { @@ -3209,7 +3381,7 @@ func (asepr *AppServiceEnvironmentPatchResource) UnmarshalJSON(body []byte) erro if err != nil { return err } - asepr.Kind = &kind + asppr.Kind = &kind } case "type": if v != nil { @@ -3218,7 +3390,7 @@ func (asepr *AppServiceEnvironmentPatchResource) UnmarshalJSON(body []byte) erro if err != nil { return err } - asepr.Type = &typeVar + asppr.Type = &typeVar } } } @@ -3226,45 +3398,285 @@ func (asepr *AppServiceEnvironmentPatchResource) UnmarshalJSON(body []byte) erro return nil } -// AppServiceEnvironmentResource app Service Environment ARM resource. -type AppServiceEnvironmentResource struct { - autorest.Response `json:"-"` - // AppServiceEnvironment - Core resource properties - *AppServiceEnvironment `json:"properties,omitempty"` +// AppServicePlanPatchResourceProperties appServicePlanPatchResource resource specific properties +type AppServicePlanPatchResourceProperties struct { + // WorkerTierName - Target worker tier assigned to the App Service plan. + WorkerTierName *string `json:"workerTierName,omitempty"` + // Status - READ-ONLY; App Service plan status. Possible values include: 'StatusOptionsReady', 'StatusOptionsPending', 'StatusOptionsCreating' + Status StatusOptions `json:"status,omitempty"` + // Subscription - READ-ONLY; App Service plan subscription. + Subscription *string `json:"subscription,omitempty"` + // HostingEnvironmentProfile - Specification for the App Service Environment to use for the App Service plan. + HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` + // MaximumNumberOfWorkers - READ-ONLY; Maximum number of instances that can be assigned to this App Service plan. + MaximumNumberOfWorkers *int32 `json:"maximumNumberOfWorkers,omitempty"` + // NumberOfWorkers - READ-ONLY; The number of instances that are assigned to this App Service plan. + NumberOfWorkers *int32 `json:"numberOfWorkers,omitempty"` + // GeoRegion - READ-ONLY; Geographical location for the App Service plan. + GeoRegion *string `json:"geoRegion,omitempty"` + // PerSiteScaling - If true, apps assigned to this App Service plan can be scaled independently. + // If false, apps assigned to this App Service plan will scale to all instances of the plan. + PerSiteScaling *bool `json:"perSiteScaling,omitempty"` + // ElasticScaleEnabled - ServerFarm supports ElasticScale. Apps in this plan will scale as if the ServerFarm was ElasticPremium sku + ElasticScaleEnabled *bool `json:"elasticScaleEnabled,omitempty"` + // MaximumElasticWorkerCount - Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan + MaximumElasticWorkerCount *int32 `json:"maximumElasticWorkerCount,omitempty"` + // NumberOfSites - READ-ONLY; Number of apps assigned to this App Service plan. + NumberOfSites *int32 `json:"numberOfSites,omitempty"` + // IsSpot - If true, this App Service Plan owns spot instances. + IsSpot *bool `json:"isSpot,omitempty"` + // SpotExpirationTime - The time when the server farm expires. Valid only if it is a spot server farm. + SpotExpirationTime *date.Time `json:"spotExpirationTime,omitempty"` + // FreeOfferExpirationTime - The time when the server farm free offer expires. + FreeOfferExpirationTime *date.Time `json:"freeOfferExpirationTime,omitempty"` + // ResourceGroup - READ-ONLY; Resource group of the App Service plan. + ResourceGroup *string `json:"resourceGroup,omitempty"` + // Reserved - If Linux app service plan true, false otherwise. + Reserved *bool `json:"reserved,omitempty"` + // IsXenon - Obsolete: If Hyper-V container app service plan true, false otherwise. + IsXenon *bool `json:"isXenon,omitempty"` + // HyperV - If Hyper-V container app service plan true, false otherwise. + HyperV *bool `json:"hyperV,omitempty"` + // TargetWorkerCount - Scaling worker count. + TargetWorkerCount *int32 `json:"targetWorkerCount,omitempty"` + // TargetWorkerSizeID - Scaling worker size ID. + TargetWorkerSizeID *int32 `json:"targetWorkerSizeId,omitempty"` + // ProvisioningState - READ-ONLY; Provisioning state of the App Service Plan. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // KubeEnvironmentProfile - Specification for the Kubernetes Environment to use for the App Service plan. + KubeEnvironmentProfile *KubeEnvironmentProfile `json:"kubeEnvironmentProfile,omitempty"` + // ZoneRedundant - If true, this App Service Plan will perform availability zone balancing. + // If false, this App Service Plan will not perform availability zone balancing. + ZoneRedundant *bool `json:"zoneRedundant,omitempty"` +} + +// MarshalJSON is the custom marshaler for AppServicePlanPatchResourceProperties. +func (asppr AppServicePlanPatchResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asppr.WorkerTierName != nil { + objectMap["workerTierName"] = asppr.WorkerTierName + } + if asppr.HostingEnvironmentProfile != nil { + objectMap["hostingEnvironmentProfile"] = asppr.HostingEnvironmentProfile + } + if asppr.PerSiteScaling != nil { + objectMap["perSiteScaling"] = asppr.PerSiteScaling + } + if asppr.ElasticScaleEnabled != nil { + objectMap["elasticScaleEnabled"] = asppr.ElasticScaleEnabled + } + if asppr.MaximumElasticWorkerCount != nil { + objectMap["maximumElasticWorkerCount"] = asppr.MaximumElasticWorkerCount + } + if asppr.IsSpot != nil { + objectMap["isSpot"] = asppr.IsSpot + } + if asppr.SpotExpirationTime != nil { + objectMap["spotExpirationTime"] = asppr.SpotExpirationTime + } + if asppr.FreeOfferExpirationTime != nil { + objectMap["freeOfferExpirationTime"] = asppr.FreeOfferExpirationTime + } + if asppr.Reserved != nil { + objectMap["reserved"] = asppr.Reserved + } + if asppr.IsXenon != nil { + objectMap["isXenon"] = asppr.IsXenon + } + if asppr.HyperV != nil { + objectMap["hyperV"] = asppr.HyperV + } + if asppr.TargetWorkerCount != nil { + objectMap["targetWorkerCount"] = asppr.TargetWorkerCount + } + if asppr.TargetWorkerSizeID != nil { + objectMap["targetWorkerSizeId"] = asppr.TargetWorkerSizeID + } + if asppr.KubeEnvironmentProfile != nil { + objectMap["kubeEnvironmentProfile"] = asppr.KubeEnvironmentProfile + } + if asppr.ZoneRedundant != nil { + objectMap["zoneRedundant"] = asppr.ZoneRedundant + } + return json.Marshal(objectMap) +} + +// AppServicePlanProperties appServicePlan resource specific properties +type AppServicePlanProperties struct { + // WorkerTierName - Target worker tier assigned to the App Service plan. + WorkerTierName *string `json:"workerTierName,omitempty"` + // Status - READ-ONLY; App Service plan status. Possible values include: 'StatusOptionsReady', 'StatusOptionsPending', 'StatusOptionsCreating' + Status StatusOptions `json:"status,omitempty"` + // Subscription - READ-ONLY; App Service plan subscription. + Subscription *string `json:"subscription,omitempty"` + // HostingEnvironmentProfile - Specification for the App Service Environment to use for the App Service plan. + HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` + // MaximumNumberOfWorkers - READ-ONLY; Maximum number of instances that can be assigned to this App Service plan. + MaximumNumberOfWorkers *int32 `json:"maximumNumberOfWorkers,omitempty"` + // NumberOfWorkers - READ-ONLY; The number of instances that are assigned to this App Service plan. + NumberOfWorkers *int32 `json:"numberOfWorkers,omitempty"` + // GeoRegion - READ-ONLY; Geographical location for the App Service plan. + GeoRegion *string `json:"geoRegion,omitempty"` + // PerSiteScaling - If true, apps assigned to this App Service plan can be scaled independently. + // If false, apps assigned to this App Service plan will scale to all instances of the plan. + PerSiteScaling *bool `json:"perSiteScaling,omitempty"` + // ElasticScaleEnabled - ServerFarm supports ElasticScale. Apps in this plan will scale as if the ServerFarm was ElasticPremium sku + ElasticScaleEnabled *bool `json:"elasticScaleEnabled,omitempty"` + // MaximumElasticWorkerCount - Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan + MaximumElasticWorkerCount *int32 `json:"maximumElasticWorkerCount,omitempty"` + // NumberOfSites - READ-ONLY; Number of apps assigned to this App Service plan. + NumberOfSites *int32 `json:"numberOfSites,omitempty"` + // IsSpot - If true, this App Service Plan owns spot instances. + IsSpot *bool `json:"isSpot,omitempty"` + // SpotExpirationTime - The time when the server farm expires. Valid only if it is a spot server farm. + SpotExpirationTime *date.Time `json:"spotExpirationTime,omitempty"` + // FreeOfferExpirationTime - The time when the server farm free offer expires. + FreeOfferExpirationTime *date.Time `json:"freeOfferExpirationTime,omitempty"` + // ResourceGroup - READ-ONLY; Resource group of the App Service plan. + ResourceGroup *string `json:"resourceGroup,omitempty"` + // Reserved - If Linux app service plan true, false otherwise. + Reserved *bool `json:"reserved,omitempty"` + // IsXenon - Obsolete: If Hyper-V container app service plan true, false otherwise. + IsXenon *bool `json:"isXenon,omitempty"` + // HyperV - If Hyper-V container app service plan true, false otherwise. + HyperV *bool `json:"hyperV,omitempty"` + // TargetWorkerCount - Scaling worker count. + TargetWorkerCount *int32 `json:"targetWorkerCount,omitempty"` + // TargetWorkerSizeID - Scaling worker size ID. + TargetWorkerSizeID *int32 `json:"targetWorkerSizeId,omitempty"` + // ProvisioningState - READ-ONLY; Provisioning state of the App Service Plan. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // KubeEnvironmentProfile - Specification for the Kubernetes Environment to use for the App Service plan. + KubeEnvironmentProfile *KubeEnvironmentProfile `json:"kubeEnvironmentProfile,omitempty"` + // ZoneRedundant - If true, this App Service Plan will perform availability zone balancing. + // If false, this App Service Plan will not perform availability zone balancing. + ZoneRedundant *bool `json:"zoneRedundant,omitempty"` +} + +// MarshalJSON is the custom marshaler for AppServicePlanProperties. +func (asp AppServicePlanProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asp.WorkerTierName != nil { + objectMap["workerTierName"] = asp.WorkerTierName + } + if asp.HostingEnvironmentProfile != nil { + objectMap["hostingEnvironmentProfile"] = asp.HostingEnvironmentProfile + } + if asp.PerSiteScaling != nil { + objectMap["perSiteScaling"] = asp.PerSiteScaling + } + if asp.ElasticScaleEnabled != nil { + objectMap["elasticScaleEnabled"] = asp.ElasticScaleEnabled + } + if asp.MaximumElasticWorkerCount != nil { + objectMap["maximumElasticWorkerCount"] = asp.MaximumElasticWorkerCount + } + if asp.IsSpot != nil { + objectMap["isSpot"] = asp.IsSpot + } + if asp.SpotExpirationTime != nil { + objectMap["spotExpirationTime"] = asp.SpotExpirationTime + } + if asp.FreeOfferExpirationTime != nil { + objectMap["freeOfferExpirationTime"] = asp.FreeOfferExpirationTime + } + if asp.Reserved != nil { + objectMap["reserved"] = asp.Reserved + } + if asp.IsXenon != nil { + objectMap["isXenon"] = asp.IsXenon + } + if asp.HyperV != nil { + objectMap["hyperV"] = asp.HyperV + } + if asp.TargetWorkerCount != nil { + objectMap["targetWorkerCount"] = asp.TargetWorkerCount + } + if asp.TargetWorkerSizeID != nil { + objectMap["targetWorkerSizeId"] = asp.TargetWorkerSizeID + } + if asp.KubeEnvironmentProfile != nil { + objectMap["kubeEnvironmentProfile"] = asp.KubeEnvironmentProfile + } + if asp.ZoneRedundant != nil { + objectMap["zoneRedundant"] = asp.ZoneRedundant + } + return json.Marshal(objectMap) +} + +// AppServicePlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AppServicePlansCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AppServicePlansClient) (AppServicePlan, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AppServicePlansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for AppServicePlansCreateOrUpdateFuture.Result. +func (future *AppServicePlansCreateOrUpdateFuture) result(client AppServicePlansClient) (asp AppServicePlan, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServicePlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + asp.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppServicePlansCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if asp.Response.Response, err = future.GetResult(sender); err == nil && asp.Response.Response.StatusCode != http.StatusNoContent { + asp, err = client.CreateOrUpdateResponder(asp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServicePlansCreateOrUpdateFuture", "Result", asp.Response.Response, "Failure responding to request") + } + } + return +} + +// AppStack web App stack. +type AppStack struct { + // Location - READ-ONLY; Web App stack location. + Location *string `json:"location,omitempty"` + // AppStackProperties - WebAppStack resource specific properties + *AppStackProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. Name *string `json:"name,omitempty"` // Kind - Kind of resource. Kind *string `json:"kind,omitempty"` - // Location - Resource Location. - Location *string `json:"location,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for AppServiceEnvironmentResource. -func (aser AppServiceEnvironmentResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for AppStack. +func (as AppStack) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if aser.AppServiceEnvironment != nil { - objectMap["properties"] = aser.AppServiceEnvironment - } - if aser.Kind != nil { - objectMap["kind"] = aser.Kind - } - if aser.Location != nil { - objectMap["location"] = aser.Location + if as.AppStackProperties != nil { + objectMap["properties"] = as.AppStackProperties } - if aser.Tags != nil { - objectMap["tags"] = aser.Tags + if as.Kind != nil { + objectMap["kind"] = as.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for AppServiceEnvironmentResource struct. -func (aser *AppServiceEnvironmentResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for AppStack struct. +func (as *AppStack) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -3272,14 +3684,23 @@ func (aser *AppServiceEnvironmentResource) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + as.Location = &location + } case "properties": if v != nil { - var appServiceEnvironment AppServiceEnvironment - err = json.Unmarshal(*v, &appServiceEnvironment) + var appStackProperties AppStackProperties + err = json.Unmarshal(*v, &appStackProperties) if err != nil { return err } - aser.AppServiceEnvironment = &appServiceEnvironment + as.AppStackProperties = &appStackProperties } case "id": if v != nil { @@ -3288,7 +3709,7 @@ func (aser *AppServiceEnvironmentResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - aser.ID = &ID + as.ID = &ID } case "name": if v != nil { @@ -3297,7 +3718,7 @@ func (aser *AppServiceEnvironmentResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - aser.Name = &name + as.Name = &name } case "kind": if v != nil { @@ -3306,16 +3727,7 @@ func (aser *AppServiceEnvironmentResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - aser.Kind = &kind - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - aser.Location = &location + as.Kind = &kind } case "type": if v != nil { @@ -3324,16 +3736,7 @@ func (aser *AppServiceEnvironmentResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - aser.Type = &typeVar - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - aser.Tags = tags + as.Type = &typeVar } } } @@ -3341,103 +3744,502 @@ func (aser *AppServiceEnvironmentResource) UnmarshalJSON(body []byte) error { return nil } -// AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionFuture an abstraction for monitoring and -// retrieving the results of a long-running operation. -type AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(AppServiceEnvironmentsClient) (RemotePrivateEndpointConnectionARMResource, error) +// AppStackCollection collection of Web app Stacks +type AppStackCollection struct { + autorest.Response `json:"-"` + // Value - Collection of resources. + Value *[]AppStack `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty"` } -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err +// MarshalJSON is the custom marshaler for AppStackCollection. +func (asc AppStackCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asc.Value != nil { + objectMap["value"] = asc.Value } - future.FutureAPI = &azFuture - future.Result = future.result - return nil + return json.Marshal(objectMap) } -// result is the default implementation for AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionFuture.Result. -func (future *AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionFuture) result(client AppServiceEnvironmentsClient) (rpecar RemotePrivateEndpointConnectionARMResource, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure") - return +// AppStackCollectionIterator provides access to a complete listing of AppStack values. +type AppStackCollectionIterator struct { + i int + page AppStackCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *AppStackCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppStackCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - if !done { - rpecar.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionFuture") - return + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rpecar.Response.Response, err = future.GetResult(sender); err == nil && rpecar.Response.Response.StatusCode != http.StatusNoContent { - rpecar, err = client.ApproveOrRejectPrivateEndpointConnectionResponder(rpecar.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionFuture", "Result", rpecar.Response.Response, "Failure responding to request") - } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err } - return -} - -// AppServiceEnvironmentsChangeVnetAllFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type AppServiceEnvironmentsChangeVnetAllFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(AppServiceEnvironmentsClient) (AppCollectionPage, error) + iter.i = 0 + return nil } -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppServiceEnvironmentsChangeVnetAllFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *AppStackCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AppStackCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter AppStackCollectionIterator) Response() AppStackCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter AppStackCollectionIterator) Value() AppStack { + if !iter.page.NotDone() { + return AppStack{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AppStackCollectionIterator type. +func NewAppStackCollectionIterator(page AppStackCollectionPage) AppStackCollectionIterator { + return AppStackCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (asc AppStackCollection) IsEmpty() bool { + return asc.Value == nil || len(*asc.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (asc AppStackCollection) hasNextLink() bool { + return asc.NextLink != nil && len(*asc.NextLink) != 0 +} + +// appStackCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (asc AppStackCollection) appStackCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !asc.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(asc.NextLink))) +} + +// AppStackCollectionPage contains a page of AppStack values. +type AppStackCollectionPage struct { + fn func(context.Context, AppStackCollection) (AppStackCollection, error) + asc AppStackCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *AppStackCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppStackCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.asc) + if err != nil { + return err + } + page.asc = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - future.FutureAPI = &azFuture - future.Result = future.result return nil } -// result is the default implementation for AppServiceEnvironmentsChangeVnetAllFuture.Result. -func (future *AppServiceEnvironmentsChangeVnetAllFuture) result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *AppStackCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AppStackCollectionPage) NotDone() bool { + return !page.asc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AppStackCollectionPage) Response() AppStackCollection { + return page.asc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AppStackCollectionPage) Values() []AppStack { + if page.asc.IsEmpty() { + return nil + } + return *page.asc.Value +} + +// Creates a new instance of the AppStackCollectionPage type. +func NewAppStackCollectionPage(cur AppStackCollection, getNextPage func(context.Context, AppStackCollection) (AppStackCollection, error)) AppStackCollectionPage { + return AppStackCollectionPage{ + fn: getNextPage, + asc: cur, + } +} + +// AppStackProperties webAppStack resource specific properties +type AppStackProperties struct { + // DisplayText - READ-ONLY; Web App stack (display only). + DisplayText *string `json:"displayText,omitempty"` + // Value - READ-ONLY; Web App stack name. + Value *string `json:"value,omitempty"` + // MajorVersions - READ-ONLY; List of major versions available. + MajorVersions *[]AppMajorVersion `json:"majorVersions,omitempty"` + // PreferredOs - READ-ONLY; Web App stack preferred OS. Possible values include: 'StackPreferredOsWindows', 'StackPreferredOsLinux' + PreferredOs StackPreferredOs `json:"preferredOs,omitempty"` +} + +// MarshalJSON is the custom marshaler for AppStackProperties. +func (as AppStackProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// Apple the configuration settings of the Apple provider. +type Apple struct { + // Enabled - false if the Apple provider should not be enabled despite the set registration; otherwise, true. + Enabled *bool `json:"enabled,omitempty"` + // Registration - The configuration settings of the Apple registration. + Registration *AppleRegistration `json:"registration,omitempty"` + // Login - The configuration settings of the login flow. + Login *LoginScopes `json:"login,omitempty"` +} + +// AppleRegistration the configuration settings of the registration for the Apple provider +type AppleRegistration struct { + // ClientID - The Client ID of the app used for login. + ClientID *string `json:"clientId,omitempty"` + // ClientSecretSettingName - The app setting name that contains the client secret. + ClientSecretSettingName *string `json:"clientSecretSettingName,omitempty"` +} + +// ApplicationLogsConfig application logs configuration. +type ApplicationLogsConfig struct { + // FileSystem - Application logs to file system configuration. + FileSystem *FileSystemApplicationLogsConfig `json:"fileSystem,omitempty"` + // AzureTableStorage - Application logs to azure table storage configuration. + AzureTableStorage *AzureTableStorageApplicationLogsConfig `json:"azureTableStorage,omitempty"` + // AzureBlobStorage - Application logs to blob storage configuration. + AzureBlobStorage *AzureBlobStorageApplicationLogsConfig `json:"azureBlobStorage,omitempty"` +} + +// ApplicationStack application stack. +type ApplicationStack struct { + // Name - Application stack name. + Name *string `json:"name,omitempty"` + // Display - Application stack display name. + Display *string `json:"display,omitempty"` + // Dependency - Application stack dependency. + Dependency *string `json:"dependency,omitempty"` + // MajorVersions - List of major versions available. + MajorVersions *[]StackMajorVersion `json:"majorVersions,omitempty"` + // Frameworks - List of frameworks associated with application stack. + Frameworks *[]ApplicationStack `json:"frameworks,omitempty"` + // IsDeprecated - true if this is the stack is deprecated; otherwise, false. + IsDeprecated *[]ApplicationStack `json:"isDeprecated,omitempty"` +} + +// ApplicationStackCollection collection of Application Stacks +type ApplicationStackCollection struct { + autorest.Response `json:"-"` + // Value - Collection of resources. + Value *[]ApplicationStackResource `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationStackCollection. +func (asc ApplicationStackCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asc.Value != nil { + objectMap["value"] = asc.Value + } + return json.Marshal(objectMap) +} + +// ApplicationStackCollectionIterator provides access to a complete listing of ApplicationStackResource +// values. +type ApplicationStackCollectionIterator struct { + i int + page ApplicationStackCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ApplicationStackCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationStackCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsChangeVnetAllFuture", "Result", future.Response(), "Polling failure") - return + iter.i-- + return err } - if !done { - acp.ac.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsChangeVnetAllFuture") - return + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ApplicationStackCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ApplicationStackCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ApplicationStackCollectionIterator) Response() ApplicationStackCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ApplicationStackCollectionIterator) Value() ApplicationStackResource { + if !iter.page.NotDone() { + return ApplicationStackResource{} } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent { - acp, err = client.ChangeVnetResponder(acp.ac.Response.Response) + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ApplicationStackCollectionIterator type. +func NewApplicationStackCollectionIterator(page ApplicationStackCollectionPage) ApplicationStackCollectionIterator { + return ApplicationStackCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (asc ApplicationStackCollection) IsEmpty() bool { + return asc.Value == nil || len(*asc.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (asc ApplicationStackCollection) hasNextLink() bool { + return asc.NextLink != nil && len(*asc.NextLink) != 0 +} + +// applicationStackCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (asc ApplicationStackCollection) applicationStackCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !asc.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(asc.NextLink))) +} + +// ApplicationStackCollectionPage contains a page of ApplicationStackResource values. +type ApplicationStackCollectionPage struct { + fn func(context.Context, ApplicationStackCollection) (ApplicationStackCollection, error) + asc ApplicationStackCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ApplicationStackCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationStackCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.asc) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsChangeVnetAllFuture", "Result", acp.ac.Response.Response, "Failure responding to request") + return err + } + page.asc = next + if !next.hasNextLink() || !next.IsEmpty() { + break } } - return + return nil } -// AppServiceEnvironmentsChangeVnetFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type AppServiceEnvironmentsChangeVnetFuture struct { +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ApplicationStackCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ApplicationStackCollectionPage) NotDone() bool { + return !page.asc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ApplicationStackCollectionPage) Response() ApplicationStackCollection { + return page.asc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ApplicationStackCollectionPage) Values() []ApplicationStackResource { + if page.asc.IsEmpty() { + return nil + } + return *page.asc.Value +} + +// Creates a new instance of the ApplicationStackCollectionPage type. +func NewApplicationStackCollectionPage(cur ApplicationStackCollection, getNextPage func(context.Context, ApplicationStackCollection) (ApplicationStackCollection, error)) ApplicationStackCollectionPage { + return ApplicationStackCollectionPage{ + fn: getNextPage, + asc: cur, + } +} + +// ApplicationStackResource ARM resource for a ApplicationStack. +type ApplicationStackResource struct { + // ApplicationStack - Core resource properties + *ApplicationStack `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationStackResource. +func (asr ApplicationStackResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asr.ApplicationStack != nil { + objectMap["properties"] = asr.ApplicationStack + } + if asr.Kind != nil { + objectMap["kind"] = asr.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationStackResource struct. +func (asr *ApplicationStackResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var applicationStack ApplicationStack + err = json.Unmarshal(*v, &applicationStack) + if err != nil { + return err + } + asr.ApplicationStack = &applicationStack + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + asr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + asr.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + asr.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + asr.Type = &typeVar + } + } + } + + return nil +} + +// AppsApproveOrRejectPrivateEndpointConnectionFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type AppsApproveOrRejectPrivateEndpointConnectionFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. - Result func(AppServiceEnvironmentsClient) (AppCollectionPage, error) + Result func(AppsClient) (RemotePrivateEndpointConnectionARMResource, error) } // UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppServiceEnvironmentsChangeVnetFuture) UnmarshalJSON(body []byte) error { +func (future *AppsApproveOrRejectPrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error { var azFuture azure.Future if err := json.Unmarshal(body, &azFuture); err != nil { return err @@ -3447,40 +4249,40 @@ func (future *AppServiceEnvironmentsChangeVnetFuture) UnmarshalJSON(body []byte) return nil } -// result is the default implementation for AppServiceEnvironmentsChangeVnetFuture.Result. -func (future *AppServiceEnvironmentsChangeVnetFuture) result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) { +// result is the default implementation for AppsApproveOrRejectPrivateEndpointConnectionFuture.Result. +func (future *AppsApproveOrRejectPrivateEndpointConnectionFuture) result(client AppsClient) (rpecar RemotePrivateEndpointConnectionARMResource, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsChangeVnetFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "web.AppsApproveOrRejectPrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure") return } if !done { - acp.ac.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsChangeVnetFuture") + rpecar.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppsApproveOrRejectPrivateEndpointConnectionFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent { - acp, err = client.ChangeVnetResponder(acp.ac.Response.Response) + if rpecar.Response.Response, err = future.GetResult(sender); err == nil && rpecar.Response.Response.StatusCode != http.StatusNoContent { + rpecar, err = client.ApproveOrRejectPrivateEndpointConnectionResponder(rpecar.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsChangeVnetFuture", "Result", acp.ac.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsApproveOrRejectPrivateEndpointConnectionFuture", "Result", rpecar.Response.Response, "Failure responding to request") } } return } -// AppServiceEnvironmentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type AppServiceEnvironmentsCreateOrUpdateFuture struct { +// AppsApproveOrRejectPrivateEndpointConnectionSlotFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type AppsApproveOrRejectPrivateEndpointConnectionSlotFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. - Result func(AppServiceEnvironmentsClient) (AppServiceEnvironmentResource, error) + Result func(AppsClient) (RemotePrivateEndpointConnectionARMResource, error) } // UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppServiceEnvironmentsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { +func (future *AppsApproveOrRejectPrivateEndpointConnectionSlotFuture) UnmarshalJSON(body []byte) error { var azFuture azure.Future if err := json.Unmarshal(body, &azFuture); err != nil { return err @@ -3490,40 +4292,40 @@ func (future *AppServiceEnvironmentsCreateOrUpdateFuture) UnmarshalJSON(body []b return nil } -// result is the default implementation for AppServiceEnvironmentsCreateOrUpdateFuture.Result. -func (future *AppServiceEnvironmentsCreateOrUpdateFuture) result(client AppServiceEnvironmentsClient) (aser AppServiceEnvironmentResource, err error) { +// result is the default implementation for AppsApproveOrRejectPrivateEndpointConnectionSlotFuture.Result. +func (future *AppsApproveOrRejectPrivateEndpointConnectionSlotFuture) result(client AppsClient) (rpecar RemotePrivateEndpointConnectionARMResource, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "web.AppsApproveOrRejectPrivateEndpointConnectionSlotFuture", "Result", future.Response(), "Polling failure") return } if !done { - aser.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsCreateOrUpdateFuture") + rpecar.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppsApproveOrRejectPrivateEndpointConnectionSlotFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if aser.Response.Response, err = future.GetResult(sender); err == nil && aser.Response.Response.StatusCode != http.StatusNoContent { - aser, err = client.CreateOrUpdateResponder(aser.Response.Response) + if rpecar.Response.Response, err = future.GetResult(sender); err == nil && rpecar.Response.Response.StatusCode != http.StatusNoContent { + rpecar, err = client.ApproveOrRejectPrivateEndpointConnectionSlotResponder(rpecar.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateFuture", "Result", aser.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsApproveOrRejectPrivateEndpointConnectionSlotFuture", "Result", rpecar.Response.Response, "Failure responding to request") } } return } -// AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture struct { +// AppsCreateFunctionFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type AppsCreateFunctionFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. - Result func(AppServiceEnvironmentsClient) (WorkerPoolResource, error) + Result func(AppsClient) (FunctionEnvelope, error) } // UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture) UnmarshalJSON(body []byte) error { +func (future *AppsCreateFunctionFuture) UnmarshalJSON(body []byte) error { var azFuture azure.Future if err := json.Unmarshal(body, &azFuture); err != nil { return err @@ -3533,40 +4335,40 @@ func (future *AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture) Unmarshal return nil } -// result is the default implementation for AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture.Result. -func (future *AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture) result(client AppServiceEnvironmentsClient) (wpr WorkerPoolResource, err error) { +// result is the default implementation for AppsCreateFunctionFuture.Result. +func (future *AppsCreateFunctionFuture) result(client AppsClient) (fe FunctionEnvelope, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "web.AppsCreateFunctionFuture", "Result", future.Response(), "Polling failure") return } if !done { - wpr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture") + fe.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppsCreateFunctionFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if wpr.Response.Response, err = future.GetResult(sender); err == nil && wpr.Response.Response.StatusCode != http.StatusNoContent { - wpr, err = client.CreateOrUpdateMultiRolePoolResponder(wpr.Response.Response) + if fe.Response.Response, err = future.GetResult(sender); err == nil && fe.Response.Response.StatusCode != http.StatusNoContent { + fe, err = client.CreateFunctionResponder(fe.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture", "Result", wpr.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsCreateFunctionFuture", "Result", fe.Response.Response, "Failure responding to request") } } return } -// AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture struct { +// AppsCreateInstanceFunctionSlotFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AppsCreateInstanceFunctionSlotFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. - Result func(AppServiceEnvironmentsClient) (WorkerPoolResource, error) + Result func(AppsClient) (FunctionEnvelope, error) } // UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture) UnmarshalJSON(body []byte) error { +func (future *AppsCreateInstanceFunctionSlotFuture) UnmarshalJSON(body []byte) error { var azFuture azure.Future if err := json.Unmarshal(body, &azFuture); err != nil { return err @@ -3576,40 +4378,40 @@ func (future *AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture) UnmarshalJSO return nil } -// result is the default implementation for AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture.Result. -func (future *AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture) result(client AppServiceEnvironmentsClient) (wpr WorkerPoolResource, err error) { +// result is the default implementation for AppsCreateInstanceFunctionSlotFuture.Result. +func (future *AppsCreateInstanceFunctionSlotFuture) result(client AppsClient) (fe FunctionEnvelope, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceFunctionSlotFuture", "Result", future.Response(), "Polling failure") return } if !done { - wpr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture") + fe.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceFunctionSlotFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if wpr.Response.Response, err = future.GetResult(sender); err == nil && wpr.Response.Response.StatusCode != http.StatusNoContent { - wpr, err = client.CreateOrUpdateWorkerPoolResponder(wpr.Response.Response) + if fe.Response.Response, err = future.GetResult(sender); err == nil && fe.Response.Response.StatusCode != http.StatusNoContent { + fe, err = client.CreateInstanceFunctionSlotResponder(fe.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture", "Result", wpr.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceFunctionSlotFuture", "Result", fe.Response.Response, "Failure responding to request") } } return } -// AppServiceEnvironmentsDeleteFuture an abstraction for monitoring and retrieving the results of a +// AppsCreateInstanceMSDeployOperationFuture an abstraction for monitoring and retrieving the results of a // long-running operation. -type AppServiceEnvironmentsDeleteFuture struct { +type AppsCreateInstanceMSDeployOperationFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. - Result func(AppServiceEnvironmentsClient) (autorest.Response, error) + Result func(AppsClient) (MSDeployStatus, error) } // UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppServiceEnvironmentsDeleteFuture) UnmarshalJSON(body []byte) error { +func (future *AppsCreateInstanceMSDeployOperationFuture) UnmarshalJSON(body []byte) error { var azFuture azure.Future if err := json.Unmarshal(body, &azFuture); err != nil { return err @@ -3619,34 +4421,40 @@ func (future *AppServiceEnvironmentsDeleteFuture) UnmarshalJSON(body []byte) err return nil } -// result is the default implementation for AppServiceEnvironmentsDeleteFuture.Result. -func (future *AppServiceEnvironmentsDeleteFuture) result(client AppServiceEnvironmentsClient) (ar autorest.Response, err error) { +// result is the default implementation for AppsCreateInstanceMSDeployOperationFuture.Result. +func (future *AppsCreateInstanceMSDeployOperationFuture) result(client AppsClient) (mds MSDeployStatus, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsDeleteFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationFuture", "Result", future.Response(), "Polling failure") return } if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsDeleteFuture") + mds.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceMSDeployOperationFuture") return } - ar.Response = future.Response() + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if mds.Response.Response, err = future.GetResult(sender); err == nil && mds.Response.Response.StatusCode != http.StatusNoContent { + mds, err = client.CreateInstanceMSDeployOperationResponder(mds.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationFuture", "Result", mds.Response.Response, "Failure responding to request") + } + } return } -// AppServiceEnvironmentsDeletePrivateEndpointConnectionFuture an abstraction for monitoring and retrieving -// the results of a long-running operation. -type AppServiceEnvironmentsDeletePrivateEndpointConnectionFuture struct { +// AppsCreateInstanceMSDeployOperationSlotFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type AppsCreateInstanceMSDeployOperationSlotFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. - Result func(AppServiceEnvironmentsClient) (SetObject, error) + Result func(AppsClient) (MSDeployStatus, error) } // UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppServiceEnvironmentsDeletePrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error { +func (future *AppsCreateInstanceMSDeployOperationSlotFuture) UnmarshalJSON(body []byte) error { var azFuture azure.Future if err := json.Unmarshal(body, &azFuture); err != nil { return err @@ -3656,40 +4464,40 @@ func (future *AppServiceEnvironmentsDeletePrivateEndpointConnectionFuture) Unmar return nil } -// result is the default implementation for AppServiceEnvironmentsDeletePrivateEndpointConnectionFuture.Result. -func (future *AppServiceEnvironmentsDeletePrivateEndpointConnectionFuture) result(client AppServiceEnvironmentsClient) (so SetObject, err error) { +// result is the default implementation for AppsCreateInstanceMSDeployOperationSlotFuture.Result. +func (future *AppsCreateInstanceMSDeployOperationSlotFuture) result(client AppsClient) (mds MSDeployStatus, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsDeletePrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationSlotFuture", "Result", future.Response(), "Polling failure") return } if !done { - so.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsDeletePrivateEndpointConnectionFuture") + mds.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceMSDeployOperationSlotFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { - so, err = client.DeletePrivateEndpointConnectionResponder(so.Response.Response) + if mds.Response.Response, err = future.GetResult(sender); err == nil && mds.Response.Response.StatusCode != http.StatusNoContent { + mds, err = client.CreateInstanceMSDeployOperationSlotResponder(mds.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsDeletePrivateEndpointConnectionFuture", "Result", so.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationSlotFuture", "Result", mds.Response.Response, "Failure responding to request") } } return } -// AppServiceEnvironmentsResumeAllFuture an abstraction for monitoring and retrieving the results of a +// AppsCreateMSDeployOperationFuture an abstraction for monitoring and retrieving the results of a // long-running operation. -type AppServiceEnvironmentsResumeAllFuture struct { +type AppsCreateMSDeployOperationFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. - Result func(AppServiceEnvironmentsClient) (AppCollectionPage, error) + Result func(AppsClient) (MSDeployStatus, error) } // UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppServiceEnvironmentsResumeAllFuture) UnmarshalJSON(body []byte) error { +func (future *AppsCreateMSDeployOperationFuture) UnmarshalJSON(body []byte) error { var azFuture azure.Future if err := json.Unmarshal(body, &azFuture); err != nil { return err @@ -3699,40 +4507,40 @@ func (future *AppServiceEnvironmentsResumeAllFuture) UnmarshalJSON(body []byte) return nil } -// result is the default implementation for AppServiceEnvironmentsResumeAllFuture.Result. -func (future *AppServiceEnvironmentsResumeAllFuture) result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) { +// result is the default implementation for AppsCreateMSDeployOperationFuture.Result. +func (future *AppsCreateMSDeployOperationFuture) result(client AppsClient) (mds MSDeployStatus, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeAllFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationFuture", "Result", future.Response(), "Polling failure") return } if !done { - acp.ac.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsResumeAllFuture") + mds.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppsCreateMSDeployOperationFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent { - acp, err = client.ResumeResponder(acp.ac.Response.Response) + if mds.Response.Response, err = future.GetResult(sender); err == nil && mds.Response.Response.StatusCode != http.StatusNoContent { + mds, err = client.CreateMSDeployOperationResponder(mds.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeAllFuture", "Result", acp.ac.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationFuture", "Result", mds.Response.Response, "Failure responding to request") } } return } -// AppServiceEnvironmentsResumeFuture an abstraction for monitoring and retrieving the results of a +// AppsCreateMSDeployOperationSlotFuture an abstraction for monitoring and retrieving the results of a // long-running operation. -type AppServiceEnvironmentsResumeFuture struct { +type AppsCreateMSDeployOperationSlotFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. - Result func(AppServiceEnvironmentsClient) (AppCollectionPage, error) + Result func(AppsClient) (MSDeployStatus, error) } // UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppServiceEnvironmentsResumeFuture) UnmarshalJSON(body []byte) error { +func (future *AppsCreateMSDeployOperationSlotFuture) UnmarshalJSON(body []byte) error { var azFuture azure.Future if err := json.Unmarshal(body, &azFuture); err != nil { return err @@ -3742,40 +4550,40 @@ func (future *AppServiceEnvironmentsResumeFuture) UnmarshalJSON(body []byte) err return nil } -// result is the default implementation for AppServiceEnvironmentsResumeFuture.Result. -func (future *AppServiceEnvironmentsResumeFuture) result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) { +// result is the default implementation for AppsCreateMSDeployOperationSlotFuture.Result. +func (future *AppsCreateMSDeployOperationSlotFuture) result(client AppsClient) (mds MSDeployStatus, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationSlotFuture", "Result", future.Response(), "Polling failure") return } if !done { - acp.ac.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsResumeFuture") + mds.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppsCreateMSDeployOperationSlotFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent { - acp, err = client.ResumeResponder(acp.ac.Response.Response) + if mds.Response.Response, err = future.GetResult(sender); err == nil && mds.Response.Response.StatusCode != http.StatusNoContent { + mds, err = client.CreateMSDeployOperationSlotResponder(mds.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeFuture", "Result", acp.ac.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationSlotFuture", "Result", mds.Response.Response, "Failure responding to request") } } return } -// AppServiceEnvironmentsSuspendAllFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type AppServiceEnvironmentsSuspendAllFuture struct { +// AppsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type AppsCreateOrUpdateFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. - Result func(AppServiceEnvironmentsClient) (AppCollectionPage, error) + Result func(AppsClient) (Site, error) } // UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppServiceEnvironmentsSuspendAllFuture) UnmarshalJSON(body []byte) error { +func (future *AppsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { var azFuture azure.Future if err := json.Unmarshal(body, &azFuture); err != nil { return err @@ -3785,40 +4593,40 @@ func (future *AppServiceEnvironmentsSuspendAllFuture) UnmarshalJSON(body []byte) return nil } -// result is the default implementation for AppServiceEnvironmentsSuspendAllFuture.Result. -func (future *AppServiceEnvironmentsSuspendAllFuture) result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) { +// result is the default implementation for AppsCreateOrUpdateFuture.Result. +func (future *AppsCreateOrUpdateFuture) result(client AppsClient) (s Site, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendAllFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - acp.ac.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsSuspendAllFuture") + s.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent { - acp, err = client.SuspendResponder(acp.ac.Response.Response) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.CreateOrUpdateResponder(s.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendAllFuture", "Result", acp.ac.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request") } } return } -// AppServiceEnvironmentsSuspendFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type AppServiceEnvironmentsSuspendFuture struct { +// AppsCreateOrUpdateSlotFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type AppsCreateOrUpdateSlotFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. - Result func(AppServiceEnvironmentsClient) (AppCollectionPage, error) + Result func(AppsClient) (Site, error) } // UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppServiceEnvironmentsSuspendFuture) UnmarshalJSON(body []byte) error { +func (future *AppsCreateOrUpdateSlotFuture) UnmarshalJSON(body []byte) error { var azFuture azure.Future if err := json.Unmarshal(body, &azFuture); err != nil { return err @@ -3828,659 +4636,255 @@ func (future *AppServiceEnvironmentsSuspendFuture) UnmarshalJSON(body []byte) er return nil } -// result is the default implementation for AppServiceEnvironmentsSuspendFuture.Result. -func (future *AppServiceEnvironmentsSuspendFuture) result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) { +// result is the default implementation for AppsCreateOrUpdateSlotFuture.Result. +func (future *AppsCreateOrUpdateSlotFuture) result(client AppsClient) (s Site, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSlotFuture", "Result", future.Response(), "Polling failure") return } if !done { - acp.ac.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsSuspendFuture") + s.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSlotFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent { - acp, err = client.SuspendResponder(acp.ac.Response.Response) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.CreateOrUpdateSlotResponder(s.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendFuture", "Result", acp.ac.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSlotFuture", "Result", s.Response.Response, "Failure responding to request") } } return } -// AppserviceGithubToken github access token for Appservice CLI github integration. -type AppserviceGithubToken struct { - // AccessToken - Github access token for Appservice CLI github integration - AccessToken *string `json:"accessToken,omitempty"` - // Scope - Scope of the github access token - Scope *string `json:"scope,omitempty"` - // TokenType - token type - TokenType *string `json:"tokenType,omitempty"` - // GotToken - True if valid github token received, False otherwise - GotToken *bool `json:"gotToken,omitempty"` - // ErrorMessage - Error message if unable to get token - ErrorMessage *string `json:"errorMessage,omitempty"` -} - -// AppserviceGithubTokenRequest appservice Github token request content. -type AppserviceGithubTokenRequest struct { - // Code - Code string to exchange for Github Access token - Code *string `json:"code,omitempty"` - // State - State string used for verification. - State *string `json:"state,omitempty"` -} - -// AppServicePlan app Service plan. -type AppServicePlan struct { - autorest.Response `json:"-"` - // AppServicePlanProperties - AppServicePlan resource specific properties - *AppServicePlanProperties `json:"properties,omitempty"` - Sku *SkuDescription `json:"sku,omitempty"` - ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Location - Resource Location. - Location *string `json:"location,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` +// AppsCreateOrUpdateSourceControlFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AppsCreateOrUpdateSourceControlFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AppsClient) (SiteSourceControl, error) } -// MarshalJSON is the custom marshaler for AppServicePlan. -func (asp AppServicePlan) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if asp.AppServicePlanProperties != nil { - objectMap["properties"] = asp.AppServicePlanProperties - } - if asp.Sku != nil { - objectMap["sku"] = asp.Sku - } - if asp.ExtendedLocation != nil { - objectMap["extendedLocation"] = asp.ExtendedLocation - } - if asp.Kind != nil { - objectMap["kind"] = asp.Kind - } - if asp.Location != nil { - objectMap["location"] = asp.Location - } - if asp.Tags != nil { - objectMap["tags"] = asp.Tags +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AppsCreateOrUpdateSourceControlFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err } - return json.Marshal(objectMap) + future.FutureAPI = &azFuture + future.Result = future.result + return nil } -// UnmarshalJSON is the custom unmarshaler for AppServicePlan struct. -func (asp *AppServicePlan) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) +// result is the default implementation for AppsCreateOrUpdateSourceControlFuture.Result. +func (future *AppsCreateOrUpdateSourceControlFuture) result(client AppsClient) (ssc SiteSourceControl, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) if err != nil { - return err + err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlFuture", "Result", future.Response(), "Polling failure") + return } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var appServicePlanProperties AppServicePlanProperties - err = json.Unmarshal(*v, &appServicePlanProperties) - if err != nil { - return err - } - asp.AppServicePlanProperties = &appServicePlanProperties - } - case "sku": - if v != nil { - var sku SkuDescription - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - asp.Sku = &sku - } - case "extendedLocation": - if v != nil { - var extendedLocation ExtendedLocation - err = json.Unmarshal(*v, &extendedLocation) - if err != nil { - return err - } - asp.ExtendedLocation = &extendedLocation - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - asp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - asp.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - asp.Kind = &kind - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - asp.Location = &location - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - asp.Type = &typeVar - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - asp.Tags = tags - } + if !done { + ssc.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSourceControlFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ssc.Response.Response, err = future.GetResult(sender); err == nil && ssc.Response.Response.StatusCode != http.StatusNoContent { + ssc, err = client.CreateOrUpdateSourceControlResponder(ssc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlFuture", "Result", ssc.Response.Response, "Failure responding to request") } } - - return nil + return } -// AppServicePlanCollection collection of App Service plans. -type AppServicePlanCollection struct { - autorest.Response `json:"-"` - // Value - Collection of resources. - Value *[]AppServicePlan `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty"` +// AppsCreateOrUpdateSourceControlSlotFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AppsCreateOrUpdateSourceControlSlotFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AppsClient) (SiteSourceControl, error) } -// MarshalJSON is the custom marshaler for AppServicePlanCollection. -func (aspc AppServicePlanCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if aspc.Value != nil { - objectMap["value"] = aspc.Value +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AppsCreateOrUpdateSourceControlSlotFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err } - return json.Marshal(objectMap) -} - -// AppServicePlanCollectionIterator provides access to a complete listing of AppServicePlan values. -type AppServicePlanCollectionIterator struct { - i int - page AppServicePlanCollectionPage + future.FutureAPI = &azFuture + future.Result = future.result + return nil } -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *AppServicePlanCollectionIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppServicePlanCollectionIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() +// result is the default implementation for AppsCreateOrUpdateSourceControlSlotFuture.Result. +func (future *AppsCreateOrUpdateSourceControlSlotFuture) result(client AppsClient) (ssc SiteSourceControl, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlSlotFuture", "Result", future.Response(), "Polling failure") + return } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil + if !done { + ssc.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSourceControlSlotFuture") + return } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ssc.Response.Response, err = future.GetResult(sender); err == nil && ssc.Response.Response.StatusCode != http.StatusNoContent { + ssc, err = client.CreateOrUpdateSourceControlSlotResponder(ssc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlSlotFuture", "Result", ssc.Response.Response, "Failure responding to request") + } } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *AppServicePlanCollectionIterator) Next() error { - return iter.NextWithContext(context.Background()) + return } -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter AppServicePlanCollectionIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) +// AppsDeletePrivateEndpointConnectionFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AppsDeletePrivateEndpointConnectionFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AppsClient) (SetObject, error) } -// Response returns the raw server response from the last page request. -func (iter AppServicePlanCollectionIterator) Response() AppServicePlanCollection { - return iter.page.Response() +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AppsDeletePrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil } -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter AppServicePlanCollectionIterator) Value() AppServicePlan { - if !iter.page.NotDone() { - return AppServicePlan{} +// result is the default implementation for AppsDeletePrivateEndpointConnectionFuture.Result. +func (future *AppsDeletePrivateEndpointConnectionFuture) result(client AppsClient) (so SetObject, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsDeletePrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure") + return } - return iter.page.Values()[iter.i] + if !done { + so.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppsDeletePrivateEndpointConnectionFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { + so, err = client.DeletePrivateEndpointConnectionResponder(so.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsDeletePrivateEndpointConnectionFuture", "Result", so.Response.Response, "Failure responding to request") + } + } + return } -// Creates a new instance of the AppServicePlanCollectionIterator type. -func NewAppServicePlanCollectionIterator(page AppServicePlanCollectionPage) AppServicePlanCollectionIterator { - return AppServicePlanCollectionIterator{page: page} +// AppsDeletePrivateEndpointConnectionSlotFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type AppsDeletePrivateEndpointConnectionSlotFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AppsClient) (SetObject, error) } -// IsEmpty returns true if the ListResult contains no values. -func (aspc AppServicePlanCollection) IsEmpty() bool { - return aspc.Value == nil || len(*aspc.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (aspc AppServicePlanCollection) hasNextLink() bool { - return aspc.NextLink != nil && len(*aspc.NextLink) != 0 -} - -// appServicePlanCollectionPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (aspc AppServicePlanCollection) appServicePlanCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !aspc.hasNextLink() { - return nil, nil +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AppsDeletePrivateEndpointConnectionSlotFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(aspc.NextLink))) -} - -// AppServicePlanCollectionPage contains a page of AppServicePlan values. -type AppServicePlanCollectionPage struct { - fn func(context.Context, AppServicePlanCollection) (AppServicePlanCollection, error) - aspc AppServicePlanCollection + future.FutureAPI = &azFuture + future.Result = future.result + return nil } -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *AppServicePlanCollectionPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppServicePlanCollectionPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() +// result is the default implementation for AppsDeletePrivateEndpointConnectionSlotFuture.Result. +func (future *AppsDeletePrivateEndpointConnectionSlotFuture) result(client AppsClient) (so SetObject, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsDeletePrivateEndpointConnectionSlotFuture", "Result", future.Response(), "Polling failure") + return } - for { - next, err := page.fn(ctx, page.aspc) + if !done { + so.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppsDeletePrivateEndpointConnectionSlotFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { + so, err = client.DeletePrivateEndpointConnectionSlotResponder(so.Response.Response) if err != nil { - return err - } - page.aspc = next - if !next.hasNextLink() || !next.IsEmpty() { - break + err = autorest.NewErrorWithError(err, "web.AppsDeletePrivateEndpointConnectionSlotFuture", "Result", so.Response.Response, "Failure responding to request") } } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *AppServicePlanCollectionPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page AppServicePlanCollectionPage) NotDone() bool { - return !page.aspc.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page AppServicePlanCollectionPage) Response() AppServicePlanCollection { - return page.aspc -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page AppServicePlanCollectionPage) Values() []AppServicePlan { - if page.aspc.IsEmpty() { - return nil - } - return *page.aspc.Value -} - -// Creates a new instance of the AppServicePlanCollectionPage type. -func NewAppServicePlanCollectionPage(cur AppServicePlanCollection, getNextPage func(context.Context, AppServicePlanCollection) (AppServicePlanCollection, error)) AppServicePlanCollectionPage { - return AppServicePlanCollectionPage{ - fn: getNextPage, - aspc: cur, - } -} - -// AppServicePlanPatchResource ARM resource for a app service plan. -type AppServicePlanPatchResource struct { - // AppServicePlanPatchResourceProperties - AppServicePlanPatchResource resource specific properties - *AppServicePlanPatchResourceProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` + return } -// MarshalJSON is the custom marshaler for AppServicePlanPatchResource. -func (asppr AppServicePlanPatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if asppr.AppServicePlanPatchResourceProperties != nil { - objectMap["properties"] = asppr.AppServicePlanPatchResourceProperties - } - if asppr.Kind != nil { - objectMap["kind"] = asppr.Kind - } - return json.Marshal(objectMap) +// AppsGetProductionSiteDeploymentStatusFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type AppsGetProductionSiteDeploymentStatusFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(AppsClient) (CsmDeploymentStatus, error) } -// UnmarshalJSON is the custom unmarshaler for AppServicePlanPatchResource struct. -func (asppr *AppServicePlanPatchResource) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *AppsGetProductionSiteDeploymentStatusFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { return err } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var appServicePlanPatchResourceProperties AppServicePlanPatchResourceProperties - err = json.Unmarshal(*v, &appServicePlanPatchResourceProperties) - if err != nil { - return err - } - asppr.AppServicePlanPatchResourceProperties = &appServicePlanPatchResourceProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - asppr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - asppr.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - asppr.Kind = &kind - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - asppr.Type = &typeVar - } - } - } - + future.FutureAPI = &azFuture + future.Result = future.result return nil } -// AppServicePlanPatchResourceProperties appServicePlanPatchResource resource specific properties -type AppServicePlanPatchResourceProperties struct { - // WorkerTierName - Target worker tier assigned to the App Service plan. - WorkerTierName *string `json:"workerTierName,omitempty"` - // Status - READ-ONLY; App Service plan status. Possible values include: 'StatusOptionsReady', 'StatusOptionsPending', 'StatusOptionsCreating' - Status StatusOptions `json:"status,omitempty"` - // Subscription - READ-ONLY; App Service plan subscription. - Subscription *string `json:"subscription,omitempty"` - // HostingEnvironmentProfile - Specification for the App Service Environment to use for the App Service plan. - HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` - // MaximumNumberOfWorkers - READ-ONLY; Maximum number of instances that can be assigned to this App Service plan. - MaximumNumberOfWorkers *int32 `json:"maximumNumberOfWorkers,omitempty"` - // GeoRegion - READ-ONLY; Geographical location for the App Service plan. - GeoRegion *string `json:"geoRegion,omitempty"` - // PerSiteScaling - If true, apps assigned to this App Service plan can be scaled independently. - // If false, apps assigned to this App Service plan will scale to all instances of the plan. - PerSiteScaling *bool `json:"perSiteScaling,omitempty"` - // ElasticScaleEnabled - ServerFarm supports ElasticScale. Apps in this plan will scale as if the ServerFarm was ElasticPremium sku - ElasticScaleEnabled *bool `json:"elasticScaleEnabled,omitempty"` - // MaximumElasticWorkerCount - Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan - MaximumElasticWorkerCount *int32 `json:"maximumElasticWorkerCount,omitempty"` - // NumberOfSites - READ-ONLY; Number of apps assigned to this App Service plan. - NumberOfSites *int32 `json:"numberOfSites,omitempty"` - // IsSpot - If true, this App Service Plan owns spot instances. - IsSpot *bool `json:"isSpot,omitempty"` - // SpotExpirationTime - The time when the server farm expires. Valid only if it is a spot server farm. - SpotExpirationTime *date.Time `json:"spotExpirationTime,omitempty"` - // FreeOfferExpirationTime - The time when the server farm free offer expires. - FreeOfferExpirationTime *date.Time `json:"freeOfferExpirationTime,omitempty"` - // ResourceGroup - READ-ONLY; Resource group of the App Service plan. - ResourceGroup *string `json:"resourceGroup,omitempty"` - // Reserved - If Linux app service plan true, false otherwise. - Reserved *bool `json:"reserved,omitempty"` - // IsXenon - Obsolete: If Hyper-V container app service plan true, false otherwise. - IsXenon *bool `json:"isXenon,omitempty"` - // HyperV - If Hyper-V container app service plan true, false otherwise. - HyperV *bool `json:"hyperV,omitempty"` - // TargetWorkerCount - Scaling worker count. - TargetWorkerCount *int32 `json:"targetWorkerCount,omitempty"` - // TargetWorkerSizeID - Scaling worker size ID. - TargetWorkerSizeID *int32 `json:"targetWorkerSizeId,omitempty"` - // ProvisioningState - READ-ONLY; Provisioning state of the App Service Plan. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // KubeEnvironmentProfile - Specification for the Kubernetes Environment to use for the App Service plan. - KubeEnvironmentProfile *KubeEnvironmentProfile `json:"kubeEnvironmentProfile,omitempty"` - // ZoneRedundant - If true, this App Service Plan will perform availability zone balancing. - // If false, this App Service Plan will not perform availability zone balancing. - ZoneRedundant *bool `json:"zoneRedundant,omitempty"` -} - -// MarshalJSON is the custom marshaler for AppServicePlanPatchResourceProperties. -func (asppr AppServicePlanPatchResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if asppr.WorkerTierName != nil { - objectMap["workerTierName"] = asppr.WorkerTierName - } - if asppr.HostingEnvironmentProfile != nil { - objectMap["hostingEnvironmentProfile"] = asppr.HostingEnvironmentProfile - } - if asppr.PerSiteScaling != nil { - objectMap["perSiteScaling"] = asppr.PerSiteScaling - } - if asppr.ElasticScaleEnabled != nil { - objectMap["elasticScaleEnabled"] = asppr.ElasticScaleEnabled - } - if asppr.MaximumElasticWorkerCount != nil { - objectMap["maximumElasticWorkerCount"] = asppr.MaximumElasticWorkerCount - } - if asppr.IsSpot != nil { - objectMap["isSpot"] = asppr.IsSpot - } - if asppr.SpotExpirationTime != nil { - objectMap["spotExpirationTime"] = asppr.SpotExpirationTime - } - if asppr.FreeOfferExpirationTime != nil { - objectMap["freeOfferExpirationTime"] = asppr.FreeOfferExpirationTime - } - if asppr.Reserved != nil { - objectMap["reserved"] = asppr.Reserved - } - if asppr.IsXenon != nil { - objectMap["isXenon"] = asppr.IsXenon - } - if asppr.HyperV != nil { - objectMap["hyperV"] = asppr.HyperV - } - if asppr.TargetWorkerCount != nil { - objectMap["targetWorkerCount"] = asppr.TargetWorkerCount - } - if asppr.TargetWorkerSizeID != nil { - objectMap["targetWorkerSizeId"] = asppr.TargetWorkerSizeID - } - if asppr.KubeEnvironmentProfile != nil { - objectMap["kubeEnvironmentProfile"] = asppr.KubeEnvironmentProfile - } - if asppr.ZoneRedundant != nil { - objectMap["zoneRedundant"] = asppr.ZoneRedundant - } - return json.Marshal(objectMap) -} - -// AppServicePlanProperties appServicePlan resource specific properties -type AppServicePlanProperties struct { - // WorkerTierName - Target worker tier assigned to the App Service plan. - WorkerTierName *string `json:"workerTierName,omitempty"` - // Status - READ-ONLY; App Service plan status. Possible values include: 'StatusOptionsReady', 'StatusOptionsPending', 'StatusOptionsCreating' - Status StatusOptions `json:"status,omitempty"` - // Subscription - READ-ONLY; App Service plan subscription. - Subscription *string `json:"subscription,omitempty"` - // HostingEnvironmentProfile - Specification for the App Service Environment to use for the App Service plan. - HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` - // MaximumNumberOfWorkers - READ-ONLY; Maximum number of instances that can be assigned to this App Service plan. - MaximumNumberOfWorkers *int32 `json:"maximumNumberOfWorkers,omitempty"` - // GeoRegion - READ-ONLY; Geographical location for the App Service plan. - GeoRegion *string `json:"geoRegion,omitempty"` - // PerSiteScaling - If true, apps assigned to this App Service plan can be scaled independently. - // If false, apps assigned to this App Service plan will scale to all instances of the plan. - PerSiteScaling *bool `json:"perSiteScaling,omitempty"` - // ElasticScaleEnabled - ServerFarm supports ElasticScale. Apps in this plan will scale as if the ServerFarm was ElasticPremium sku - ElasticScaleEnabled *bool `json:"elasticScaleEnabled,omitempty"` - // MaximumElasticWorkerCount - Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan - MaximumElasticWorkerCount *int32 `json:"maximumElasticWorkerCount,omitempty"` - // NumberOfSites - READ-ONLY; Number of apps assigned to this App Service plan. - NumberOfSites *int32 `json:"numberOfSites,omitempty"` - // IsSpot - If true, this App Service Plan owns spot instances. - IsSpot *bool `json:"isSpot,omitempty"` - // SpotExpirationTime - The time when the server farm expires. Valid only if it is a spot server farm. - SpotExpirationTime *date.Time `json:"spotExpirationTime,omitempty"` - // FreeOfferExpirationTime - The time when the server farm free offer expires. - FreeOfferExpirationTime *date.Time `json:"freeOfferExpirationTime,omitempty"` - // ResourceGroup - READ-ONLY; Resource group of the App Service plan. - ResourceGroup *string `json:"resourceGroup,omitempty"` - // Reserved - If Linux app service plan true, false otherwise. - Reserved *bool `json:"reserved,omitempty"` - // IsXenon - Obsolete: If Hyper-V container app service plan true, false otherwise. - IsXenon *bool `json:"isXenon,omitempty"` - // HyperV - If Hyper-V container app service plan true, false otherwise. - HyperV *bool `json:"hyperV,omitempty"` - // TargetWorkerCount - Scaling worker count. - TargetWorkerCount *int32 `json:"targetWorkerCount,omitempty"` - // TargetWorkerSizeID - Scaling worker size ID. - TargetWorkerSizeID *int32 `json:"targetWorkerSizeId,omitempty"` - // ProvisioningState - READ-ONLY; Provisioning state of the App Service Plan. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // KubeEnvironmentProfile - Specification for the Kubernetes Environment to use for the App Service plan. - KubeEnvironmentProfile *KubeEnvironmentProfile `json:"kubeEnvironmentProfile,omitempty"` - // ZoneRedundant - If true, this App Service Plan will perform availability zone balancing. - // If false, this App Service Plan will not perform availability zone balancing. - ZoneRedundant *bool `json:"zoneRedundant,omitempty"` -} - -// MarshalJSON is the custom marshaler for AppServicePlanProperties. -func (asp AppServicePlanProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if asp.WorkerTierName != nil { - objectMap["workerTierName"] = asp.WorkerTierName - } - if asp.HostingEnvironmentProfile != nil { - objectMap["hostingEnvironmentProfile"] = asp.HostingEnvironmentProfile - } - if asp.PerSiteScaling != nil { - objectMap["perSiteScaling"] = asp.PerSiteScaling - } - if asp.ElasticScaleEnabled != nil { - objectMap["elasticScaleEnabled"] = asp.ElasticScaleEnabled - } - if asp.MaximumElasticWorkerCount != nil { - objectMap["maximumElasticWorkerCount"] = asp.MaximumElasticWorkerCount - } - if asp.IsSpot != nil { - objectMap["isSpot"] = asp.IsSpot - } - if asp.SpotExpirationTime != nil { - objectMap["spotExpirationTime"] = asp.SpotExpirationTime - } - if asp.FreeOfferExpirationTime != nil { - objectMap["freeOfferExpirationTime"] = asp.FreeOfferExpirationTime - } - if asp.Reserved != nil { - objectMap["reserved"] = asp.Reserved - } - if asp.IsXenon != nil { - objectMap["isXenon"] = asp.IsXenon - } - if asp.HyperV != nil { - objectMap["hyperV"] = asp.HyperV - } - if asp.TargetWorkerCount != nil { - objectMap["targetWorkerCount"] = asp.TargetWorkerCount - } - if asp.TargetWorkerSizeID != nil { - objectMap["targetWorkerSizeId"] = asp.TargetWorkerSizeID +// result is the default implementation for AppsGetProductionSiteDeploymentStatusFuture.Result. +func (future *AppsGetProductionSiteDeploymentStatusFuture) result(client AppsClient) (cds CsmDeploymentStatus, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsGetProductionSiteDeploymentStatusFuture", "Result", future.Response(), "Polling failure") + return } - if asp.KubeEnvironmentProfile != nil { - objectMap["kubeEnvironmentProfile"] = asp.KubeEnvironmentProfile + if !done { + cds.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppsGetProductionSiteDeploymentStatusFuture") + return } - if asp.ZoneRedundant != nil { - objectMap["zoneRedundant"] = asp.ZoneRedundant + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cds.Response.Response, err = future.GetResult(sender); err == nil && cds.Response.Response.StatusCode != http.StatusNoContent { + cds, err = client.GetProductionSiteDeploymentStatusResponder(cds.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsGetProductionSiteDeploymentStatusFuture", "Result", cds.Response.Response, "Failure responding to request") + } } - return json.Marshal(objectMap) + return } -// AppServicePlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// AppsGetSlotSiteDeploymentStatusSlotFuture an abstraction for monitoring and retrieving the results of a // long-running operation. -type AppServicePlansCreateOrUpdateFuture struct { +type AppsGetSlotSiteDeploymentStatusSlotFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. - Result func(AppServicePlansClient) (AppServicePlan, error) + Result func(AppsClient) (CsmDeploymentStatus, error) } // UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AppServicePlansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { +func (future *AppsGetSlotSiteDeploymentStatusSlotFuture) UnmarshalJSON(body []byte) error { var azFuture azure.Future if err := json.Unmarshal(body, &azFuture); err != nil { return err @@ -4490,24 +4894,24 @@ func (future *AppServicePlansCreateOrUpdateFuture) UnmarshalJSON(body []byte) er return nil } -// result is the default implementation for AppServicePlansCreateOrUpdateFuture.Result. -func (future *AppServicePlansCreateOrUpdateFuture) result(client AppServicePlansClient) (asp AppServicePlan, err error) { +// result is the default implementation for AppsGetSlotSiteDeploymentStatusSlotFuture.Result. +func (future *AppsGetSlotSiteDeploymentStatusSlotFuture) result(client AppsClient) (cds CsmDeploymentStatus, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServicePlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "web.AppsGetSlotSiteDeploymentStatusSlotFuture", "Result", future.Response(), "Polling failure") return } if !done { - asp.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.AppServicePlansCreateOrUpdateFuture") + cds.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.AppsGetSlotSiteDeploymentStatusSlotFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if asp.Response.Response, err = future.GetResult(sender); err == nil && asp.Response.Response.StatusCode != http.StatusNoContent { - asp, err = client.CreateOrUpdateResponder(asp.Response.Response) + if cds.Response.Response, err = future.GetResult(sender); err == nil && cds.Response.Response.StatusCode != http.StatusNoContent { + cds, err = client.GetSlotSiteDeploymentStatusSlotResponder(cds.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppServicePlansCreateOrUpdateFuture", "Result", asp.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsGetSlotSiteDeploymentStatusSlotFuture", "Result", cds.Response.Response, "Failure responding to request") } } return @@ -5312,287 +5716,26 @@ func (future *AppsSwapSlotWithProductionFuture) result(client AppsClient) (ar au return } -// AppStack web App stack. -type AppStack struct { - // Location - READ-ONLY; Web App stack location. - Location *string `json:"location,omitempty"` - // AppStackProperties - WebAppStack resource specific properties - *AppStackProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for AppStack. -func (as AppStack) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if as.AppStackProperties != nil { - objectMap["properties"] = as.AppStackProperties - } - if as.Kind != nil { - objectMap["kind"] = as.Kind - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for AppStack struct. -func (as *AppStack) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - as.Location = &location - } - case "properties": - if v != nil { - var appStackProperties AppStackProperties - err = json.Unmarshal(*v, &appStackProperties) - if err != nil { - return err - } - as.AppStackProperties = &appStackProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - as.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - as.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - as.Kind = &kind - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - as.Type = &typeVar - } - } - } - - return nil -} - -// AppStackCollection collection of Web app Stacks -type AppStackCollection struct { - autorest.Response `json:"-"` - // Value - Collection of resources. - Value *[]AppStack `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for AppStackCollection. -func (asc AppStackCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if asc.Value != nil { - objectMap["value"] = asc.Value - } - return json.Marshal(objectMap) -} - -// AppStackCollectionIterator provides access to a complete listing of AppStack values. -type AppStackCollectionIterator struct { - i int - page AppStackCollectionPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *AppStackCollectionIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppStackCollectionIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *AppStackCollectionIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter AppStackCollectionIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter AppStackCollectionIterator) Response() AppStackCollection { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter AppStackCollectionIterator) Value() AppStack { - if !iter.page.NotDone() { - return AppStack{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the AppStackCollectionIterator type. -func NewAppStackCollectionIterator(page AppStackCollectionPage) AppStackCollectionIterator { - return AppStackCollectionIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (asc AppStackCollection) IsEmpty() bool { - return asc.Value == nil || len(*asc.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (asc AppStackCollection) hasNextLink() bool { - return asc.NextLink != nil && len(*asc.NextLink) != 0 -} - -// appStackCollectionPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (asc AppStackCollection) appStackCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !asc.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(asc.NextLink))) -} - -// AppStackCollectionPage contains a page of AppStack values. -type AppStackCollectionPage struct { - fn func(context.Context, AppStackCollection) (AppStackCollection, error) - asc AppStackCollection -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *AppStackCollectionPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppStackCollectionPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.asc) - if err != nil { - return err - } - page.asc = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *AppStackCollectionPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page AppStackCollectionPage) NotDone() bool { - return !page.asc.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page AppStackCollectionPage) Response() AppStackCollection { - return page.asc -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page AppStackCollectionPage) Values() []AppStack { - if page.asc.IsEmpty() { - return nil - } - return *page.asc.Value -} - -// Creates a new instance of the AppStackCollectionPage type. -func NewAppStackCollectionPage(cur AppStackCollection, getNextPage func(context.Context, AppStackCollection) (AppStackCollection, error)) AppStackCollectionPage { - return AppStackCollectionPage{ - fn: getNextPage, - asc: cur, - } -} - -// AppStackProperties webAppStack resource specific properties -type AppStackProperties struct { - // DisplayText - READ-ONLY; Web App stack (display only). - DisplayText *string `json:"displayText,omitempty"` - // Value - READ-ONLY; Web App stack name. - Value *string `json:"value,omitempty"` - // MajorVersions - READ-ONLY; List of major versions available. - MajorVersions *[]AppMajorVersion `json:"majorVersions,omitempty"` - // PreferredOs - READ-ONLY; Web App stack preferred OS. Possible values include: 'StackPreferredOsWindows', 'StackPreferredOsLinux' - PreferredOs StackPreferredOs `json:"preferredOs,omitempty"` +// AppserviceGithubToken github access token for Appservice CLI github integration. +type AppserviceGithubToken struct { + // AccessToken - Github access token for Appservice CLI github integration + AccessToken *string `json:"accessToken,omitempty"` + // Scope - Scope of the github access token + Scope *string `json:"scope,omitempty"` + // TokenType - token type + TokenType *string `json:"tokenType,omitempty"` + // GotToken - True if valid github token received, False otherwise + GotToken *bool `json:"gotToken,omitempty"` + // ErrorMessage - Error message if unable to get token + ErrorMessage *string `json:"errorMessage,omitempty"` } -// MarshalJSON is the custom marshaler for AppStackProperties. -func (as AppStackProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) +// AppserviceGithubTokenRequest appservice Github token request content. +type AppserviceGithubTokenRequest struct { + // Code - Code string to exchange for Github Access token + Code *string `json:"code,omitempty"` + // State - State string used for verification. + State *string `json:"state,omitempty"` } // ArcConfiguration ... @@ -5732,6 +5875,12 @@ type AseV3NetworkingConfigurationProperties struct { InternalInboundIPAddresses *[]string `json:"internalInboundIpAddresses,omitempty"` // AllowNewPrivateEndpointConnections - Property to enable and disable new private endpoint connection creation on ASE AllowNewPrivateEndpointConnections *bool `json:"allowNewPrivateEndpointConnections,omitempty"` + // FtpEnabled - Property to enable and disable FTP on ASEV3 + FtpEnabled *bool `json:"ftpEnabled,omitempty"` + // RemoteDebugEnabled - Property to enable and disable Remote Debug on ASEV3 + RemoteDebugEnabled *bool `json:"remoteDebugEnabled,omitempty"` + // InboundIPAddressOverride - Customer provided Inbound IP Address. Only able to be set on Ase create. + InboundIPAddressOverride *string `json:"inboundIpAddressOverride,omitempty"` } // MarshalJSON is the custom marshaler for AseV3NetworkingConfigurationProperties. @@ -5740,6 +5889,15 @@ func (avnc AseV3NetworkingConfigurationProperties) MarshalJSON() ([]byte, error) if avnc.AllowNewPrivateEndpointConnections != nil { objectMap["allowNewPrivateEndpointConnections"] = avnc.AllowNewPrivateEndpointConnections } + if avnc.FtpEnabled != nil { + objectMap["ftpEnabled"] = avnc.FtpEnabled + } + if avnc.RemoteDebugEnabled != nil { + objectMap["remoteDebugEnabled"] = avnc.RemoteDebugEnabled + } + if avnc.InboundIPAddressOverride != nil { + objectMap["inboundIpAddressOverride"] = avnc.InboundIPAddressOverride + } return json.Marshal(objectMap) } @@ -5885,6 +6043,16 @@ type AzureBlobStorageHTTPLogsConfig struct { Enabled *bool `json:"enabled,omitempty"` } +// AzureResourceErrorInfo the azure resource error info. +type AzureResourceErrorInfo struct { + // Message - The error message. + Message *string `json:"message,omitempty"` + // Details - The error details. + Details *[]AzureResourceErrorInfo `json:"details,omitempty"` + // Code - The error code. + Code *string `json:"code,omitempty"` +} + // AzureStaticWebApps the configuration settings of the Azure Static Web Apps provider. type AzureStaticWebApps struct { // Enabled - false if the Azure Static Web Apps provider should not be enabled despite the set registration; otherwise, true. @@ -7006,92 +7174,6 @@ func (cd CertificateDetails) MarshalJSON() ([]byte, error) { // CertificateEmail SSL certificate email. type CertificateEmail struct { - // CertificateEmailProperties - CertificateEmail resource specific properties - *CertificateEmailProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for CertificateEmail. -func (ce CertificateEmail) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ce.CertificateEmailProperties != nil { - objectMap["properties"] = ce.CertificateEmailProperties - } - if ce.Kind != nil { - objectMap["kind"] = ce.Kind - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for CertificateEmail struct. -func (ce *CertificateEmail) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var certificateEmailProperties CertificateEmailProperties - err = json.Unmarshal(*v, &certificateEmailProperties) - if err != nil { - return err - } - ce.CertificateEmailProperties = &certificateEmailProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ce.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ce.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - ce.Kind = &kind - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ce.Type = &typeVar - } - } - } - - return nil -} - -// CertificateEmailProperties certificateEmail resource specific properties -type CertificateEmailProperties struct { // EmailID - Email id. EmailID *string `json:"emailId,omitempty"` // TimeStamp - Time stamp. @@ -7100,100 +7182,14 @@ type CertificateEmailProperties struct { // CertificateOrderAction certificate order action. type CertificateOrderAction struct { - // CertificateOrderActionProperties - CertificateOrderAction resource specific properties - *CertificateOrderActionProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for CertificateOrderAction. -func (coa CertificateOrderAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if coa.CertificateOrderActionProperties != nil { - objectMap["properties"] = coa.CertificateOrderActionProperties - } - if coa.Kind != nil { - objectMap["kind"] = coa.Kind - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for CertificateOrderAction struct. -func (coa *CertificateOrderAction) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var certificateOrderActionProperties CertificateOrderActionProperties - err = json.Unmarshal(*v, &certificateOrderActionProperties) - if err != nil { - return err - } - coa.CertificateOrderActionProperties = &certificateOrderActionProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - coa.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - coa.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - coa.Kind = &kind - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - coa.Type = &typeVar - } - } - } - - return nil -} - -// CertificateOrderActionProperties certificateOrderAction resource specific properties -type CertificateOrderActionProperties struct { // ActionType - READ-ONLY; Action type. Possible values include: 'CertificateOrderActionTypeCertificateIssued', 'CertificateOrderActionTypeCertificateOrderCanceled', 'CertificateOrderActionTypeCertificateOrderCreated', 'CertificateOrderActionTypeCertificateRevoked', 'CertificateOrderActionTypeDomainValidationComplete', 'CertificateOrderActionTypeFraudDetected', 'CertificateOrderActionTypeOrgNameChange', 'CertificateOrderActionTypeOrgValidationComplete', 'CertificateOrderActionTypeSanDrop', 'CertificateOrderActionTypeFraudCleared', 'CertificateOrderActionTypeCertificateExpired', 'CertificateOrderActionTypeCertificateExpirationWarning', 'CertificateOrderActionTypeFraudDocumentationRequired', 'CertificateOrderActionTypeUnknown' ActionType CertificateOrderActionType `json:"actionType,omitempty"` // CreatedAt - READ-ONLY; Time at which the certificate action was performed. CreatedAt *date.Time `json:"createdAt,omitempty"` } -// MarshalJSON is the custom marshaler for CertificateOrderActionProperties. -func (coa CertificateOrderActionProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for CertificateOrderAction. +func (coa CertificateOrderAction) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) return json.Marshal(objectMap) } @@ -7537,6 +7533,24 @@ type Configuration struct { Registries *[]RegistryCredentials `json:"registries,omitempty"` } +// ConnStringInfo database connection string information. +type ConnStringInfo struct { + // Name - Name of connection string. + Name *string `json:"name,omitempty"` + // ConnectionString - Connection string value. + ConnectionString *string `json:"connectionString,omitempty"` + // Type - Type of database. Possible values include: 'ConnectionStringTypeMySQL', 'ConnectionStringTypeSQLServer', 'ConnectionStringTypeSQLAzure', 'ConnectionStringTypeCustom', 'ConnectionStringTypeNotificationHub', 'ConnectionStringTypeServiceBus', 'ConnectionStringTypeEventHub', 'ConnectionStringTypeAPIHub', 'ConnectionStringTypeDocDb', 'ConnectionStringTypeRedisCache', 'ConnectionStringTypePostgreSQL' + Type ConnectionStringType `json:"type,omitempty"` +} + +// ConnStringValueTypePair database connection string value to type pair. +type ConnStringValueTypePair struct { + // Value - Value of pair. + Value *string `json:"value,omitempty"` + // Type - Type of database. Possible values include: 'ConnectionStringTypeMySQL', 'ConnectionStringTypeSQLServer', 'ConnectionStringTypeSQLAzure', 'ConnectionStringTypeCustom', 'ConnectionStringTypeNotificationHub', 'ConnectionStringTypeServiceBus', 'ConnectionStringTypeEventHub', 'ConnectionStringTypeAPIHub', 'ConnectionStringTypeDocDb', 'ConnectionStringTypeRedisCache', 'ConnectionStringTypePostgreSQL' + Type ConnectionStringType `json:"type,omitempty"` +} + // ConnectionStringDictionary string dictionary resource. type ConnectionStringDictionary struct { autorest.Response `json:"-"` @@ -7564,24 +7578,6 @@ func (csd ConnectionStringDictionary) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// ConnStringInfo database connection string information. -type ConnStringInfo struct { - // Name - Name of connection string. - Name *string `json:"name,omitempty"` - // ConnectionString - Connection string value. - ConnectionString *string `json:"connectionString,omitempty"` - // Type - Type of database. Possible values include: 'ConnectionStringTypeMySQL', 'ConnectionStringTypeSQLServer', 'ConnectionStringTypeSQLAzure', 'ConnectionStringTypeCustom', 'ConnectionStringTypeNotificationHub', 'ConnectionStringTypeServiceBus', 'ConnectionStringTypeEventHub', 'ConnectionStringTypeAPIHub', 'ConnectionStringTypeDocDb', 'ConnectionStringTypeRedisCache', 'ConnectionStringTypePostgreSQL' - Type ConnectionStringType `json:"type,omitempty"` -} - -// ConnStringValueTypePair database connection string value to type pair. -type ConnStringValueTypePair struct { - // Value - Value of pair. - Value *string `json:"value,omitempty"` - // Type - Type of database. Possible values include: 'ConnectionStringTypeMySQL', 'ConnectionStringTypeSQLServer', 'ConnectionStringTypeSQLAzure', 'ConnectionStringTypeCustom', 'ConnectionStringTypeNotificationHub', 'ConnectionStringTypeServiceBus', 'ConnectionStringTypeEventHub', 'ConnectionStringTypeAPIHub', 'ConnectionStringTypeDocDb', 'ConnectionStringTypeRedisCache', 'ConnectionStringTypePostgreSQL' - Type ConnectionStringType `json:"type,omitempty"` -} - // Contact contact information for domain registration. If 'Domain Privacy' option is not selected then the // contact information is made publicly available through the Whois // directories as per ICANN requirements. @@ -7936,6 +7932,20 @@ func (ca ContainerAppProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// ContainerAppSecret container App Secret. +type ContainerAppSecret struct { + // Name - READ-ONLY; Secret Name. + Name *string `json:"name,omitempty"` + // Value - READ-ONLY; Secret Value. + Value *string `json:"value,omitempty"` +} + +// MarshalJSON is the custom marshaler for ContainerAppSecret. +func (cas ContainerAppSecret) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // ContainerAppsConfiguration ... type ContainerAppsConfiguration struct { // DaprAIInstrumentationKey - Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry @@ -8032,20 +8042,6 @@ func (future *ContainerAppsDeleteFuture) result(client ContainerAppsClient) (ar return } -// ContainerAppSecret container App Secret. -type ContainerAppSecret struct { - // Name - READ-ONLY; Secret Name. - Name *string `json:"name,omitempty"` - // Value - READ-ONLY; Secret Value. - Value *string `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for ContainerAppSecret. -func (cas ContainerAppSecret) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - // ContainerCPUStatistics ... type ContainerCPUStatistics struct { CPUUsage *ContainerCPUUsage `json:"cpuUsage,omitempty"` @@ -8108,6 +8104,37 @@ type ContainerThrottlingData struct { ThrottledTime *int32 `json:"throttledTime,omitempty"` } +// ContentHash the content hash. +type ContentHash struct { + // Algorithm - The algorithm of the content hash. + Algorithm *string `json:"algorithm,omitempty"` + // Value - The value of the content hash. + Value *string `json:"value,omitempty"` +} + +// ContentLink the content link. +type ContentLink struct { + // URI - The content link URI. + URI *string `json:"uri,omitempty"` + // ContentVersion - READ-ONLY; The content version. + ContentVersion *string `json:"contentVersion,omitempty"` + // ContentSize - READ-ONLY; The content size. + ContentSize *int64 `json:"contentSize,omitempty"` + // ContentHash - READ-ONLY; The content hash. + ContentHash *ContentHash `json:"contentHash,omitempty"` + // Metadata - READ-ONLY; The metadata. + Metadata interface{} `json:"metadata,omitempty"` +} + +// MarshalJSON is the custom marshaler for ContentLink. +func (cl ContentLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cl.URI != nil { + objectMap["uri"] = cl.URI + } + return json.Marshal(objectMap) +} + // ContinuousWebJob continuous Web Job Information. type ContinuousWebJob struct { autorest.Response `json:"-"` @@ -8431,6 +8458,12 @@ type CookieExpiration struct { TimeToExpiration *string `json:"timeToExpiration,omitempty"` } +// Correlation the correlation property. +type Correlation struct { + // ClientTrackingID - The client tracking id. + ClientTrackingID *string `json:"clientTrackingId,omitempty"` +} + // CorsSettings cross-Origin Resource Sharing (CORS) settings for the app. type CorsSettings struct { // AllowedOrigins - Gets or sets the list of origins that should be allowed to make cross-origin @@ -8442,42 +8475,316 @@ type CorsSettings struct { SupportCredentials *bool `json:"supportCredentials,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 { - TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` - Resources *[]string `json:"resources,omitempty"` +// CsmDeploymentStatus deployment status response payload. +type CsmDeploymentStatus struct { + autorest.Response `json:"-"` + // CsmDeploymentStatusProperties - CsmDeploymentStatus resource specific properties + *CsmDeploymentStatusProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` } -// CsmOperationCollection collection of Azure resource manager operation metadata. -type CsmOperationCollection struct { +// MarshalJSON is the custom marshaler for CsmDeploymentStatus. +func (cds CsmDeploymentStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cds.CsmDeploymentStatusProperties != nil { + objectMap["properties"] = cds.CsmDeploymentStatusProperties + } + if cds.Kind != nil { + objectMap["kind"] = cds.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CsmDeploymentStatus struct. +func (cds *CsmDeploymentStatus) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var csmDeploymentStatusProperties CsmDeploymentStatusProperties + err = json.Unmarshal(*v, &csmDeploymentStatusProperties) + if err != nil { + return err + } + cds.CsmDeploymentStatusProperties = &csmDeploymentStatusProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + cds.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cds.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + cds.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cds.Type = &typeVar + } + } + } + + return nil +} + +// CsmDeploymentStatusCollection deployment status collection ARM resource. +type CsmDeploymentStatusCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]CsmOperationDescription `json:"value,omitempty"` + Value *[]CsmDeploymentStatus `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for CsmOperationCollection. -func (coc CsmOperationCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for CsmDeploymentStatusCollection. +func (cdsc CsmDeploymentStatusCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if coc.Value != nil { - objectMap["value"] = coc.Value + if cdsc.Value != nil { + objectMap["value"] = cdsc.Value } return json.Marshal(objectMap) } -// CsmOperationCollectionIterator provides access to a complete listing of CsmOperationDescription values. -type CsmOperationCollectionIterator struct { +// CsmDeploymentStatusCollectionIterator provides access to a complete listing of CsmDeploymentStatus +// values. +type CsmDeploymentStatusCollectionIterator struct { i int - page CsmOperationCollectionPage + page CsmDeploymentStatusCollectionPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *CsmOperationCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *CsmDeploymentStatusCollectionIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/CsmOperationCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/CsmDeploymentStatusCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *CsmDeploymentStatusCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter CsmDeploymentStatusCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter CsmDeploymentStatusCollectionIterator) Response() CsmDeploymentStatusCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter CsmDeploymentStatusCollectionIterator) Value() CsmDeploymentStatus { + if !iter.page.NotDone() { + return CsmDeploymentStatus{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the CsmDeploymentStatusCollectionIterator type. +func NewCsmDeploymentStatusCollectionIterator(page CsmDeploymentStatusCollectionPage) CsmDeploymentStatusCollectionIterator { + return CsmDeploymentStatusCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (cdsc CsmDeploymentStatusCollection) IsEmpty() bool { + return cdsc.Value == nil || len(*cdsc.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (cdsc CsmDeploymentStatusCollection) hasNextLink() bool { + return cdsc.NextLink != nil && len(*cdsc.NextLink) != 0 +} + +// csmDeploymentStatusCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (cdsc CsmDeploymentStatusCollection) csmDeploymentStatusCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !cdsc.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(cdsc.NextLink))) +} + +// CsmDeploymentStatusCollectionPage contains a page of CsmDeploymentStatus values. +type CsmDeploymentStatusCollectionPage struct { + fn func(context.Context, CsmDeploymentStatusCollection) (CsmDeploymentStatusCollection, error) + cdsc CsmDeploymentStatusCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *CsmDeploymentStatusCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CsmDeploymentStatusCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.cdsc) + if err != nil { + return err + } + page.cdsc = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *CsmDeploymentStatusCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page CsmDeploymentStatusCollectionPage) NotDone() bool { + return !page.cdsc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page CsmDeploymentStatusCollectionPage) Response() CsmDeploymentStatusCollection { + return page.cdsc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page CsmDeploymentStatusCollectionPage) Values() []CsmDeploymentStatus { + if page.cdsc.IsEmpty() { + return nil + } + return *page.cdsc.Value +} + +// Creates a new instance of the CsmDeploymentStatusCollectionPage type. +func NewCsmDeploymentStatusCollectionPage(cur CsmDeploymentStatusCollection, getNextPage func(context.Context, CsmDeploymentStatusCollection) (CsmDeploymentStatusCollection, error)) CsmDeploymentStatusCollectionPage { + return CsmDeploymentStatusCollectionPage{ + fn: getNextPage, + cdsc: cur, + } +} + +// CsmDeploymentStatusProperties csmDeploymentStatus resource specific properties +type CsmDeploymentStatusProperties struct { + // DeploymentID - Deployment operation id. + DeploymentID *string `json:"deploymentId,omitempty"` + // Status - Deployment build status. Possible values include: 'DeploymentBuildStatusTimedOut', 'DeploymentBuildStatusRuntimeFailed', 'DeploymentBuildStatusBuildAborted', 'DeploymentBuildStatusBuildFailed', 'DeploymentBuildStatusBuildRequestReceived', 'DeploymentBuildStatusBuildPending', 'DeploymentBuildStatusBuildInProgress', 'DeploymentBuildStatusBuildSuccessful', 'DeploymentBuildStatusPostBuildRestartRequired', 'DeploymentBuildStatusStartPolling', 'DeploymentBuildStatusStartPollingWithRestart', 'DeploymentBuildStatusRuntimeStarting', 'DeploymentBuildStatusRuntimeSuccessful' + Status DeploymentBuildStatus `json:"status,omitempty"` + // NumberOfInstancesInProgress - Number of site instances currently being provisioned. + NumberOfInstancesInProgress *int32 `json:"numberOfInstancesInProgress,omitempty"` + // NumberOfInstancesSuccessful - Number of site instances provisioned successfully. + NumberOfInstancesSuccessful *int32 `json:"numberOfInstancesSuccessful,omitempty"` + // NumberOfInstancesFailed - Number of site instances failed to provision. + NumberOfInstancesFailed *int32 `json:"numberOfInstancesFailed,omitempty"` + // FailedInstancesLogs - List of URLs pointing to logs for instances which failed to provision. + FailedInstancesLogs *[]string `json:"failedInstancesLogs,omitempty"` + // Errors - List of errors. + Errors *[]ErrorEntity `json:"errors,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 { + TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` + Resources *[]string `json:"resources,omitempty"` +} + +// CsmOperationCollection collection of Azure resource manager operation metadata. +type CsmOperationCollection struct { + autorest.Response `json:"-"` + // Value - Collection of resources. + Value *[]CsmOperationDescription `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for CsmOperationCollection. +func (coc CsmOperationCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if coc.Value != nil { + objectMap["value"] = coc.Value + } + return json.Marshal(objectMap) +} + +// CsmOperationCollectionIterator provides access to a complete listing of CsmOperationDescription values. +type CsmOperationCollectionIterator struct { + i int + page CsmOperationCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *CsmOperationCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CsmOperationCollectionIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -8934,6 +9241,122 @@ func NewCsmUsageQuotaCollectionPage(cur CsmUsageQuotaCollection, getNextPage fun } } +// CustomDNSSuffixConfiguration full view of the custom domain suffix configuration for ASEv3. +type CustomDNSSuffixConfiguration struct { + autorest.Response `json:"-"` + // CustomDNSSuffixConfigurationProperties - CustomDnsSuffixConfiguration resource specific properties + *CustomDNSSuffixConfigurationProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for CustomDNSSuffixConfiguration. +func (cdsc CustomDNSSuffixConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cdsc.CustomDNSSuffixConfigurationProperties != nil { + objectMap["properties"] = cdsc.CustomDNSSuffixConfigurationProperties + } + if cdsc.Kind != nil { + objectMap["kind"] = cdsc.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CustomDNSSuffixConfiguration struct. +func (cdsc *CustomDNSSuffixConfiguration) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var customDNSSuffixConfigurationProperties CustomDNSSuffixConfigurationProperties + err = json.Unmarshal(*v, &customDNSSuffixConfigurationProperties) + if err != nil { + return err + } + cdsc.CustomDNSSuffixConfigurationProperties = &customDNSSuffixConfigurationProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + cdsc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cdsc.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + cdsc.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cdsc.Type = &typeVar + } + } + } + + return nil +} + +// CustomDNSSuffixConfigurationProperties customDnsSuffixConfiguration resource specific properties +type CustomDNSSuffixConfigurationProperties struct { + // ProvisioningState - READ-ONLY; Possible values include: 'CustomDNSSuffixProvisioningStateSucceeded', 'CustomDNSSuffixProvisioningStateFailed', 'CustomDNSSuffixProvisioningStateDegraded', 'CustomDNSSuffixProvisioningStateInProgress' + ProvisioningState CustomDNSSuffixProvisioningState `json:"provisioningState,omitempty"` + // ProvisioningDetails - READ-ONLY + ProvisioningDetails *string `json:"provisioningDetails,omitempty"` + // DNSSuffix - The default custom domain suffix to use for all sites deployed on the ASE. + DNSSuffix *string `json:"dnsSuffix,omitempty"` + // CertificateURL - 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"` + // KeyVaultReferenceIdentity - 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"` +} + +// MarshalJSON is the custom marshaler for CustomDNSSuffixConfigurationProperties. +func (cdsc CustomDNSSuffixConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cdsc.DNSSuffix != nil { + objectMap["dnsSuffix"] = cdsc.DNSSuffix + } + if cdsc.CertificateURL != nil { + objectMap["certificateUrl"] = cdsc.CertificateURL + } + if cdsc.KeyVaultReferenceIdentity != nil { + objectMap["keyVaultReferenceIdentity"] = cdsc.KeyVaultReferenceIdentity + } + return json.Marshal(objectMap) +} + // CustomHostnameAnalysisResult custom domain analysis. type CustomHostnameAnalysisResult struct { autorest.Response `json:"-"` @@ -9400,18 +9823,6 @@ type DaprMetadata struct { SecretRef *string `json:"secretRef,omitempty"` } -// DatabaseBackupSetting database backup settings. -type DatabaseBackupSetting struct { - // DatabaseType - Database type (e.g. SqlAzure / MySql). Possible values include: 'DatabaseTypeSQLAzure', 'DatabaseTypeMySQL', 'DatabaseTypeLocalMySQL', 'DatabaseTypePostgreSQL' - DatabaseType DatabaseType `json:"databaseType,omitempty"` - Name *string `json:"name,omitempty"` - // ConnectionStringName - Contains a connection string name that is linked to the SiteConfig.ConnectionStrings. - // This is used during restore with overwrite connection strings options. - ConnectionStringName *string `json:"connectionStringName,omitempty"` - // ConnectionString - Contains a connection string to a database which is being backed up or restored. If the restore should happen to a new database, the database name inside is the new one. - ConnectionString *string `json:"connectionString,omitempty"` -} - // DataProviderMetadata additional configuration for a data providers type DataProviderMetadata struct { ProviderName *string `json:"providerName,omitempty"` @@ -9456,170 +9867,23 @@ type DataTableResponseObject struct { Rows *[][]string `json:"rows,omitempty"` } -// DefaultAuthorizationPolicy the configuration settings of the Azure Active Directory default -// authorization policy. -type DefaultAuthorizationPolicy struct { - // AllowedPrincipals - The configuration settings of the Azure Active Directory allowed principals. - AllowedPrincipals *AllowedPrincipals `json:"allowedPrincipals,omitempty"` - // AllowedApplications - The configuration settings of the Azure Active Directory allowed applications. - AllowedApplications *[]string `json:"allowedApplications,omitempty"` -} - -// DefaultErrorResponse app Service error response. -type DefaultErrorResponse struct { - // Error - READ-ONLY; Error model. - Error *DefaultErrorResponseError `json:"error,omitempty"` -} - -// MarshalJSON is the custom marshaler for DefaultErrorResponse. -func (der DefaultErrorResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// DefaultErrorResponseError error model. -type DefaultErrorResponseError struct { - // Code - READ-ONLY; Standardized string to programmatically identify the error. - Code *string `json:"code,omitempty"` - // Message - READ-ONLY; Detailed error description and debugging information. - Message *string `json:"message,omitempty"` - // Target - READ-ONLY; Detailed error description and debugging information. - Target *string `json:"target,omitempty"` - Details *[]DefaultErrorResponseErrorDetailsItem `json:"details,omitempty"` - // Innererror - READ-ONLY; More information to debug error. - Innererror *string `json:"innererror,omitempty"` -} - -// MarshalJSON is the custom marshaler for DefaultErrorResponseError. -func (der DefaultErrorResponseError) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if der.Details != nil { - objectMap["details"] = der.Details - } - return json.Marshal(objectMap) -} - -// DefaultErrorResponseErrorDetailsItem detailed errors. -type DefaultErrorResponseErrorDetailsItem struct { - // Code - READ-ONLY; Standardized string to programmatically identify the error. - Code *string `json:"code,omitempty"` - // Message - READ-ONLY; Detailed error description and debugging information. - Message *string `json:"message,omitempty"` - // Target - READ-ONLY; Detailed error description and debugging information. - Target *string `json:"target,omitempty"` -} - -// MarshalJSON is the custom marshaler for DefaultErrorResponseErrorDetailsItem. -func (derI DefaultErrorResponseErrorDetailsItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// DeletedAppRestoreRequest details about restoring a deleted app. -type DeletedAppRestoreRequest struct { - // DeletedAppRestoreRequestProperties - DeletedAppRestoreRequest resource specific properties - *DeletedAppRestoreRequestProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for DeletedAppRestoreRequest. -func (darr DeletedAppRestoreRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if darr.DeletedAppRestoreRequestProperties != nil { - objectMap["properties"] = darr.DeletedAppRestoreRequestProperties - } - if darr.Kind != nil { - objectMap["kind"] = darr.Kind - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DeletedAppRestoreRequest struct. -func (darr *DeletedAppRestoreRequest) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var deletedAppRestoreRequestProperties DeletedAppRestoreRequestProperties - err = json.Unmarshal(*v, &deletedAppRestoreRequestProperties) - if err != nil { - return err - } - darr.DeletedAppRestoreRequestProperties = &deletedAppRestoreRequestProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - darr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - darr.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - darr.Kind = &kind - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - darr.Type = &typeVar - } - } - } - - return nil -} - -// DeletedAppRestoreRequestProperties deletedAppRestoreRequest resource specific properties -type DeletedAppRestoreRequestProperties struct { - // DeletedSiteID - ARM resource ID of the deleted app. Example: - // /subscriptions/{subId}/providers/Microsoft.Web/deletedSites/{deletedSiteId} - DeletedSiteID *string `json:"deletedSiteId,omitempty"` - // RecoverConfiguration - If true, deleted site configuration, in addition to content, will be restored. - RecoverConfiguration *bool `json:"recoverConfiguration,omitempty"` - // SnapshotTime - Point in time to restore the deleted app from, formatted as a DateTime string. - // If unspecified, default value is the time that the app was deleted. - SnapshotTime *string `json:"snapshotTime,omitempty"` - // UseDRSecondary - If true, the snapshot is retrieved from DRSecondary endpoint. - UseDRSecondary *bool `json:"useDRSecondary,omitempty"` +// DatabaseBackupSetting database backup settings. +type DatabaseBackupSetting struct { + // DatabaseType - Database type (e.g. SqlAzure / MySql). Possible values include: 'DatabaseTypeSQLAzure', 'DatabaseTypeMySQL', 'DatabaseTypeLocalMySQL', 'DatabaseTypePostgreSQL' + DatabaseType DatabaseType `json:"databaseType,omitempty"` + Name *string `json:"name,omitempty"` + // ConnectionStringName - Contains a connection string name that is linked to the SiteConfig.ConnectionStrings. + // This is used during restore with overwrite connection strings options. + ConnectionStringName *string `json:"connectionStringName,omitempty"` + // ConnectionString - Contains a connection string to a database which is being backed up or restored. If the restore should happen to a new database, the database name inside is the new one. + ConnectionString *string `json:"connectionString,omitempty"` } -// DeletedSite a deleted app. -type DeletedSite struct { +// DatabaseConnection static Site Database Connection resource. +type DatabaseConnection struct { autorest.Response `json:"-"` - // DeletedSiteProperties - DeletedSite resource specific properties - *DeletedSiteProperties `json:"properties,omitempty"` + // DatabaseConnectionProperties - DatabaseConnection resource specific properties + *DatabaseConnectionProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -9630,20 +9894,20 @@ type DeletedSite struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for DeletedSite. -func (ds DeletedSite) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for DatabaseConnection. +func (dc DatabaseConnection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ds.DeletedSiteProperties != nil { - objectMap["properties"] = ds.DeletedSiteProperties + if dc.DatabaseConnectionProperties != nil { + objectMap["properties"] = dc.DatabaseConnectionProperties } - if ds.Kind != nil { - objectMap["kind"] = ds.Kind + if dc.Kind != nil { + objectMap["kind"] = dc.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for DeletedSite struct. -func (ds *DeletedSite) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for DatabaseConnection struct. +func (dc *DatabaseConnection) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -9653,12 +9917,12 @@ func (ds *DeletedSite) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var deletedSiteProperties DeletedSiteProperties - err = json.Unmarshal(*v, &deletedSiteProperties) + var databaseConnectionProperties DatabaseConnectionProperties + err = json.Unmarshal(*v, &databaseConnectionProperties) if err != nil { return err } - ds.DeletedSiteProperties = &deletedSiteProperties + dc.DatabaseConnectionProperties = &databaseConnectionProperties } case "id": if v != nil { @@ -9667,7 +9931,7 @@ func (ds *DeletedSite) UnmarshalJSON(body []byte) error { if err != nil { return err } - ds.ID = &ID + dc.ID = &ID } case "name": if v != nil { @@ -9676,7 +9940,7 @@ func (ds *DeletedSite) UnmarshalJSON(body []byte) error { if err != nil { return err } - ds.Name = &name + dc.Name = &name } case "kind": if v != nil { @@ -9685,7 +9949,7 @@ func (ds *DeletedSite) UnmarshalJSON(body []byte) error { if err != nil { return err } - ds.Kind = &kind + dc.Kind = &kind } case "type": if v != nil { @@ -9694,7 +9958,7 @@ func (ds *DeletedSite) UnmarshalJSON(body []byte) error { if err != nil { return err } - ds.Type = &typeVar + dc.Type = &typeVar } } } @@ -9702,61 +9966,578 @@ func (ds *DeletedSite) UnmarshalJSON(body []byte) error { return nil } -// DeletedSiteProperties deletedSite resource specific properties -type DeletedSiteProperties struct { - // DeletedSiteID - READ-ONLY; Numeric id for the deleted site - DeletedSiteID *int32 `json:"deletedSiteId,omitempty"` - // DeletedTimestamp - READ-ONLY; Time in UTC when the app was deleted. - DeletedTimestamp *string `json:"deletedTimestamp,omitempty"` - // Subscription - READ-ONLY; Subscription containing the deleted site - Subscription *string `json:"subscription,omitempty"` - // ResourceGroup - READ-ONLY; ResourceGroup that contained the deleted site - ResourceGroup *string `json:"resourceGroup,omitempty"` - // DeletedSiteName - READ-ONLY; Name of the deleted site - DeletedSiteName *string `json:"deletedSiteName,omitempty"` - // Slot - READ-ONLY; Slot of the deleted site - Slot *string `json:"slot,omitempty"` - // Kind - READ-ONLY; Kind of site that was deleted - Kind *string `json:"kind,omitempty"` - // GeoRegionName - READ-ONLY; Geo Region of the deleted site - GeoRegionName *string `json:"geoRegionName,omitempty"` -} - -// MarshalJSON is the custom marshaler for DeletedSiteProperties. -func (ds DeletedSiteProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// DeletedWebAppCollection collection of deleted apps. -type DeletedWebAppCollection struct { +// DatabaseConnectionCollection collection of static site database connections. +type DatabaseConnectionCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]DeletedSite `json:"value,omitempty"` + Value *[]DatabaseConnection `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for DeletedWebAppCollection. -func (dwac DeletedWebAppCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for DatabaseConnectionCollection. +func (dcc DatabaseConnectionCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if dwac.Value != nil { - objectMap["value"] = dwac.Value + if dcc.Value != nil { + objectMap["value"] = dcc.Value } return json.Marshal(objectMap) } -// DeletedWebAppCollectionIterator provides access to a complete listing of DeletedSite values. -type DeletedWebAppCollectionIterator struct { +// DatabaseConnectionCollectionIterator provides access to a complete listing of DatabaseConnection values. +type DatabaseConnectionCollectionIterator struct { i int - page DeletedWebAppCollectionPage + page DatabaseConnectionCollectionPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *DeletedWebAppCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *DatabaseConnectionCollectionIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DeletedWebAppCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseConnectionCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *DatabaseConnectionCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter DatabaseConnectionCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter DatabaseConnectionCollectionIterator) Response() DatabaseConnectionCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter DatabaseConnectionCollectionIterator) Value() DatabaseConnection { + if !iter.page.NotDone() { + return DatabaseConnection{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the DatabaseConnectionCollectionIterator type. +func NewDatabaseConnectionCollectionIterator(page DatabaseConnectionCollectionPage) DatabaseConnectionCollectionIterator { + return DatabaseConnectionCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (dcc DatabaseConnectionCollection) IsEmpty() bool { + return dcc.Value == nil || len(*dcc.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (dcc DatabaseConnectionCollection) hasNextLink() bool { + return dcc.NextLink != nil && len(*dcc.NextLink) != 0 +} + +// databaseConnectionCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (dcc DatabaseConnectionCollection) databaseConnectionCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !dcc.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(dcc.NextLink))) +} + +// DatabaseConnectionCollectionPage contains a page of DatabaseConnection values. +type DatabaseConnectionCollectionPage struct { + fn func(context.Context, DatabaseConnectionCollection) (DatabaseConnectionCollection, error) + dcc DatabaseConnectionCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *DatabaseConnectionCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseConnectionCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.dcc) + if err != nil { + return err + } + page.dcc = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *DatabaseConnectionCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page DatabaseConnectionCollectionPage) NotDone() bool { + return !page.dcc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page DatabaseConnectionCollectionPage) Response() DatabaseConnectionCollection { + return page.dcc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page DatabaseConnectionCollectionPage) Values() []DatabaseConnection { + if page.dcc.IsEmpty() { + return nil + } + return *page.dcc.Value +} + +// Creates a new instance of the DatabaseConnectionCollectionPage type. +func NewDatabaseConnectionCollectionPage(cur DatabaseConnectionCollection, getNextPage func(context.Context, DatabaseConnectionCollection) (DatabaseConnectionCollection, error)) DatabaseConnectionCollectionPage { + return DatabaseConnectionCollectionPage{ + fn: getNextPage, + dcc: cur, + } +} + +// DatabaseConnectionOverview static Site Database Connection overview. +type DatabaseConnectionOverview struct { + // ResourceID - READ-ONLY; The resource id of the database. + ResourceID *string `json:"resourceId,omitempty"` + // ConnectionIdentity - READ-ONLY; If present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned managed identity is indicated with the string 'SystemAssigned', while use of a user-assigned managed identity is indicated with the resource id of the managed identity resource. + ConnectionIdentity *string `json:"connectionIdentity,omitempty"` + // Region - READ-ONLY; The region of the database resource. + Region *string `json:"region,omitempty"` + // ConfigurationFiles - READ-ONLY; A list of configuration files associated with this database connection. + ConfigurationFiles *[]StaticSiteDatabaseConnectionConfigurationFileOverview `json:"configurationFiles,omitempty"` + // Name - READ-ONLY; If present, the name of this database connection resource. + Name *string `json:"name,omitempty"` +} + +// MarshalJSON is the custom marshaler for DatabaseConnectionOverview. +func (dco DatabaseConnectionOverview) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// DatabaseConnectionPatchRequest static Site Database Connection Request Properties resource when patching +type DatabaseConnectionPatchRequest struct { + // DatabaseConnectionPatchRequestProperties - DatabaseConnectionPatchRequest resource specific properties + *DatabaseConnectionPatchRequestProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for DatabaseConnectionPatchRequest. +func (dcpr DatabaseConnectionPatchRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dcpr.DatabaseConnectionPatchRequestProperties != nil { + objectMap["properties"] = dcpr.DatabaseConnectionPatchRequestProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DatabaseConnectionPatchRequest struct. +func (dcpr *DatabaseConnectionPatchRequest) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var databaseConnectionPatchRequestProperties DatabaseConnectionPatchRequestProperties + err = json.Unmarshal(*v, &databaseConnectionPatchRequestProperties) + if err != nil { + return err + } + dcpr.DatabaseConnectionPatchRequestProperties = &databaseConnectionPatchRequestProperties + } + } + } + + return nil +} + +// DatabaseConnectionPatchRequestProperties databaseConnectionPatchRequest resource specific properties +type DatabaseConnectionPatchRequestProperties struct { + // ResourceID - The resource id of the database. + ResourceID *string `json:"resourceId,omitempty"` + // ConnectionIdentity - If present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned managed identity is indicated with the string 'SystemAssigned', while use of a user-assigned managed identity is indicated with the resource id of the managed identity resource. + ConnectionIdentity *string `json:"connectionIdentity,omitempty"` + // ConnectionString - The connection string to use to connect to the database. + ConnectionString *string `json:"connectionString,omitempty"` + // Region - The region of the database resource. + Region *string `json:"region,omitempty"` +} + +// DatabaseConnectionProperties databaseConnection resource specific properties +type DatabaseConnectionProperties struct { + // ResourceID - The resource id of the database. + ResourceID *string `json:"resourceId,omitempty"` + // ConnectionIdentity - If present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned managed identity is indicated with the string 'SystemAssigned', while use of a user-assigned managed identity is indicated with the resource id of the managed identity resource. + ConnectionIdentity *string `json:"connectionIdentity,omitempty"` + // ConnectionString - The connection string to use to connect to the database. + ConnectionString *string `json:"connectionString,omitempty"` + // Region - The region of the database resource. + Region *string `json:"region,omitempty"` + // ConfigurationFiles - READ-ONLY; A list of configuration files associated with this database connection. + ConfigurationFiles *[]StaticSiteDatabaseConnectionConfigurationFileOverview `json:"configurationFiles,omitempty"` +} + +// MarshalJSON is the custom marshaler for DatabaseConnectionProperties. +func (dc DatabaseConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dc.ResourceID != nil { + objectMap["resourceId"] = dc.ResourceID + } + if dc.ConnectionIdentity != nil { + objectMap["connectionIdentity"] = dc.ConnectionIdentity + } + if dc.ConnectionString != nil { + objectMap["connectionString"] = dc.ConnectionString + } + if dc.Region != nil { + objectMap["region"] = dc.Region + } + return json.Marshal(objectMap) +} + +// DefaultAuthorizationPolicy the configuration settings of the Azure Active Directory default +// authorization policy. +type DefaultAuthorizationPolicy struct { + // AllowedPrincipals - The configuration settings of the Azure Active Directory allowed principals. + AllowedPrincipals *AllowedPrincipals `json:"allowedPrincipals,omitempty"` + // AllowedApplications - The configuration settings of the Azure Active Directory allowed applications. + AllowedApplications *[]string `json:"allowedApplications,omitempty"` +} + +// DefaultErrorResponse app Service error response. +type DefaultErrorResponse struct { + // Error - READ-ONLY; Error model. + Error *DefaultErrorResponseError `json:"error,omitempty"` +} + +// MarshalJSON is the custom marshaler for DefaultErrorResponse. +func (der DefaultErrorResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// DefaultErrorResponseError error model. +type DefaultErrorResponseError struct { + // Code - READ-ONLY; Standardized string to programmatically identify the error. + Code *string `json:"code,omitempty"` + // Message - READ-ONLY; Detailed error description and debugging information. + Message *string `json:"message,omitempty"` + // Target - READ-ONLY; Detailed error description and debugging information. + Target *string `json:"target,omitempty"` + Details *[]DefaultErrorResponseErrorDetailsItem `json:"details,omitempty"` + // Innererror - READ-ONLY; More information to debug error. + Innererror *string `json:"innererror,omitempty"` +} + +// MarshalJSON is the custom marshaler for DefaultErrorResponseError. +func (der DefaultErrorResponseError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if der.Details != nil { + objectMap["details"] = der.Details + } + return json.Marshal(objectMap) +} + +// DefaultErrorResponseErrorDetailsItem detailed errors. +type DefaultErrorResponseErrorDetailsItem struct { + // Code - READ-ONLY; Standardized string to programmatically identify the error. + Code *string `json:"code,omitempty"` + // Message - READ-ONLY; Detailed error description and debugging information. + Message *string `json:"message,omitempty"` + // Target - READ-ONLY; Detailed error description and debugging information. + Target *string `json:"target,omitempty"` +} + +// MarshalJSON is the custom marshaler for DefaultErrorResponseErrorDetailsItem. +func (derI DefaultErrorResponseErrorDetailsItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// DeletedAppRestoreRequest details about restoring a deleted app. +type DeletedAppRestoreRequest struct { + // DeletedAppRestoreRequestProperties - DeletedAppRestoreRequest resource specific properties + *DeletedAppRestoreRequestProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeletedAppRestoreRequest. +func (darr DeletedAppRestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if darr.DeletedAppRestoreRequestProperties != nil { + objectMap["properties"] = darr.DeletedAppRestoreRequestProperties + } + if darr.Kind != nil { + objectMap["kind"] = darr.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DeletedAppRestoreRequest struct. +func (darr *DeletedAppRestoreRequest) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var deletedAppRestoreRequestProperties DeletedAppRestoreRequestProperties + err = json.Unmarshal(*v, &deletedAppRestoreRequestProperties) + if err != nil { + return err + } + darr.DeletedAppRestoreRequestProperties = &deletedAppRestoreRequestProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + darr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + darr.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + darr.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + darr.Type = &typeVar + } + } + } + + return nil +} + +// DeletedAppRestoreRequestProperties deletedAppRestoreRequest resource specific properties +type DeletedAppRestoreRequestProperties struct { + // DeletedSiteID - ARM resource ID of the deleted app. Example: + // /subscriptions/{subId}/providers/Microsoft.Web/deletedSites/{deletedSiteId} + DeletedSiteID *string `json:"deletedSiteId,omitempty"` + // RecoverConfiguration - If true, deleted site configuration, in addition to content, will be restored. + RecoverConfiguration *bool `json:"recoverConfiguration,omitempty"` + // SnapshotTime - Point in time to restore the deleted app from, formatted as a DateTime string. + // If unspecified, default value is the time that the app was deleted. + SnapshotTime *string `json:"snapshotTime,omitempty"` + // UseDRSecondary - If true, the snapshot is retrieved from DRSecondary endpoint. + UseDRSecondary *bool `json:"useDRSecondary,omitempty"` +} + +// DeletedSite a deleted app. +type DeletedSite struct { + autorest.Response `json:"-"` + // DeletedSiteProperties - DeletedSite resource specific properties + *DeletedSiteProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeletedSite. +func (ds DeletedSite) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ds.DeletedSiteProperties != nil { + objectMap["properties"] = ds.DeletedSiteProperties + } + if ds.Kind != nil { + objectMap["kind"] = ds.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DeletedSite struct. +func (ds *DeletedSite) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var deletedSiteProperties DeletedSiteProperties + err = json.Unmarshal(*v, &deletedSiteProperties) + if err != nil { + return err + } + ds.DeletedSiteProperties = &deletedSiteProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ds.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ds.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + ds.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ds.Type = &typeVar + } + } + } + + return nil +} + +// DeletedSiteProperties deletedSite resource specific properties +type DeletedSiteProperties struct { + // DeletedSiteID - READ-ONLY; Numeric id for the deleted site + DeletedSiteID *int32 `json:"deletedSiteId,omitempty"` + // DeletedTimestamp - READ-ONLY; Time in UTC when the app was deleted. + DeletedTimestamp *string `json:"deletedTimestamp,omitempty"` + // Subscription - READ-ONLY; Subscription containing the deleted site + Subscription *string `json:"subscription,omitempty"` + // ResourceGroup - READ-ONLY; ResourceGroup that contained the deleted site + ResourceGroup *string `json:"resourceGroup,omitempty"` + // DeletedSiteName - READ-ONLY; Name of the deleted site + DeletedSiteName *string `json:"deletedSiteName,omitempty"` + // Slot - READ-ONLY; Slot of the deleted site + Slot *string `json:"slot,omitempty"` + // Kind - READ-ONLY; Kind of site that was deleted + Kind *string `json:"kind,omitempty"` + // GeoRegionName - READ-ONLY; Geo Region of the deleted site + GeoRegionName *string `json:"geoRegionName,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeletedSiteProperties. +func (ds DeletedSiteProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// DeletedWebAppCollection collection of deleted apps. +type DeletedWebAppCollection struct { + autorest.Response `json:"-"` + // Value - Collection of resources. + Value *[]DeletedSite `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeletedWebAppCollection. +func (dwac DeletedWebAppCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dwac.Value != nil { + objectMap["value"] = dwac.Value + } + return json.Marshal(objectMap) +} + +// DeletedWebAppCollectionIterator provides access to a complete listing of DeletedSite values. +type DeletedWebAppCollectionIterator struct { + i int + page DeletedWebAppCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *DeletedWebAppCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DeletedWebAppCollectionIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -12164,7 +12945,7 @@ type DomainPatchResourceProperties struct { // Consent - Legal agreement consent. Consent *DomainPurchaseConsent `json:"consent,omitempty"` // DomainNotRenewableReasons - READ-ONLY; Reasons why domain is not renewable. - DomainNotRenewableReasons *[]string `json:"domainNotRenewableReasons,omitempty"` + DomainNotRenewableReasons *[]ResourceNotRenewableReason `json:"domainNotRenewableReasons,omitempty"` // DNSType - Current DNS type. Possible values include: 'DNSTypeAzureDNS', 'DNSTypeDefaultDomainRegistrarDNS' DNSType DNSType `json:"dnsType,omitempty"` // DNSZoneID - Azure DNS Zone to use @@ -12247,7 +13028,7 @@ type DomainProperties struct { // Consent - Legal agreement consent. Consent *DomainPurchaseConsent `json:"consent,omitempty"` // DomainNotRenewableReasons - READ-ONLY; Reasons why domain is not renewable. - DomainNotRenewableReasons *[]string `json:"domainNotRenewableReasons,omitempty"` + DomainNotRenewableReasons *[]ResourceNotRenewableReason `json:"domainNotRenewableReasons,omitempty"` // DNSType - Current DNS type. Possible values include: 'DNSTypeAzureDNS', 'DNSTypeDefaultDomainRegistrarDNS' DNSType DNSType `json:"dnsType,omitempty"` // DNSZoneID - Azure DNS Zone to use @@ -12416,12 +13197,215 @@ type ErrorEntity struct { Message *string `json:"message,omitempty"` } +// ErrorInfo the error info. +type ErrorInfo struct { + // Code - 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 { + // Code - Error code. + Code *string `json:"code,omitempty"` + // Message - 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 { + // Error - The error properties. + Error *ErrorProperties `json:"error,omitempty"` +} + // Experiments routing rules in production experiments. type Experiments struct { // RampUpRules - List of ramp-up rules. RampUpRules *[]RampUpRule `json:"rampUpRules,omitempty"` } +// Expression the expression. +type Expression struct { + // Text - The text. + Text *string `json:"text,omitempty"` + Value interface{} `json:"value,omitempty"` + // Subexpressions - The sub expressions. + Subexpressions *[]Expression `json:"subexpressions,omitempty"` + Error *AzureResourceErrorInfo `json:"error,omitempty"` +} + +// ExpressionRoot the expression root. +type ExpressionRoot struct { + // Path - The path. + Path *string `json:"path,omitempty"` + // Text - The text. + Text *string `json:"text,omitempty"` + Value interface{} `json:"value,omitempty"` + // Subexpressions - The sub expressions. + Subexpressions *[]Expression `json:"subexpressions,omitempty"` + Error *AzureResourceErrorInfo `json:"error,omitempty"` +} + +// ExpressionTraces the expression traces. +type ExpressionTraces struct { + autorest.Response `json:"-"` + Value interface{} `json:"value,omitempty"` + Inputs *[]ExpressionRoot `json:"inputs,omitempty"` + // NextLink - The link used to get the next page of recommendations. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressionTracesIterator provides access to a complete listing of ExpressionRoot values. +type ExpressionTracesIterator struct { + i int + page ExpressionTracesPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ExpressionTracesIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressionTracesIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ExpressionTracesIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExpressionTracesIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ExpressionTracesIterator) Response() ExpressionTraces { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ExpressionTracesIterator) Value() ExpressionRoot { + if !iter.page.NotDone() { + return ExpressionRoot{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ExpressionTracesIterator type. +func NewExpressionTracesIterator(page ExpressionTracesPage) ExpressionTracesIterator { + return ExpressionTracesIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (et ExpressionTraces) IsEmpty() bool { + return et.Inputs == nil || len(*et.Inputs) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (et ExpressionTraces) hasNextLink() bool { + return et.NextLink != nil && len(*et.NextLink) != 0 +} + +// expressionTracesPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (et ExpressionTraces) expressionTracesPreparer(ctx context.Context) (*http.Request, error) { + if !et.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(et.NextLink))) +} + +// ExpressionTracesPage contains a page of ExpressionRoot values. +type ExpressionTracesPage struct { + fn func(context.Context, ExpressionTraces) (ExpressionTraces, error) + et ExpressionTraces +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ExpressionTracesPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressionTracesPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.et) + if err != nil { + return err + } + page.et = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ExpressionTracesPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExpressionTracesPage) NotDone() bool { + return !page.et.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExpressionTracesPage) Response() ExpressionTraces { + return page.et +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExpressionTracesPage) Values() []ExpressionRoot { + if page.et.IsEmpty() { + return nil + } + return *page.et.Inputs +} + +// Creates a new instance of the ExpressionTracesPage type. +func NewExpressionTracesPage(cur ExpressionTraces, getNextPage func(context.Context, ExpressionTraces) (ExpressionTraces, error)) ExpressionTracesPage { + return ExpressionTracesPage{ + fn: getNextPage, + et: cur, + } +} + // ExtendedLocation extended Location. type ExtendedLocation struct { // Name - Name of extended location. @@ -12477,6 +13461,42 @@ type FileSystemTokenStore struct { Directory *string `json:"directory,omitempty"` } +// FlowAccessControlConfiguration the access control configuration. +type FlowAccessControlConfiguration struct { + // Triggers - The access control configuration for invoking workflow triggers. + Triggers *FlowAccessControlConfigurationPolicy `json:"triggers,omitempty"` + // Contents - The access control configuration for accessing workflow run contents. + Contents *FlowAccessControlConfigurationPolicy `json:"contents,omitempty"` + // Actions - The access control configuration for workflow actions. + Actions *FlowAccessControlConfigurationPolicy `json:"actions,omitempty"` + // WorkflowManagement - The access control configuration for workflow management. + WorkflowManagement *FlowAccessControlConfigurationPolicy `json:"workflowManagement,omitempty"` +} + +// FlowAccessControlConfigurationPolicy the access control configuration policy. +type FlowAccessControlConfigurationPolicy struct { + // AllowedCallerIPAddresses - The allowed caller IP address ranges. + AllowedCallerIPAddresses *[]IPAddressRange `json:"allowedCallerIpAddresses,omitempty"` + // OpenAuthenticationPolicies - The authentication policies for workflow. + OpenAuthenticationPolicies *OpenAuthenticationAccessPolicies `json:"openAuthenticationPolicies,omitempty"` +} + +// FlowEndpoints the flow endpoints configuration. +type FlowEndpoints struct { + // OutgoingIPAddresses - The outgoing ip address. + OutgoingIPAddresses *[]IPAddress `json:"outgoingIpAddresses,omitempty"` + // AccessEndpointIPAddresses - The access endpoint ip address. + AccessEndpointIPAddresses *[]IPAddress `json:"accessEndpointIpAddresses,omitempty"` +} + +// FlowEndpointsConfiguration the endpoints configuration. +type FlowEndpointsConfiguration struct { + // Workflow - The workflow endpoints. + Workflow *FlowEndpoints `json:"workflow,omitempty"` + // Connector - The connector endpoints. + Connector *FlowEndpoints `json:"connector,omitempty"` +} + // ForwardProxy the configuration settings of a forward proxy used to make the requests. type ForwardProxy struct { // Convention - The convention used to determine the url of the request made. Possible values include: 'ForwardProxyConventionNoProxy', 'ForwardProxyConventionStandard', 'ForwardProxyConventionCustom' @@ -12525,20 +13545,6 @@ func (famv FunctionAppMinorVersion) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// FunctionAppRuntimes function App stack runtimes. -type FunctionAppRuntimes struct { - // LinuxRuntimeSettings - READ-ONLY; Linux-specific settings associated with the minor version. - LinuxRuntimeSettings *FunctionAppRuntimeSettings `json:"linuxRuntimeSettings,omitempty"` - // WindowsRuntimeSettings - READ-ONLY; Windows-specific settings associated with the minor version. - WindowsRuntimeSettings *FunctionAppRuntimeSettings `json:"windowsRuntimeSettings,omitempty"` -} - -// MarshalJSON is the custom marshaler for FunctionAppRuntimes. -func (far FunctionAppRuntimes) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - // FunctionAppRuntimeSettings function App runtime settings. type FunctionAppRuntimeSettings struct { // RuntimeVersion - READ-ONLY; Function App stack minor version (runtime only). @@ -12577,6 +13583,20 @@ func (fars FunctionAppRuntimeSettings) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// FunctionAppRuntimes function App stack runtimes. +type FunctionAppRuntimes struct { + // LinuxRuntimeSettings - READ-ONLY; Linux-specific settings associated with the minor version. + LinuxRuntimeSettings *FunctionAppRuntimeSettings `json:"linuxRuntimeSettings,omitempty"` + // WindowsRuntimeSettings - READ-ONLY; Windows-specific settings associated with the minor version. + WindowsRuntimeSettings *FunctionAppRuntimeSettings `json:"windowsRuntimeSettings,omitempty"` +} + +// MarshalJSON is the custom marshaler for FunctionAppRuntimes. +func (far FunctionAppRuntimes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // FunctionAppStack function App Stack. type FunctionAppStack struct { // Location - READ-ONLY; Function App stack location. @@ -13570,6 +14590,51 @@ type Google struct { Validation *AllowedAudiencesValidation `json:"validation,omitempty"` } +// HTTPLogsConfig http logs configuration. +type HTTPLogsConfig struct { + // FileSystem - Http logs to file system configuration. + FileSystem *FileSystemHTTPLogsConfig `json:"fileSystem,omitempty"` + // AzureBlobStorage - Http logs to azure blob storage configuration. + AzureBlobStorage *AzureBlobStorageHTTPLogsConfig `json:"azureBlobStorage,omitempty"` +} + +// HTTPScaleRule container App container Custom scaling rule. +type HTTPScaleRule struct { + // Metadata - Metadata properties to describe http scale rule. + Metadata map[string]*string `json:"metadata"` + // Auth - Authentication secrets for the custom scale rule. + Auth *[]ScaleRuleAuth `json:"auth,omitempty"` +} + +// MarshalJSON is the custom marshaler for HTTPScaleRule. +func (hsr HTTPScaleRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if hsr.Metadata != nil { + objectMap["metadata"] = hsr.Metadata + } + if hsr.Auth != nil { + objectMap["auth"] = hsr.Auth + } + return json.Marshal(objectMap) +} + +// HTTPSettings the configuration settings of the HTTP requests for authentication and authorization +// requests made against App Service Authentication/Authorization. +type HTTPSettings struct { + // RequireHTTPS - false if the authentication/authorization responses not having the HTTPS scheme are permissible; otherwise, true. + RequireHTTPS *bool `json:"requireHttps,omitempty"` + // Routes - The configuration settings of the paths HTTP requests. + Routes *HTTPSettingsRoutes `json:"routes,omitempty"` + // ForwardProxy - The configuration settings of a forward proxy used to make the requests. + ForwardProxy *ForwardProxy `json:"forwardProxy,omitempty"` +} + +// HTTPSettingsRoutes the configuration settings of the paths HTTP requests. +type HTTPSettingsRoutes struct { + // APIPrefix - The prefix that should precede all the authentication/authorization paths. + APIPrefix *string `json:"apiPrefix,omitempty"` +} + // HandlerMapping the IIS handler mappings used to define which handler processes HTTP requests with // certain extension. // For example, it is used to configure php-cgi.exe process to handle all HTTP requests with *.php @@ -13583,42 +14648,6 @@ type HandlerMapping struct { Arguments *string `json:"arguments,omitempty"` } -// HostingEnvironmentDeploymentInfo information needed to create resources on an App Service Environment. -type HostingEnvironmentDeploymentInfo struct { - // Name - Name of the App Service Environment. - Name *string `json:"name,omitempty"` - // Location - Location of the App Service Environment. - Location *string `json:"location,omitempty"` -} - -// HostingEnvironmentDiagnostics diagnostics for an App Service Environment. -type HostingEnvironmentDiagnostics struct { - autorest.Response `json:"-"` - // Name - Name/identifier of the diagnostics. - Name *string `json:"name,omitempty"` - // DiagnosticsOutput - Diagnostics output. - DiagnosticsOutput *string `json:"diagnosticsOutput,omitempty"` -} - -// HostingEnvironmentProfile specification for an App Service Environment to use for this resource. -type HostingEnvironmentProfile struct { - // ID - Resource ID of the App Service Environment. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Name of the App Service Environment. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type of the App Service Environment. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for HostingEnvironmentProfile. -func (hep HostingEnvironmentProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if hep.ID != nil { - objectMap["id"] = hep.ID - } - return json.Marshal(objectMap) -} - // HostKeys functions host level keys. type HostKeys struct { autorest.Response `json:"-"` @@ -13984,51 +15013,42 @@ type HostNameSslState struct { HostType HostType `json:"hostType,omitempty"` } -// HTTPLogsConfig http logs configuration. -type HTTPLogsConfig struct { - // FileSystem - Http logs to file system configuration. - FileSystem *FileSystemHTTPLogsConfig `json:"fileSystem,omitempty"` - // AzureBlobStorage - Http logs to azure blob storage configuration. - AzureBlobStorage *AzureBlobStorageHTTPLogsConfig `json:"azureBlobStorage,omitempty"` +// HostingEnvironmentDeploymentInfo information needed to create resources on an App Service Environment. +type HostingEnvironmentDeploymentInfo struct { + // Name - Name of the App Service Environment. + Name *string `json:"name,omitempty"` + // Location - Location of the App Service Environment. + Location *string `json:"location,omitempty"` } -// HTTPScaleRule container App container Custom scaling rule. -type HTTPScaleRule struct { - // Metadata - Metadata properties to describe http scale rule. - Metadata map[string]*string `json:"metadata"` - // Auth - Authentication secrets for the custom scale rule. - Auth *[]ScaleRuleAuth `json:"auth,omitempty"` +// HostingEnvironmentDiagnostics diagnostics for an App Service Environment. +type HostingEnvironmentDiagnostics struct { + autorest.Response `json:"-"` + // Name - Name/identifier of the diagnostics. + Name *string `json:"name,omitempty"` + // DiagnosticsOutput - Diagnostics output. + DiagnosticsOutput *string `json:"diagnosticsOutput,omitempty"` } -// MarshalJSON is the custom marshaler for HTTPScaleRule. -func (hsr HTTPScaleRule) MarshalJSON() ([]byte, error) { +// HostingEnvironmentProfile specification for an App Service Environment to use for this resource. +type HostingEnvironmentProfile struct { + // ID - Resource ID of the App Service Environment. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Name of the App Service Environment. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type of the App Service Environment. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for HostingEnvironmentProfile. +func (hep HostingEnvironmentProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if hsr.Metadata != nil { - objectMap["metadata"] = hsr.Metadata - } - if hsr.Auth != nil { - objectMap["auth"] = hsr.Auth + if hep.ID != nil { + objectMap["id"] = hep.ID } return json.Marshal(objectMap) } -// HTTPSettings the configuration settings of the HTTP requests for authentication and authorization -// requests made against App Service Authentication/Authorization. -type HTTPSettings struct { - // RequireHTTPS - false if the authentication/authorization responses not having the HTTPS scheme are permissible; otherwise, true. - RequireHTTPS *bool `json:"requireHttps,omitempty"` - // Routes - The configuration settings of the paths HTTP requests. - Routes *HTTPSettingsRoutes `json:"routes,omitempty"` - // ForwardProxy - The configuration settings of a forward proxy used to make the requests. - ForwardProxy *ForwardProxy `json:"forwardProxy,omitempty"` -} - -// HTTPSettingsRoutes the configuration settings of the paths HTTP requests. -type HTTPSettingsRoutes struct { - // APIPrefix - The prefix that should precede all the authentication/authorization paths. - APIPrefix *string `json:"apiPrefix,omitempty"` -} - // HybridConnection hybrid Connection contract. This is used to configure a Hybrid Connection. type HybridConnection struct { autorest.Response `json:"-"` @@ -14509,6 +15529,99 @@ type HybridConnectionProperties struct { ServiceBusSuffix *string `json:"serviceBusSuffix,omitempty"` } +// IPAddress the ip address. +type IPAddress struct { + // Address - The address. + Address *string `json:"address,omitempty"` +} + +// IPAddressRange the ip address range. +type IPAddressRange struct { + // AddressRange - The IP address range. + AddressRange *string `json:"addressRange,omitempty"` +} + +// IPSecurityRestriction IP security restriction on an app. +type IPSecurityRestriction struct { + // IPAddress - IP address the security restriction is valid for. + // It can be in form of pure ipv4 address (required SubnetMask property) or + // CIDR notation such as ipv4/mask (leading bit match). For CIDR, + // SubnetMask property must not be specified. + IPAddress *string `json:"ipAddress,omitempty"` + // SubnetMask - Subnet mask for the range of IP addresses the restriction is valid for. + SubnetMask *string `json:"subnetMask,omitempty"` + // VnetSubnetResourceID - Virtual network resource id + VnetSubnetResourceID *string `json:"vnetSubnetResourceId,omitempty"` + // VnetTrafficTag - (internal) Vnet traffic tag + VnetTrafficTag *int32 `json:"vnetTrafficTag,omitempty"` + // SubnetTrafficTag - (internal) Subnet traffic tag + SubnetTrafficTag *int32 `json:"subnetTrafficTag,omitempty"` + // Action - Allow or Deny access for this IP range. + Action *string `json:"action,omitempty"` + // Tag - Defines what this IP filter will be used for. This is to support IP filtering on proxies. Possible values include: 'IPFilterTagDefault', 'IPFilterTagXffProxy', 'IPFilterTagServiceTag' + Tag IPFilterTag `json:"tag,omitempty"` + // Priority - Priority of IP restriction rule. + Priority *int32 `json:"priority,omitempty"` + // Name - IP restriction rule name. + Name *string `json:"name,omitempty"` + // Description - IP restriction rule description. + Description *string `json:"description,omitempty"` + // Headers - IP restriction rule headers. + // X-Forwarded-Host (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples). + // The matching logic is .. + // - If the property is null or empty (default), all hosts(or lack of) are allowed. + // - A value is compared using ordinal-ignore-case (excluding port number). + // - Subdomain wildcards are permitted but don't match the root domain. For example, *.contoso.com matches the subdomain foo.contoso.com + // but not the root domain contoso.com or multi-level foo.bar.contoso.com + // - Unicode host names are allowed but are converted to Punycode for matching. + // X-Forwarded-For (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples). + // The matching logic is .. + // - If the property is null or empty (default), any forwarded-for chains (or lack of) are allowed. + // - If any address (excluding port number) in the chain (comma separated) matches the CIDR defined by the property. + // X-Azure-FDID and X-FD-HealthProbe. + // The matching logic is exact match. + Headers map[string][]string `json:"headers"` +} + +// MarshalJSON is the custom marshaler for IPSecurityRestriction. +func (isr IPSecurityRestriction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if isr.IPAddress != nil { + objectMap["ipAddress"] = isr.IPAddress + } + if isr.SubnetMask != nil { + objectMap["subnetMask"] = isr.SubnetMask + } + if isr.VnetSubnetResourceID != nil { + objectMap["vnetSubnetResourceId"] = isr.VnetSubnetResourceID + } + if isr.VnetTrafficTag != nil { + objectMap["vnetTrafficTag"] = isr.VnetTrafficTag + } + if isr.SubnetTrafficTag != nil { + objectMap["subnetTrafficTag"] = isr.SubnetTrafficTag + } + if isr.Action != nil { + objectMap["action"] = isr.Action + } + if isr.Tag != "" { + objectMap["tag"] = isr.Tag + } + if isr.Priority != nil { + objectMap["priority"] = isr.Priority + } + if isr.Name != nil { + objectMap["name"] = isr.Name + } + if isr.Description != nil { + objectMap["description"] = isr.Description + } + if isr.Headers != nil { + objectMap["headers"] = isr.Headers + } + return json.Marshal(objectMap) +} + // Identifier a domain specific resource identifier. type Identifier struct { autorest.Response `json:"-"` @@ -15043,85 +16156,13 @@ func (i Ingress) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// IPSecurityRestriction IP security restriction on an app. -type IPSecurityRestriction struct { - // IPAddress - IP address the security restriction is valid for. - // It can be in form of pure ipv4 address (required SubnetMask property) or - // CIDR notation such as ipv4/mask (leading bit match). For CIDR, - // SubnetMask property must not be specified. - IPAddress *string `json:"ipAddress,omitempty"` - // SubnetMask - Subnet mask for the range of IP addresses the restriction is valid for. - SubnetMask *string `json:"subnetMask,omitempty"` - // VnetSubnetResourceID - Virtual network resource id - VnetSubnetResourceID *string `json:"vnetSubnetResourceId,omitempty"` - // VnetTrafficTag - (internal) Vnet traffic tag - VnetTrafficTag *int32 `json:"vnetTrafficTag,omitempty"` - // SubnetTrafficTag - (internal) Subnet traffic tag - SubnetTrafficTag *int32 `json:"subnetTrafficTag,omitempty"` - // Action - Allow or Deny access for this IP range. - Action *string `json:"action,omitempty"` - // Tag - Defines what this IP filter will be used for. This is to support IP filtering on proxies. Possible values include: 'IPFilterTagDefault', 'IPFilterTagXffProxy', 'IPFilterTagServiceTag' - Tag IPFilterTag `json:"tag,omitempty"` - // Priority - Priority of IP restriction rule. - Priority *int32 `json:"priority,omitempty"` - // Name - IP restriction rule name. - Name *string `json:"name,omitempty"` - // Description - IP restriction rule description. - Description *string `json:"description,omitempty"` - // Headers - IP restriction rule headers. - // X-Forwarded-Host (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples). - // The matching logic is .. - // - If the property is null or empty (default), all hosts(or lack of) are allowed. - // - A value is compared using ordinal-ignore-case (excluding port number). - // - Subdomain wildcards are permitted but don't match the root domain. For example, *.contoso.com matches the subdomain foo.contoso.com - // but not the root domain contoso.com or multi-level foo.bar.contoso.com - // - Unicode host names are allowed but are converted to Punycode for matching. - // X-Forwarded-For (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples). - // The matching logic is .. - // - If the property is null or empty (default), any forwarded-for chains (or lack of) are allowed. - // - If any address (excluding port number) in the chain (comma separated) matches the CIDR defined by the property. - // X-Azure-FDID and X-FD-HealthProbe. - // The matching logic is exact match. - Headers map[string][]string `json:"headers"` -} - -// MarshalJSON is the custom marshaler for IPSecurityRestriction. -func (isr IPSecurityRestriction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if isr.IPAddress != nil { - objectMap["ipAddress"] = isr.IPAddress - } - if isr.SubnetMask != nil { - objectMap["subnetMask"] = isr.SubnetMask - } - if isr.VnetSubnetResourceID != nil { - objectMap["vnetSubnetResourceId"] = isr.VnetSubnetResourceID - } - if isr.VnetTrafficTag != nil { - objectMap["vnetTrafficTag"] = isr.VnetTrafficTag - } - if isr.SubnetTrafficTag != nil { - objectMap["subnetTrafficTag"] = isr.SubnetTrafficTag - } - if isr.Action != nil { - objectMap["action"] = isr.Action - } - if isr.Tag != "" { - objectMap["tag"] = isr.Tag - } - if isr.Priority != nil { - objectMap["priority"] = isr.Priority - } - if isr.Name != nil { - objectMap["name"] = isr.Name - } - if isr.Description != nil { - objectMap["description"] = isr.Description - } - if isr.Headers != nil { - objectMap["headers"] = isr.Headers - } - return json.Marshal(objectMap) +// JSONSchema the JSON schema. +type JSONSchema struct { + autorest.Response `json:"-"` + // Title - The JSON title. + Title *string `json:"title,omitempty"` + // Content - The JSON content. + Content *string `json:"content,omitempty"` } // Job web Job Information. @@ -16146,6 +17187,14 @@ type LogAnalyticsConfiguration struct { SharedKey *string `json:"sharedKey,omitempty"` } +// LogSpecification log Definition of a single resource metric. +type LogSpecification struct { + Name *string `json:"name,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + BlobDuration *string `json:"blobDuration,omitempty"` + LogFilterPattern *string `json:"logFilterPattern,omitempty"` +} + // Login the configuration settings of the login flow of users using App Service // Authentication/Authorization. type Login struct { @@ -16177,262 +17226,6 @@ type LoginScopes struct { Scopes *[]string `json:"scopes,omitempty"` } -// LogSpecification log Definition of a single resource metric. -type LogSpecification struct { - Name *string `json:"name,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - BlobDuration *string `json:"blobDuration,omitempty"` - LogFilterPattern *string `json:"logFilterPattern,omitempty"` -} - -// ManagedServiceIdentity managed service identity. -type ManagedServiceIdentity struct { - // Type - Type of managed service identity. Possible values include: 'ManagedServiceIdentityTypeSystemAssigned', 'ManagedServiceIdentityTypeUserAssigned', 'ManagedServiceIdentityTypeSystemAssignedUserAssigned', 'ManagedServiceIdentityTypeNone' - Type ManagedServiceIdentityType `json:"type,omitempty"` - // TenantID - READ-ONLY; Tenant of managed service identity. - TenantID *string `json:"tenantId,omitempty"` - // PrincipalID - READ-ONLY; Principal Id of managed service identity. - PrincipalID *string `json:"principalId,omitempty"` - // UserAssignedIdentities - The list of user assigned identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName} - UserAssignedIdentities map[string]*UserAssignedIdentity `json:"userAssignedIdentities"` -} - -// MarshalJSON is the custom marshaler for ManagedServiceIdentity. -func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if msi.Type != "" { - objectMap["type"] = msi.Type - } - if msi.UserAssignedIdentities != nil { - objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities - } - return json.Marshal(objectMap) -} - -// MetricAvailability retention policy of a resource metric. -type MetricAvailability struct { - TimeGrain *string `json:"timeGrain,omitempty"` - BlobDuration *string `json:"blobDuration,omitempty"` -} - -// MetricSpecification definition of a single resource metric. -type MetricSpecification struct { - Name *string `json:"name,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - DisplayDescription *string `json:"displayDescription,omitempty"` - Unit *string `json:"unit,omitempty"` - AggregationType *string `json:"aggregationType,omitempty"` - SupportsInstanceLevelAggregation *bool `json:"supportsInstanceLevelAggregation,omitempty"` - EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"` - SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"` - SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"` - MetricFilterPattern *string `json:"metricFilterPattern,omitempty"` - FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` - IsInternal *bool `json:"isInternal,omitempty"` - Dimensions *[]Dimension `json:"dimensions,omitempty"` - Category *string `json:"category,omitempty"` - Availabilities *[]MetricAvailability `json:"availabilities,omitempty"` - SupportedTimeGrainTypes *[]string `json:"supportedTimeGrainTypes,omitempty"` - SupportedAggregationTypes *[]string `json:"supportedAggregationTypes,omitempty"` -} - -// MigrateMySQLRequest mySQL migration request. -type MigrateMySQLRequest struct { - // MigrateMySQLRequestProperties - MigrateMySqlRequest resource specific properties - *MigrateMySQLRequestProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for MigrateMySQLRequest. -func (mmsr MigrateMySQLRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mmsr.MigrateMySQLRequestProperties != nil { - objectMap["properties"] = mmsr.MigrateMySQLRequestProperties - } - if mmsr.Kind != nil { - objectMap["kind"] = mmsr.Kind - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for MigrateMySQLRequest struct. -func (mmsr *MigrateMySQLRequest) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var migrateMySQLRequestProperties MigrateMySQLRequestProperties - err = json.Unmarshal(*v, &migrateMySQLRequestProperties) - if err != nil { - return err - } - mmsr.MigrateMySQLRequestProperties = &migrateMySQLRequestProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - mmsr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - mmsr.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - mmsr.Kind = &kind - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - mmsr.Type = &typeVar - } - } - } - - return nil -} - -// MigrateMySQLRequestProperties migrateMySqlRequest resource specific properties -type MigrateMySQLRequestProperties struct { - // ConnectionString - Connection string to the remote MySQL database. - ConnectionString *string `json:"connectionString,omitempty"` - // MigrationType - The type of migration operation to be done. Possible values include: 'MySQLMigrationTypeLocalToRemote', 'MySQLMigrationTypeRemoteToLocal' - MigrationType MySQLMigrationType `json:"migrationType,omitempty"` -} - -// MigrateMySQLStatus mySQL migration status. -type MigrateMySQLStatus struct { - autorest.Response `json:"-"` - // MigrateMySQLStatusProperties - MigrateMySqlStatus resource specific properties - *MigrateMySQLStatusProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for MigrateMySQLStatus. -func (mmss MigrateMySQLStatus) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mmss.MigrateMySQLStatusProperties != nil { - objectMap["properties"] = mmss.MigrateMySQLStatusProperties - } - if mmss.Kind != nil { - objectMap["kind"] = mmss.Kind - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for MigrateMySQLStatus struct. -func (mmss *MigrateMySQLStatus) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var migrateMySQLStatusProperties MigrateMySQLStatusProperties - err = json.Unmarshal(*v, &migrateMySQLStatusProperties) - if err != nil { - return err - } - mmss.MigrateMySQLStatusProperties = &migrateMySQLStatusProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - mmss.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - mmss.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - mmss.Kind = &kind - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - mmss.Type = &typeVar - } - } - } - - return nil -} - -// MigrateMySQLStatusProperties migrateMySqlStatus resource specific properties -type MigrateMySQLStatusProperties struct { - // MigrationOperationStatus - READ-ONLY; Status of the migration task. Possible values include: 'OperationStatusInProgress', 'OperationStatusFailed', 'OperationStatusSucceeded', 'OperationStatusTimedOut', 'OperationStatusCreated' - MigrationOperationStatus OperationStatus `json:"migrationOperationStatus,omitempty"` - // OperationID - READ-ONLY; Operation ID for the migration task. - OperationID *string `json:"operationId,omitempty"` - // LocalMySQLEnabled - READ-ONLY; True if the web app has in app MySql enabled - LocalMySQLEnabled *bool `json:"localMySqlEnabled,omitempty"` -} - -// MarshalJSON is the custom marshaler for MigrateMySQLStatusProperties. -func (mmss MigrateMySQLStatusProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - // MSDeploy mSDeploy ARM PUT information type MSDeploy struct { // MSDeployCore - Core resource properties @@ -16790,6 +17583,254 @@ func (mds MSDeployStatusProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// ManagedServiceIdentity managed service identity. +type ManagedServiceIdentity struct { + // Type - Type of managed service identity. Possible values include: 'ManagedServiceIdentityTypeSystemAssigned', 'ManagedServiceIdentityTypeUserAssigned', 'ManagedServiceIdentityTypeSystemAssignedUserAssigned', 'ManagedServiceIdentityTypeNone' + Type ManagedServiceIdentityType `json:"type,omitempty"` + // TenantID - READ-ONLY; Tenant of managed service identity. + TenantID *string `json:"tenantId,omitempty"` + // PrincipalID - READ-ONLY; Principal Id of managed service identity. + PrincipalID *string `json:"principalId,omitempty"` + // UserAssignedIdentities - The list of user assigned identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName} + UserAssignedIdentities map[string]*UserAssignedIdentity `json:"userAssignedIdentities"` +} + +// MarshalJSON is the custom marshaler for ManagedServiceIdentity. +func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if msi.Type != "" { + objectMap["type"] = msi.Type + } + if msi.UserAssignedIdentities != nil { + objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities + } + return json.Marshal(objectMap) +} + +// MetricAvailability retention policy of a resource metric. +type MetricAvailability struct { + TimeGrain *string `json:"timeGrain,omitempty"` + BlobDuration *string `json:"blobDuration,omitempty"` +} + +// MetricSpecification definition of a single resource metric. +type MetricSpecification struct { + Name *string `json:"name,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + DisplayDescription *string `json:"displayDescription,omitempty"` + Unit *string `json:"unit,omitempty"` + AggregationType *string `json:"aggregationType,omitempty"` + SupportsInstanceLevelAggregation *bool `json:"supportsInstanceLevelAggregation,omitempty"` + EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"` + SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"` + SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"` + MetricFilterPattern *string `json:"metricFilterPattern,omitempty"` + FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` + IsInternal *bool `json:"isInternal,omitempty"` + Dimensions *[]Dimension `json:"dimensions,omitempty"` + Category *string `json:"category,omitempty"` + Availabilities *[]MetricAvailability `json:"availabilities,omitempty"` + SupportedTimeGrainTypes *[]string `json:"supportedTimeGrainTypes,omitempty"` + SupportedAggregationTypes *[]string `json:"supportedAggregationTypes,omitempty"` +} + +// MigrateMySQLRequest mySQL migration request. +type MigrateMySQLRequest struct { + // MigrateMySQLRequestProperties - MigrateMySqlRequest resource specific properties + *MigrateMySQLRequestProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateMySQLRequest. +func (mmsr MigrateMySQLRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mmsr.MigrateMySQLRequestProperties != nil { + objectMap["properties"] = mmsr.MigrateMySQLRequestProperties + } + if mmsr.Kind != nil { + objectMap["kind"] = mmsr.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for MigrateMySQLRequest struct. +func (mmsr *MigrateMySQLRequest) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var migrateMySQLRequestProperties MigrateMySQLRequestProperties + err = json.Unmarshal(*v, &migrateMySQLRequestProperties) + if err != nil { + return err + } + mmsr.MigrateMySQLRequestProperties = &migrateMySQLRequestProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + mmsr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + mmsr.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + mmsr.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mmsr.Type = &typeVar + } + } + } + + return nil +} + +// MigrateMySQLRequestProperties migrateMySqlRequest resource specific properties +type MigrateMySQLRequestProperties struct { + // ConnectionString - Connection string to the remote MySQL database. + ConnectionString *string `json:"connectionString,omitempty"` + // MigrationType - The type of migration operation to be done. Possible values include: 'MySQLMigrationTypeLocalToRemote', 'MySQLMigrationTypeRemoteToLocal' + MigrationType MySQLMigrationType `json:"migrationType,omitempty"` +} + +// MigrateMySQLStatus mySQL migration status. +type MigrateMySQLStatus struct { + autorest.Response `json:"-"` + // MigrateMySQLStatusProperties - MigrateMySqlStatus resource specific properties + *MigrateMySQLStatusProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateMySQLStatus. +func (mmss MigrateMySQLStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mmss.MigrateMySQLStatusProperties != nil { + objectMap["properties"] = mmss.MigrateMySQLStatusProperties + } + if mmss.Kind != nil { + objectMap["kind"] = mmss.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for MigrateMySQLStatus struct. +func (mmss *MigrateMySQLStatus) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var migrateMySQLStatusProperties MigrateMySQLStatusProperties + err = json.Unmarshal(*v, &migrateMySQLStatusProperties) + if err != nil { + return err + } + mmss.MigrateMySQLStatusProperties = &migrateMySQLStatusProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + mmss.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + mmss.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + mmss.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mmss.Type = &typeVar + } + } + } + + return nil +} + +// MigrateMySQLStatusProperties migrateMySqlStatus resource specific properties +type MigrateMySQLStatusProperties struct { + // MigrationOperationStatus - READ-ONLY; Status of the migration task. Possible values include: 'OperationStatusInProgress', 'OperationStatusFailed', 'OperationStatusSucceeded', 'OperationStatusTimedOut', 'OperationStatusCreated' + MigrationOperationStatus OperationStatus `json:"migrationOperationStatus,omitempty"` + // OperationID - READ-ONLY; Operation ID for the migration task. + OperationID *string `json:"operationId,omitempty"` + // LocalMySQLEnabled - READ-ONLY; True if the web app has in app MySql enabled + LocalMySQLEnabled *bool `json:"localMySqlEnabled,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateMySQLStatusProperties. +func (mmss MigrateMySQLStatusProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // NameIdentifier identifies an object. type NameIdentifier struct { // Name - Name of the object. @@ -17096,6 +18137,37 @@ type Nonce struct { NonceExpirationInterval *string `json:"nonceExpirationInterval,omitempty"` } +// OpenAuthenticationAccessPolicies authenticationPolicy of type Open. +type OpenAuthenticationAccessPolicies struct { + // Policies - Open authentication policies. + Policies map[string]*OpenAuthenticationAccessPolicy `json:"policies"` +} + +// MarshalJSON is the custom marshaler for OpenAuthenticationAccessPolicies. +func (oaap OpenAuthenticationAccessPolicies) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if oaap.Policies != nil { + objectMap["policies"] = oaap.Policies + } + return json.Marshal(objectMap) +} + +// OpenAuthenticationAccessPolicy open authentication access policy defined by user. +type OpenAuthenticationAccessPolicy struct { + // Type - Type of provider for OAuth. Possible values include: 'OpenAuthenticationProviderTypeAAD' + Type OpenAuthenticationProviderType `json:"type,omitempty"` + // Claims - The access policy claims. + Claims *[]OpenAuthenticationPolicyClaim `json:"claims,omitempty"` +} + +// OpenAuthenticationPolicyClaim open authentication policy claim. +type OpenAuthenticationPolicyClaim struct { + // Name - The name of the claim. + Name *string `json:"name,omitempty"` + // Value - 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 { @@ -17160,6 +18232,81 @@ type Operation struct { GeoMasterOperationID *uuid.UUID `json:"geoMasterOperationId,omitempty"` } +// OperationResult the operation result definition. +type OperationResult struct { + // TrackingID - READ-ONLY; Gets the tracking id. + TrackingID *string `json:"trackingId,omitempty"` + // Inputs - READ-ONLY; Gets the inputs. + Inputs interface{} `json:"inputs,omitempty"` + // InputsLink - READ-ONLY; Gets the link to inputs. + InputsLink *ContentLink `json:"inputsLink,omitempty"` + // Outputs - READ-ONLY; Gets the outputs. + Outputs interface{} `json:"outputs,omitempty"` + // OutputsLink - READ-ONLY; Gets the link to outputs. + OutputsLink *ContentLink `json:"outputsLink,omitempty"` + // TrackedProperties - READ-ONLY; Gets the tracked properties. + TrackedProperties interface{} `json:"trackedProperties,omitempty"` + // RetryHistory - Gets the retry histories. + RetryHistory *[]RetryHistory `json:"retryHistory,omitempty"` + IterationCount *int32 `json:"iterationCount,omitempty"` + // StartTime - The start time of the workflow scope repetition. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time of the workflow scope repetition. + EndTime *date.Time `json:"endTime,omitempty"` + // Correlation - The correlation properties. + Correlation *RunActionCorrelation `json:"correlation,omitempty"` + // Status - The status of the workflow scope repetition. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored' + Status WorkflowStatus `json:"status,omitempty"` + // Code - The workflow scope repetition code. + Code *string `json:"code,omitempty"` + Error interface{} `json:"error,omitempty"` +} + +// MarshalJSON is the custom marshaler for OperationResult. +func (or OperationResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if or.RetryHistory != nil { + objectMap["retryHistory"] = or.RetryHistory + } + if or.IterationCount != nil { + objectMap["iterationCount"] = or.IterationCount + } + if or.StartTime != nil { + objectMap["startTime"] = or.StartTime + } + if or.EndTime != nil { + objectMap["endTime"] = or.EndTime + } + if or.Correlation != nil { + objectMap["correlation"] = or.Correlation + } + if or.Status != "" { + objectMap["status"] = or.Status + } + if or.Code != nil { + objectMap["code"] = or.Code + } + if or.Error != nil { + objectMap["error"] = or.Error + } + return json.Marshal(objectMap) +} + +// OperationResultProperties the run operation result properties. +type OperationResultProperties struct { + // StartTime - The start time of the workflow scope repetition. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time of the workflow scope repetition. + EndTime *date.Time `json:"endTime,omitempty"` + // Correlation - The correlation properties. + Correlation *RunActionCorrelation `json:"correlation,omitempty"` + // Status - The status of the workflow scope repetition. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored' + Status WorkflowStatus `json:"status,omitempty"` + // Code - The workflow scope repetition code. + Code *string `json:"code,omitempty"` + Error interface{} `json:"error,omitempty"` +} + // OutboundEnvironmentEndpoint endpoints accessed for a common purpose that the App Service Environment // requires outbound network access to. type OutboundEnvironmentEndpoint struct { @@ -20671,6 +21818,34 @@ func (rr RecommendationRuleProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// RecurrenceSchedule the recurrence schedule. +type RecurrenceSchedule struct { + // Minutes - The minutes. + Minutes *[]int32 `json:"minutes,omitempty"` + // Hours - The hours. + Hours *[]int32 `json:"hours,omitempty"` + // WeekDays - The days of the week. + WeekDays *[]DaysOfWeek `json:"weekDays,omitempty"` + // MonthDays - The month days. + MonthDays *[]int32 `json:"monthDays,omitempty"` + // MonthlyOccurrences - The monthly occurrences. + MonthlyOccurrences *[]RecurrenceScheduleOccurrence `json:"monthlyOccurrences,omitempty"` +} + +// RecurrenceScheduleOccurrence the recurrence schedule occurrence. +type RecurrenceScheduleOccurrence struct { + // Day - The day of the week. Possible values include: 'DayOfWeekSunday', 'DayOfWeekMonday', 'DayOfWeekTuesday', 'DayOfWeekWednesday', 'DayOfWeekThursday', 'DayOfWeekFriday', 'DayOfWeekSaturday' + Day DayOfWeek `json:"day,omitempty"` + // Occurrence - The occurrence. + Occurrence *int32 `json:"occurrence,omitempty"` +} + +// RegenerateActionParameter the access key regenerate action content. +type RegenerateActionParameter struct { + // KeyType - The key type. Possible values include: 'KeyTypeNotSpecified', 'KeyTypePrimary', 'KeyTypeSecondary' + KeyType KeyType `json:"keyType,omitempty"` +} + // RegistryCredentials container App Private Registry type RegistryCredentials struct { // Server - Container Registry Server @@ -21209,74 +22384,76 @@ type RenewCertificateOrderRequestProperties struct { IsPrivateKeyExternal *bool `json:"isPrivateKeyExternal,omitempty"` } -// RequestsBasedTrigger trigger based on total requests. -type RequestsBasedTrigger struct { - // Count - Request Count. - Count *int32 `json:"count,omitempty"` - // TimeInterval - Time interval. - TimeInterval *string `json:"timeInterval,omitempty"` +// RepetitionIndex the workflow run action repetition index. +type RepetitionIndex struct { + // ScopeName - The scope. + ScopeName *string `json:"scopeName,omitempty"` + // ItemIndex - The index. + ItemIndex *int32 `json:"itemIndex,omitempty"` } -// Resource azure resource. This resource is tracked in Azure Resource Manager -type Resource struct { - // ID - READ-ONLY; Resource Id. +// Request a request. +type Request struct { + // Headers - A list of all the headers attached to the request. + Headers interface{} `json:"headers,omitempty"` + // URI - The destination for the request. + URI *string `json:"uri,omitempty"` + // Method - The HTTP method used for the request. + Method *string `json:"method,omitempty"` +} + +// RequestHistory the request history. +type RequestHistory struct { + autorest.Response `json:"-"` + // Properties - The request history properties. + Properties *RequestHistoryProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The resource id. ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. + // Name - READ-ONLY; Gets the resource name. Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Location - Resource Location. - Location *string `json:"location,omitempty"` - // Type - READ-ONLY; Resource type. + // Type - READ-ONLY; Gets the resource type. Type *string `json:"type,omitempty"` - // Tags - Resource tags. + // Location - The resource location. + Location *string `json:"location,omitempty"` + // Tags - The resource tags. Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for Resource. -func (r Resource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for RequestHistory. +func (rh RequestHistory) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if r.Kind != nil { - objectMap["kind"] = r.Kind + if rh.Properties != nil { + objectMap["properties"] = rh.Properties } - if r.Location != nil { - objectMap["location"] = r.Location + if rh.Location != nil { + objectMap["location"] = rh.Location } - if r.Tags != nil { - objectMap["tags"] = r.Tags + if rh.Tags != nil { + objectMap["tags"] = rh.Tags } return json.Marshal(objectMap) } -// ResourceCollection collection of resources. -type ResourceCollection struct { +// RequestHistoryListResult the list of workflow request histories. +type RequestHistoryListResult struct { autorest.Response `json:"-"` - // Value - Collection of resources. - Value *[]string `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to next page of resources. + // Value - A list of workflow request histories. + Value *[]RequestHistory `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for ResourceCollection. -func (rc ResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rc.Value != nil { - objectMap["value"] = rc.Value - } - return json.Marshal(objectMap) -} - -// ResourceCollectionIterator provides access to a complete listing of string values. -type ResourceCollectionIterator struct { +// RequestHistoryListResultIterator provides access to a complete listing of RequestHistory values. +type RequestHistoryListResultIterator struct { i int - page ResourceCollectionPage + page RequestHistoryListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *RequestHistoryListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ResourceCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/RequestHistoryListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -21301,67 +22478,67 @@ func (iter *ResourceCollectionIterator) NextWithContext(ctx context.Context) (er // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ResourceCollectionIterator) Next() error { +func (iter *RequestHistoryListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ResourceCollectionIterator) NotDone() bool { +func (iter RequestHistoryListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ResourceCollectionIterator) Response() ResourceCollection { +func (iter RequestHistoryListResultIterator) Response() RequestHistoryListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ResourceCollectionIterator) Value() string { +func (iter RequestHistoryListResultIterator) Value() RequestHistory { if !iter.page.NotDone() { - return "" + return RequestHistory{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ResourceCollectionIterator type. -func NewResourceCollectionIterator(page ResourceCollectionPage) ResourceCollectionIterator { - return ResourceCollectionIterator{page: page} +// Creates a new instance of the RequestHistoryListResultIterator type. +func NewRequestHistoryListResultIterator(page RequestHistoryListResultPage) RequestHistoryListResultIterator { + return RequestHistoryListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (rc ResourceCollection) IsEmpty() bool { - return rc.Value == nil || len(*rc.Value) == 0 +func (rhlr RequestHistoryListResult) IsEmpty() bool { + return rhlr.Value == nil || len(*rhlr.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (rc ResourceCollection) hasNextLink() bool { - return rc.NextLink != nil && len(*rc.NextLink) != 0 +func (rhlr RequestHistoryListResult) hasNextLink() bool { + return rhlr.NextLink != nil && len(*rhlr.NextLink) != 0 } -// resourceCollectionPreparer prepares a request to retrieve the next set of results. +// requestHistoryListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (rc ResourceCollection) resourceCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !rc.hasNextLink() { +func (rhlr RequestHistoryListResult) requestHistoryListResultPreparer(ctx context.Context) (*http.Request, error) { + if !rhlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(rc.NextLink))) + autorest.WithBaseURL(to.String(rhlr.NextLink))) } -// ResourceCollectionPage contains a page of string values. -type ResourceCollectionPage struct { - fn func(context.Context, ResourceCollection) (ResourceCollection, error) - rc ResourceCollection +// RequestHistoryListResultPage contains a page of RequestHistory values. +type RequestHistoryListResultPage struct { + fn func(context.Context, RequestHistoryListResult) (RequestHistoryListResult, error) + rhlr RequestHistoryListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ResourceCollectionPage) NextWithContext(ctx context.Context) (err error) { +func (page *RequestHistoryListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ResourceCollectionPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/RequestHistoryListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -21371,11 +22548,11 @@ func (page *ResourceCollectionPage) NextWithContext(ctx context.Context) (err er }() } for { - next, err := page.fn(ctx, page.rc) + next, err := page.fn(ctx, page.rhlr) if err != nil { return err } - page.rc = next + page.rhlr = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -21386,153 +22563,116 @@ func (page *ResourceCollectionPage) NextWithContext(ctx context.Context) (err er // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *ResourceCollectionPage) Next() error { +func (page *RequestHistoryListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ResourceCollectionPage) NotDone() bool { - return !page.rc.IsEmpty() +func (page RequestHistoryListResultPage) NotDone() bool { + return !page.rhlr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ResourceCollectionPage) Response() ResourceCollection { - return page.rc +func (page RequestHistoryListResultPage) Response() RequestHistoryListResult { + return page.rhlr } // Values returns the slice of values for the current page or nil if there are no values. -func (page ResourceCollectionPage) Values() []string { - if page.rc.IsEmpty() { +func (page RequestHistoryListResultPage) Values() []RequestHistory { + if page.rhlr.IsEmpty() { return nil } - return *page.rc.Value + return *page.rhlr.Value } -// Creates a new instance of the ResourceCollectionPage type. -func NewResourceCollectionPage(cur ResourceCollection, getNextPage func(context.Context, ResourceCollection) (ResourceCollection, error)) ResourceCollectionPage { - return ResourceCollectionPage{ - fn: getNextPage, - rc: cur, +// Creates a new instance of the RequestHistoryListResultPage type. +func NewRequestHistoryListResultPage(cur RequestHistoryListResult, getNextPage func(context.Context, RequestHistoryListResult) (RequestHistoryListResult, error)) RequestHistoryListResultPage { + return RequestHistoryListResultPage{ + fn: getNextPage, + rhlr: cur, } } -// ResourceHealthMetadata used for getting ResourceHealthCheck settings. -type ResourceHealthMetadata struct { - autorest.Response `json:"-"` - // ResourceHealthMetadataProperties - ResourceHealthMetadata resource specific properties - *ResourceHealthMetadataProperties `json:"properties,omitempty"` +// RequestHistoryProperties the request history. +type RequestHistoryProperties struct { + // StartTime - The time the request started. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The time the request ended. + EndTime *date.Time `json:"endTime,omitempty"` + // Request - The request. + Request *Request `json:"request,omitempty"` + // Response - The response. + Response *Response `json:"response,omitempty"` +} + +// RequestsBasedTrigger trigger based on total requests. +type RequestsBasedTrigger struct { + // Count - Request Count. + Count *int32 `json:"count,omitempty"` + // TimeInterval - Time interval. + TimeInterval *string `json:"timeInterval,omitempty"` +} + +// Resource azure resource. This resource is tracked in Azure Resource Manager +type Resource struct { // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. Name *string `json:"name,omitempty"` // Kind - Kind of resource. Kind *string `json:"kind,omitempty"` + // Location - Resource Location. + Location *string `json:"location,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for ResourceHealthMetadata. -func (rhm ResourceHealthMetadata) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for Resource. +func (r Resource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if rhm.ResourceHealthMetadataProperties != nil { - objectMap["properties"] = rhm.ResourceHealthMetadataProperties - } - if rhm.Kind != nil { - objectMap["kind"] = rhm.Kind + if r.Kind != nil { + objectMap["kind"] = r.Kind } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ResourceHealthMetadata struct. -func (rhm *ResourceHealthMetadata) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err + if r.Location != nil { + objectMap["location"] = r.Location } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var resourceHealthMetadataProperties ResourceHealthMetadataProperties - err = json.Unmarshal(*v, &resourceHealthMetadataProperties) - if err != nil { - return err - } - rhm.ResourceHealthMetadataProperties = &resourceHealthMetadataProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - rhm.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - rhm.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - rhm.Kind = &kind - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - rhm.Type = &typeVar - } - } + if r.Tags != nil { + objectMap["tags"] = r.Tags } - - return nil + return json.Marshal(objectMap) } -// ResourceHealthMetadataCollection collection of resource health metadata. -type ResourceHealthMetadataCollection struct { +// ResourceCollection collection of resources. +type ResourceCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]ResourceHealthMetadata `json:"value,omitempty"` + Value *[]string `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for ResourceHealthMetadataCollection. -func (rhmc ResourceHealthMetadataCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for ResourceCollection. +func (rc ResourceCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if rhmc.Value != nil { - objectMap["value"] = rhmc.Value + if rc.Value != nil { + objectMap["value"] = rc.Value } return json.Marshal(objectMap) } -// ResourceHealthMetadataCollectionIterator provides access to a complete listing of ResourceHealthMetadata -// values. -type ResourceHealthMetadataCollectionIterator struct { +// ResourceCollectionIterator provides access to a complete listing of string values. +type ResourceCollectionIterator struct { i int - page ResourceHealthMetadataCollectionPage + page ResourceCollectionPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ResourceHealthMetadataCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *ResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ResourceHealthMetadataCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceCollectionIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -21557,67 +22697,67 @@ func (iter *ResourceHealthMetadataCollectionIterator) NextWithContext(ctx contex // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ResourceHealthMetadataCollectionIterator) Next() error { +func (iter *ResourceCollectionIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ResourceHealthMetadataCollectionIterator) NotDone() bool { +func (iter ResourceCollectionIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ResourceHealthMetadataCollectionIterator) Response() ResourceHealthMetadataCollection { +func (iter ResourceCollectionIterator) Response() ResourceCollection { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ResourceHealthMetadataCollectionIterator) Value() ResourceHealthMetadata { +func (iter ResourceCollectionIterator) Value() string { if !iter.page.NotDone() { - return ResourceHealthMetadata{} + return "" } return iter.page.Values()[iter.i] } -// Creates a new instance of the ResourceHealthMetadataCollectionIterator type. -func NewResourceHealthMetadataCollectionIterator(page ResourceHealthMetadataCollectionPage) ResourceHealthMetadataCollectionIterator { - return ResourceHealthMetadataCollectionIterator{page: page} +// Creates a new instance of the ResourceCollectionIterator type. +func NewResourceCollectionIterator(page ResourceCollectionPage) ResourceCollectionIterator { + return ResourceCollectionIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (rhmc ResourceHealthMetadataCollection) IsEmpty() bool { - return rhmc.Value == nil || len(*rhmc.Value) == 0 +func (rc ResourceCollection) IsEmpty() bool { + return rc.Value == nil || len(*rc.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (rhmc ResourceHealthMetadataCollection) hasNextLink() bool { - return rhmc.NextLink != nil && len(*rhmc.NextLink) != 0 +func (rc ResourceCollection) hasNextLink() bool { + return rc.NextLink != nil && len(*rc.NextLink) != 0 } -// resourceHealthMetadataCollectionPreparer prepares a request to retrieve the next set of results. +// resourceCollectionPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (rhmc ResourceHealthMetadataCollection) resourceHealthMetadataCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !rhmc.hasNextLink() { +func (rc ResourceCollection) resourceCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !rc.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(rhmc.NextLink))) + autorest.WithBaseURL(to.String(rc.NextLink))) } -// ResourceHealthMetadataCollectionPage contains a page of ResourceHealthMetadata values. -type ResourceHealthMetadataCollectionPage struct { - fn func(context.Context, ResourceHealthMetadataCollection) (ResourceHealthMetadataCollection, error) - rhmc ResourceHealthMetadataCollection +// ResourceCollectionPage contains a page of string values. +type ResourceCollectionPage struct { + fn func(context.Context, ResourceCollection) (ResourceCollection, error) + rc ResourceCollection } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ResourceHealthMetadataCollectionPage) NextWithContext(ctx context.Context) (err error) { +func (page *ResourceCollectionPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ResourceHealthMetadataCollectionPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceCollectionPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -21627,11 +22767,11 @@ func (page *ResourceHealthMetadataCollectionPage) NextWithContext(ctx context.Co }() } for { - next, err := page.fn(ctx, page.rhmc) + next, err := page.fn(ctx, page.rc) if err != nil { return err } - page.rhmc = next + page.rc = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -21642,62 +22782,41 @@ func (page *ResourceHealthMetadataCollectionPage) NextWithContext(ctx context.Co // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *ResourceHealthMetadataCollectionPage) Next() error { +func (page *ResourceCollectionPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ResourceHealthMetadataCollectionPage) NotDone() bool { - return !page.rhmc.IsEmpty() +func (page ResourceCollectionPage) NotDone() bool { + return !page.rc.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ResourceHealthMetadataCollectionPage) Response() ResourceHealthMetadataCollection { - return page.rhmc +func (page ResourceCollectionPage) Response() ResourceCollection { + return page.rc } // Values returns the slice of values for the current page or nil if there are no values. -func (page ResourceHealthMetadataCollectionPage) Values() []ResourceHealthMetadata { - if page.rhmc.IsEmpty() { +func (page ResourceCollectionPage) Values() []string { + if page.rc.IsEmpty() { return nil } - return *page.rhmc.Value + return *page.rc.Value } -// Creates a new instance of the ResourceHealthMetadataCollectionPage type. -func NewResourceHealthMetadataCollectionPage(cur ResourceHealthMetadataCollection, getNextPage func(context.Context, ResourceHealthMetadataCollection) (ResourceHealthMetadataCollection, error)) ResourceHealthMetadataCollectionPage { - return ResourceHealthMetadataCollectionPage{ - fn: getNextPage, - rhmc: cur, +// Creates a new instance of the ResourceCollectionPage type. +func NewResourceCollectionPage(cur ResourceCollection, getNextPage func(context.Context, ResourceCollection) (ResourceCollection, error)) ResourceCollectionPage { + return ResourceCollectionPage{ + fn: getNextPage, + rc: cur, } } -// ResourceHealthMetadataProperties resourceHealthMetadata resource specific properties -type ResourceHealthMetadataProperties struct { - // Category - The category that the resource matches in the RHC Policy File - Category *string `json:"category,omitempty"` - // SignalAvailability - Is there a health signal for the resource - SignalAvailability *bool `json:"signalAvailability,omitempty"` -} - -// ResourceMetricAvailability metrics availability and retention. -type ResourceMetricAvailability struct { - // TimeGrain - READ-ONLY; Time grain . - TimeGrain *string `json:"timeGrain,omitempty"` - // Retention - READ-ONLY; Retention period for the current time grain. - Retention *string `json:"retention,omitempty"` -} - -// MarshalJSON is the custom marshaler for ResourceMetricAvailability. -func (rma ResourceMetricAvailability) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ResourceMetricDefinition metadata for the metrics. -type ResourceMetricDefinition struct { - // ResourceMetricDefinitionProperties - ResourceMetricDefinition resource specific properties - *ResourceMetricDefinitionProperties `json:"properties,omitempty"` +// ResourceHealthMetadata used for getting ResourceHealthCheck settings. +type ResourceHealthMetadata struct { + autorest.Response `json:"-"` + // ResourceHealthMetadataProperties - ResourceHealthMetadata resource specific properties + *ResourceHealthMetadataProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -21708,20 +22827,20 @@ type ResourceMetricDefinition struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for ResourceMetricDefinition. -func (rmd ResourceMetricDefinition) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for ResourceHealthMetadata. +func (rhm ResourceHealthMetadata) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if rmd.ResourceMetricDefinitionProperties != nil { - objectMap["properties"] = rmd.ResourceMetricDefinitionProperties + if rhm.ResourceHealthMetadataProperties != nil { + objectMap["properties"] = rhm.ResourceHealthMetadataProperties } - if rmd.Kind != nil { - objectMap["kind"] = rmd.Kind + if rhm.Kind != nil { + objectMap["kind"] = rhm.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ResourceMetricDefinition struct. -func (rmd *ResourceMetricDefinition) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for ResourceHealthMetadata struct. +func (rhm *ResourceHealthMetadata) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -21731,12 +22850,12 @@ func (rmd *ResourceMetricDefinition) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var resourceMetricDefinitionProperties ResourceMetricDefinitionProperties - err = json.Unmarshal(*v, &resourceMetricDefinitionProperties) + var resourceHealthMetadataProperties ResourceHealthMetadataProperties + err = json.Unmarshal(*v, &resourceHealthMetadataProperties) if err != nil { return err } - rmd.ResourceMetricDefinitionProperties = &resourceMetricDefinitionProperties + rhm.ResourceHealthMetadataProperties = &resourceHealthMetadataProperties } case "id": if v != nil { @@ -21745,7 +22864,7 @@ func (rmd *ResourceMetricDefinition) UnmarshalJSON(body []byte) error { if err != nil { return err } - rmd.ID = &ID + rhm.ID = &ID } case "name": if v != nil { @@ -21754,7 +22873,7 @@ func (rmd *ResourceMetricDefinition) UnmarshalJSON(body []byte) error { if err != nil { return err } - rmd.Name = &name + rhm.Name = &name } case "kind": if v != nil { @@ -21763,7 +22882,7 @@ func (rmd *ResourceMetricDefinition) UnmarshalJSON(body []byte) error { if err != nil { return err } - rmd.Kind = &kind + rhm.Kind = &kind } case "type": if v != nil { @@ -21772,7 +22891,7 @@ func (rmd *ResourceMetricDefinition) UnmarshalJSON(body []byte) error { if err != nil { return err } - rmd.Type = &typeVar + rhm.Type = &typeVar } } } @@ -21780,36 +22899,313 @@ func (rmd *ResourceMetricDefinition) UnmarshalJSON(body []byte) error { return nil } -// ResourceMetricDefinitionCollection collection of metric definitions. -type ResourceMetricDefinitionCollection struct { +// ResourceHealthMetadataCollection collection of resource health metadata. +type ResourceHealthMetadataCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]ResourceMetricDefinition `json:"value,omitempty"` + Value *[]ResourceHealthMetadata `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for ResourceMetricDefinitionCollection. -func (rmdc ResourceMetricDefinitionCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for ResourceHealthMetadataCollection. +func (rhmc ResourceHealthMetadataCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if rmdc.Value != nil { - objectMap["value"] = rmdc.Value + if rhmc.Value != nil { + objectMap["value"] = rhmc.Value } return json.Marshal(objectMap) } -// ResourceMetricDefinitionCollectionIterator provides access to a complete listing of -// ResourceMetricDefinition values. -type ResourceMetricDefinitionCollectionIterator struct { +// ResourceHealthMetadataCollectionIterator provides access to a complete listing of ResourceHealthMetadata +// values. +type ResourceHealthMetadataCollectionIterator struct { i int - page ResourceMetricDefinitionCollectionPage + page ResourceHealthMetadataCollectionPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ResourceMetricDefinitionCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *ResourceHealthMetadataCollectionIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ResourceMetricDefinitionCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceHealthMetadataCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ResourceHealthMetadataCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ResourceHealthMetadataCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ResourceHealthMetadataCollectionIterator) Response() ResourceHealthMetadataCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ResourceHealthMetadataCollectionIterator) Value() ResourceHealthMetadata { + if !iter.page.NotDone() { + return ResourceHealthMetadata{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ResourceHealthMetadataCollectionIterator type. +func NewResourceHealthMetadataCollectionIterator(page ResourceHealthMetadataCollectionPage) ResourceHealthMetadataCollectionIterator { + return ResourceHealthMetadataCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rhmc ResourceHealthMetadataCollection) IsEmpty() bool { + return rhmc.Value == nil || len(*rhmc.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (rhmc ResourceHealthMetadataCollection) hasNextLink() bool { + return rhmc.NextLink != nil && len(*rhmc.NextLink) != 0 +} + +// resourceHealthMetadataCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rhmc ResourceHealthMetadataCollection) resourceHealthMetadataCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !rhmc.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rhmc.NextLink))) +} + +// ResourceHealthMetadataCollectionPage contains a page of ResourceHealthMetadata values. +type ResourceHealthMetadataCollectionPage struct { + fn func(context.Context, ResourceHealthMetadataCollection) (ResourceHealthMetadataCollection, error) + rhmc ResourceHealthMetadataCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ResourceHealthMetadataCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceHealthMetadataCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.rhmc) + if err != nil { + return err + } + page.rhmc = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ResourceHealthMetadataCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ResourceHealthMetadataCollectionPage) NotDone() bool { + return !page.rhmc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ResourceHealthMetadataCollectionPage) Response() ResourceHealthMetadataCollection { + return page.rhmc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ResourceHealthMetadataCollectionPage) Values() []ResourceHealthMetadata { + if page.rhmc.IsEmpty() { + return nil + } + return *page.rhmc.Value +} + +// Creates a new instance of the ResourceHealthMetadataCollectionPage type. +func NewResourceHealthMetadataCollectionPage(cur ResourceHealthMetadataCollection, getNextPage func(context.Context, ResourceHealthMetadataCollection) (ResourceHealthMetadataCollection, error)) ResourceHealthMetadataCollectionPage { + return ResourceHealthMetadataCollectionPage{ + fn: getNextPage, + rhmc: cur, + } +} + +// ResourceHealthMetadataProperties resourceHealthMetadata resource specific properties +type ResourceHealthMetadataProperties struct { + // Category - The category that the resource matches in the RHC Policy File + Category *string `json:"category,omitempty"` + // SignalAvailability - Is there a health signal for the resource + SignalAvailability *bool `json:"signalAvailability,omitempty"` +} + +// ResourceMetricAvailability metrics availability and retention. +type ResourceMetricAvailability struct { + // TimeGrain - READ-ONLY; Time grain . + TimeGrain *string `json:"timeGrain,omitempty"` + // Retention - READ-ONLY; Retention period for the current time grain. + Retention *string `json:"retention,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceMetricAvailability. +func (rma ResourceMetricAvailability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ResourceMetricDefinition metadata for the metrics. +type ResourceMetricDefinition struct { + // ResourceMetricDefinitionProperties - ResourceMetricDefinition resource specific properties + *ResourceMetricDefinitionProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceMetricDefinition. +func (rmd ResourceMetricDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rmd.ResourceMetricDefinitionProperties != nil { + objectMap["properties"] = rmd.ResourceMetricDefinitionProperties + } + if rmd.Kind != nil { + objectMap["kind"] = rmd.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ResourceMetricDefinition struct. +func (rmd *ResourceMetricDefinition) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var resourceMetricDefinitionProperties ResourceMetricDefinitionProperties + err = json.Unmarshal(*v, &resourceMetricDefinitionProperties) + if err != nil { + return err + } + rmd.ResourceMetricDefinitionProperties = &resourceMetricDefinitionProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rmd.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rmd.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + rmd.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rmd.Type = &typeVar + } + } + } + + return nil +} + +// ResourceMetricDefinitionCollection collection of metric definitions. +type ResourceMetricDefinitionCollection struct { + autorest.Response `json:"-"` + // Value - Collection of resources. + Value *[]ResourceMetricDefinition `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceMetricDefinitionCollection. +func (rmdc ResourceMetricDefinitionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rmdc.Value != nil { + objectMap["value"] = rmdc.Value + } + return json.Marshal(objectMap) +} + +// ResourceMetricDefinitionCollectionIterator provides access to a complete listing of +// ResourceMetricDefinition values. +type ResourceMetricDefinitionCollectionIterator struct { + i int + page ResourceMetricDefinitionCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ResourceMetricDefinitionCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceMetricDefinitionCollectionIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -21990,6 +23386,35 @@ type ResourceNameAvailabilityRequest struct { IsFqdn *bool `json:"isFqdn,omitempty"` } +// ResourceReference the resource reference. +type ResourceReference struct { + // ID - The resource id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Gets the resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Gets the resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceReference. +func (rr ResourceReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rr.ID != nil { + objectMap["id"] = rr.ID + } + return json.Marshal(objectMap) +} + +// Response a response. +type Response struct { + // Headers - A list of all the headers attached to the response. + Headers interface{} `json:"headers,omitempty"` + // StatusCode - The status code of the response. + StatusCode *int32 `json:"statusCode,omitempty"` + // BodyLink - Details on the location of the body content. + BodyLink *ContentLink `json:"bodyLink,omitempty"` +} + // ResponseMessageEnvelopeRemotePrivateEndpointConnection message envelope that contains the common Azure // resource manager properties and the resource provider specific content. type ResponseMessageEnvelopeRemotePrivateEndpointConnection struct { @@ -22027,201 +23452,1477 @@ func (rmeRpec ResponseMessageEnvelopeRemotePrivateEndpointConnection) MarshalJSO if rmeRpec.ID != nil { objectMap["id"] = rmeRpec.ID } - if rmeRpec.Name != nil { - objectMap["name"] = rmeRpec.Name + if rmeRpec.Name != nil { + objectMap["name"] = rmeRpec.Name + } + if rmeRpec.Type != nil { + objectMap["type"] = rmeRpec.Type + } + if rmeRpec.Location != nil { + objectMap["location"] = rmeRpec.Location + } + if rmeRpec.Tags != nil { + objectMap["tags"] = rmeRpec.Tags + } + if rmeRpec.Plan != nil { + objectMap["plan"] = rmeRpec.Plan + } + if rmeRpec.Properties != nil { + objectMap["properties"] = rmeRpec.Properties + } + if rmeRpec.Sku != nil { + objectMap["sku"] = rmeRpec.Sku + } + if rmeRpec.Status != nil { + objectMap["status"] = rmeRpec.Status + } + if rmeRpec.Error != nil { + objectMap["error"] = rmeRpec.Error + } + if rmeRpec.Identity != nil { + objectMap["identity"] = rmeRpec.Identity + } + if rmeRpec.Zones != nil { + objectMap["zones"] = rmeRpec.Zones + } + return json.Marshal(objectMap) +} + +// ResponseMetaData ... +type ResponseMetaData struct { + // DataSource - Source of the Data + DataSource *DataSource `json:"dataSource,omitempty"` +} + +// RestoreRequest description of a restore request. +type RestoreRequest struct { + autorest.Response `json:"-"` + // RestoreRequestProperties - RestoreRequest resource specific properties + *RestoreRequestProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for RestoreRequest. +func (rr RestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rr.RestoreRequestProperties != nil { + objectMap["properties"] = rr.RestoreRequestProperties + } + if rr.Kind != nil { + objectMap["kind"] = rr.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RestoreRequest struct. +func (rr *RestoreRequest) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var restoreRequestProperties RestoreRequestProperties + err = json.Unmarshal(*v, &restoreRequestProperties) + if err != nil { + return err + } + rr.RestoreRequestProperties = &restoreRequestProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rr.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + rr.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rr.Type = &typeVar + } + } + } + + return nil +} + +// RestoreRequestProperties restoreRequest resource specific properties +type RestoreRequestProperties struct { + // StorageAccountURL - SAS URL to the container. + StorageAccountURL *string `json:"storageAccountUrl,omitempty"` + // BlobName - Name of a blob which contains the backup. + BlobName *string `json:"blobName,omitempty"` + // Overwrite - true if the restore operation can overwrite target app; otherwise, false. true is needed if trying to restore over an existing app. + Overwrite *bool `json:"overwrite,omitempty"` + // SiteName - Name of an app. + SiteName *string `json:"siteName,omitempty"` + // Databases - Collection of databases which should be restored. This list has to match the list of databases included in the backup. + Databases *[]DatabaseBackupSetting `json:"databases,omitempty"` + // IgnoreConflictingHostNames - Changes a logic when restoring an app with custom domains. true to remove custom domains automatically. If false, custom domains are added to + // the app's object when it is being restored, but that might fail due to conflicts during the operation. + IgnoreConflictingHostNames *bool `json:"ignoreConflictingHostNames,omitempty"` + // IgnoreDatabases - Ignore the databases and only restore the site content + IgnoreDatabases *bool `json:"ignoreDatabases,omitempty"` + // AppServicePlan - Specify app service plan that will own restored site. + AppServicePlan *string `json:"appServicePlan,omitempty"` + // OperationType - Operation type. Possible values include: 'BackupRestoreOperationTypeDefault', 'BackupRestoreOperationTypeClone', 'BackupRestoreOperationTypeRelocation', 'BackupRestoreOperationTypeSnapshot', 'BackupRestoreOperationTypeCloudFS' + OperationType BackupRestoreOperationType `json:"operationType,omitempty"` + // AdjustConnectionStrings - true if SiteConfig.ConnectionStrings should be set in new app; otherwise, false. + AdjustConnectionStrings *bool `json:"adjustConnectionStrings,omitempty"` + // HostingEnvironment - App Service Environment name, if needed (only when restoring an app to an App Service Environment). + HostingEnvironment *string `json:"hostingEnvironment,omitempty"` +} + +// RetryHistory the retry history. +type RetryHistory struct { + // StartTime - Gets the start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - Gets the end time. + EndTime *date.Time `json:"endTime,omitempty"` + // Code - Gets the status code. + Code *string `json:"code,omitempty"` + // ClientRequestID - Gets the client request Id. + ClientRequestID *string `json:"clientRequestId,omitempty"` + // ServiceRequestID - Gets the service request Id. + ServiceRequestID *string `json:"serviceRequestId,omitempty"` + // Error - Gets the error response. + Error *ErrorResponse `json:"error,omitempty"` +} + +// Revision container App Revision. +type Revision struct { + autorest.Response `json:"-"` + // RevisionProperties - Revision resource specific properties + *RevisionProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Location - Resource Location. + Location *string `json:"location,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for Revision. +func (r Revision) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if r.RevisionProperties != nil { + objectMap["properties"] = r.RevisionProperties + } + if r.Kind != nil { + objectMap["kind"] = r.Kind + } + if r.Location != nil { + objectMap["location"] = r.Location + } + if r.Tags != nil { + objectMap["tags"] = r.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Revision struct. +func (r *Revision) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var revisionProperties RevisionProperties + err = json.Unmarshal(*v, &revisionProperties) + if err != nil { + return err + } + r.RevisionProperties = &revisionProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + r.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + r.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + r.Kind = &kind + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + r.Location = &location + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + r.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + r.Tags = tags + } + } + } + + return nil +} + +// RevisionCollection container App Revisions collection ARM resource. +type RevisionCollection struct { + autorest.Response `json:"-"` + // Value - Collection of resources. + Value *[]Revision `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for RevisionCollection. +func (rc RevisionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rc.Value != nil { + objectMap["value"] = rc.Value + } + return json.Marshal(objectMap) +} + +// RevisionCollectionIterator provides access to a complete listing of Revision values. +type RevisionCollectionIterator struct { + i int + page RevisionCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *RevisionCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RevisionCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *RevisionCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter RevisionCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter RevisionCollectionIterator) Response() RevisionCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter RevisionCollectionIterator) Value() Revision { + if !iter.page.NotDone() { + return Revision{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the RevisionCollectionIterator type. +func NewRevisionCollectionIterator(page RevisionCollectionPage) RevisionCollectionIterator { + return RevisionCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rc RevisionCollection) IsEmpty() bool { + return rc.Value == nil || len(*rc.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (rc RevisionCollection) hasNextLink() bool { + return rc.NextLink != nil && len(*rc.NextLink) != 0 +} + +// revisionCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rc RevisionCollection) revisionCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !rc.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rc.NextLink))) +} + +// RevisionCollectionPage contains a page of Revision values. +type RevisionCollectionPage struct { + fn func(context.Context, RevisionCollection) (RevisionCollection, error) + rc RevisionCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *RevisionCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RevisionCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.rc) + if err != nil { + return err + } + page.rc = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *RevisionCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page RevisionCollectionPage) NotDone() bool { + return !page.rc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page RevisionCollectionPage) Response() RevisionCollection { + return page.rc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page RevisionCollectionPage) Values() []Revision { + if page.rc.IsEmpty() { + return nil + } + return *page.rc.Value +} + +// Creates a new instance of the RevisionCollectionPage type. +func NewRevisionCollectionPage(cur RevisionCollection, getNextPage func(context.Context, RevisionCollection) (RevisionCollection, error)) RevisionCollectionPage { + return RevisionCollectionPage{ + fn: getNextPage, + rc: cur, + } +} + +// RevisionProperties revision resource specific properties +type RevisionProperties struct { + // CreatedTime - READ-ONLY; Timestamp describing when the revision was created + // by controller + CreatedTime *date.Time `json:"createdTime,omitempty"` + // Fqdn - READ-ONLY; Fully qualified domain name of the revision + Fqdn *string `json:"fqdn,omitempty"` + // Template - READ-ONLY; Container App Revision Template with all possible settings and the + // defaults if user did not provide them. The defaults are populated + // as they were at the creation time + Template *Template `json:"template,omitempty"` + // Active - READ-ONLY; Boolean describing if the Revision is Active + Active *bool `json:"active,omitempty"` + // Replicas - READ-ONLY; Number of pods currently running for this revision + Replicas *int32 `json:"replicas,omitempty"` + // TrafficWeight - READ-ONLY; Traffic weight assigned to this revision + TrafficWeight *int32 `json:"trafficWeight,omitempty"` + // ProvisioningError - READ-ONLY; Optional Field - Platform Error Message + ProvisioningError *string `json:"provisioningError,omitempty"` + // HealthState - READ-ONLY; Current health State of the revision. Possible values include: 'RevisionHealthStateHealthy', 'RevisionHealthStateUnhealthy', 'RevisionHealthStateNone' + HealthState RevisionHealthState `json:"healthState,omitempty"` + // ProvisioningState - READ-ONLY; Current provisioning State of the revision. Possible values include: 'RevisionProvisioningStateProvisioning', 'RevisionProvisioningStateProvisioned', 'RevisionProvisioningStateFailed', 'RevisionProvisioningStateDeprovisioning', 'RevisionProvisioningStateDeprovisioned' + ProvisioningState RevisionProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for RevisionProperties. +func (r RevisionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// RunActionCorrelation the workflow run action correlation properties. +type RunActionCorrelation struct { + // ActionTrackingID - The action tracking identifier. + ActionTrackingID *string `json:"actionTrackingId,omitempty"` + // ClientTrackingID - The client tracking identifier. + ClientTrackingID *string `json:"clientTrackingId,omitempty"` + // ClientKeywords - The client keywords. + ClientKeywords *[]string `json:"clientKeywords,omitempty"` +} + +// RunCorrelation the correlation properties. +type RunCorrelation struct { + // ClientTrackingID - The client tracking identifier. + ClientTrackingID *string `json:"clientTrackingId,omitempty"` + // ClientKeywords - The client keywords. + ClientKeywords *[]string `json:"clientKeywords,omitempty"` +} + +// SampleUtterance sample utterance. +type SampleUtterance struct { + // Text - Text attribute of sample utterance. + Text *string `json:"text,omitempty"` + // Links - Links attribute of sample utterance. + Links *[]string `json:"links,omitempty"` + // Qid - Question id of sample utterance (for stackoverflow questions titles). + Qid *string `json:"qid,omitempty"` +} + +// Scale container App scaling configurations. +type Scale struct { + // MinReplicas - Optional. Minimum number of container replicas. + MinReplicas *int32 `json:"minReplicas,omitempty"` + // MaxReplicas - Optional. Maximum number of container replicas. Defaults to 10 if not set. + MaxReplicas *int32 `json:"maxReplicas,omitempty"` + // Rules - Scaling rules. + Rules *[]ScaleRule `json:"rules,omitempty"` +} + +// ScaleRule container App container scaling rule. +type ScaleRule struct { + // Name - Scale Rule Name + Name *string `json:"name,omitempty"` + // AzureQueue - Azure Queue based scaling. + AzureQueue *QueueScaleRule `json:"azureQueue,omitempty"` + // Custom - Custom scale rule. + Custom *CustomScaleRule `json:"custom,omitempty"` + // HTTP - HTTP requests based scaling. + HTTP *HTTPScaleRule `json:"http,omitempty"` +} + +// ScaleRuleAuth auth Secrets for Container App Scale Rule +type ScaleRuleAuth struct { + // SecretRef - Name of the Container App secret from which to pull the auth params. + SecretRef *string `json:"secretRef,omitempty"` + // TriggerParameter - Trigger Parameter that uses the secret + TriggerParameter *string `json:"triggerParameter,omitempty"` +} + +// Secret container App Secret. +type Secret struct { + // Name - Secret Name. + Name *string `json:"name,omitempty"` + // Value - Secret Value. + Value *string `json:"value,omitempty"` +} + +// SecretsCollection container App Secrets Collection ARM resource. +type SecretsCollection struct { + autorest.Response `json:"-"` + // Value - Collection of resources. + Value *[]ContainerAppSecret `json:"value,omitempty"` +} + +// ServiceSpecification resource metrics service provided by Microsoft.Insights resource provider. +type ServiceSpecification struct { + MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"` + LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"` +} + +// SetObject ... +type SetObject struct { + autorest.Response `json:"-"` + Value interface{} `json:"value,omitempty"` +} + +// Site a web app, a mobile app backend, or an API app. +type Site struct { + autorest.Response `json:"-"` + // SiteProperties - Site resource specific properties + *SiteProperties `json:"properties,omitempty"` + Identity *ManagedServiceIdentity `json:"identity,omitempty"` + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Location - Resource Location. + Location *string `json:"location,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for Site. +func (s Site) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if s.SiteProperties != nil { + objectMap["properties"] = s.SiteProperties + } + if s.Identity != nil { + objectMap["identity"] = s.Identity + } + if s.ExtendedLocation != nil { + objectMap["extendedLocation"] = s.ExtendedLocation + } + if s.Kind != nil { + objectMap["kind"] = s.Kind + } + if s.Location != nil { + objectMap["location"] = s.Location + } + if s.Tags != nil { + objectMap["tags"] = s.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Site struct. +func (s *Site) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var siteProperties SiteProperties + err = json.Unmarshal(*v, &siteProperties) + if err != nil { + return err + } + s.SiteProperties = &siteProperties + } + case "identity": + if v != nil { + var identity ManagedServiceIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + s.Identity = &identity + } + case "extendedLocation": + if v != nil { + var extendedLocation ExtendedLocation + err = json.Unmarshal(*v, &extendedLocation) + if err != nil { + return err + } + s.ExtendedLocation = &extendedLocation + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + s.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + s.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + s.Kind = &kind + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + s.Location = &location + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + s.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + s.Tags = tags + } + } + } + + return nil +} + +// SiteAuthSettings configuration settings for the Azure App Service Authentication / Authorization +// feature. +type SiteAuthSettings struct { + autorest.Response `json:"-"` + // SiteAuthSettingsProperties - SiteAuthSettings resource specific properties + *SiteAuthSettingsProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SiteAuthSettings. +func (sas SiteAuthSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sas.SiteAuthSettingsProperties != nil { + objectMap["properties"] = sas.SiteAuthSettingsProperties + } + if sas.Kind != nil { + objectMap["kind"] = sas.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SiteAuthSettings struct. +func (sas *SiteAuthSettings) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var siteAuthSettingsProperties SiteAuthSettingsProperties + err = json.Unmarshal(*v, &siteAuthSettingsProperties) + if err != nil { + return err + } + sas.SiteAuthSettingsProperties = &siteAuthSettingsProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sas.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sas.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + sas.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sas.Type = &typeVar + } + } + } + + return nil +} + +// SiteAuthSettingsProperties siteAuthSettings resource specific properties +type SiteAuthSettingsProperties struct { + // Enabled - true if the Authentication / Authorization feature is enabled for the current app; otherwise, false. + Enabled *bool `json:"enabled,omitempty"` + // RuntimeVersion - The RuntimeVersion of the Authentication / Authorization feature in use for the current app. + // The setting in this value can control the behavior of certain features in the Authentication / Authorization module. + RuntimeVersion *string `json:"runtimeVersion,omitempty"` + // UnauthenticatedClientAction - The action to take when an unauthenticated client attempts to access the app. Possible values include: 'UnauthenticatedClientActionRedirectToLoginPage', 'UnauthenticatedClientActionAllowAnonymous' + UnauthenticatedClientAction UnauthenticatedClientAction `json:"unauthenticatedClientAction,omitempty"` + // TokenStoreEnabled - true to durably store platform-specific security tokens that are obtained during login flows; otherwise, false. + // The default is false. + TokenStoreEnabled *bool `json:"tokenStoreEnabled,omitempty"` + // AllowedExternalRedirectUrls - External URLs that can be redirected to as part of logging in or logging out of the app. Note that the query string part of the URL is ignored. + // This is an advanced setting typically only needed by Windows Store application backends. + // Note that URLs within the current domain are always implicitly allowed. + AllowedExternalRedirectUrls *[]string `json:"allowedExternalRedirectUrls,omitempty"` + // DefaultProvider - The default authentication provider to use when multiple providers are configured. + // This setting is only needed if multiple providers are configured and the unauthenticated client + // action is set to "RedirectToLoginPage". Possible values include: 'BuiltInAuthenticationProviderAzureActiveDirectory', 'BuiltInAuthenticationProviderFacebook', 'BuiltInAuthenticationProviderGoogle', 'BuiltInAuthenticationProviderMicrosoftAccount', 'BuiltInAuthenticationProviderTwitter', 'BuiltInAuthenticationProviderGithub' + DefaultProvider BuiltInAuthenticationProvider `json:"defaultProvider,omitempty"` + // TokenRefreshExtensionHours - The number of hours after session token expiration that a session token can be used to + // call the token refresh API. The default is 72 hours. + TokenRefreshExtensionHours *float64 `json:"tokenRefreshExtensionHours,omitempty"` + // ClientID - The Client ID of this relying party application, known as the client_id. + // This setting is required for enabling OpenID Connection authentication with Azure Active Directory or + // other 3rd party OpenID Connect providers. + // More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html + ClientID *string `json:"clientId,omitempty"` + // ClientSecret - The Client Secret of this relying party application (in Azure Active Directory, this is also referred to as the Key). + // This setting is optional. If no client secret is configured, the OpenID Connect implicit auth flow is used to authenticate end users. + // Otherwise, the OpenID Connect Authorization Code Flow is used to authenticate end users. + // More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html + ClientSecret *string `json:"clientSecret,omitempty"` + // ClientSecretSettingName - The app setting name that contains the client secret of the relying party application. + ClientSecretSettingName *string `json:"clientSecretSettingName,omitempty"` + // ClientSecretCertificateThumbprint - An alternative to the client secret, that is the thumbprint of a certificate used for signing purposes. This property acts as + // a replacement for the Client Secret. It is also optional. + ClientSecretCertificateThumbprint *string `json:"clientSecretCertificateThumbprint,omitempty"` + // Issuer - The OpenID Connect Issuer URI that represents the entity which issues access tokens for this application. + // When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/. + // This URI is a case-sensitive identifier for the token issuer. + // More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html + Issuer *string `json:"issuer,omitempty"` + // ValidateIssuer - Gets a value indicating whether the issuer should be a valid HTTPS url and be validated as such. + ValidateIssuer *bool `json:"validateIssuer,omitempty"` + // AllowedAudiences - Allowed audience values to consider when validating JSON Web Tokens issued by + // Azure Active Directory. Note that the ClientID value is always considered an + // allowed audience, regardless of this setting. + AllowedAudiences *[]string `json:"allowedAudiences,omitempty"` + // AdditionalLoginParams - Login parameters to send to the OpenID Connect authorization endpoint when + // a user logs in. Each parameter must be in the form "key=value". + AdditionalLoginParams *[]string `json:"additionalLoginParams,omitempty"` + // AadClaimsAuthorization - Gets a JSON string containing the Azure AD Acl settings. + AadClaimsAuthorization *string `json:"aadClaimsAuthorization,omitempty"` + // GoogleClientID - The OpenID Connect Client ID for the Google web application. + // This setting is required for enabling Google Sign-In. + // Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/ + GoogleClientID *string `json:"googleClientId,omitempty"` + // GoogleClientSecret - The client secret associated with the Google web application. + // This setting is required for enabling Google Sign-In. + // Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/ + GoogleClientSecret *string `json:"googleClientSecret,omitempty"` + // GoogleClientSecretSettingName - The app setting name that contains the client secret associated with + // the Google web application. + GoogleClientSecretSettingName *string `json:"googleClientSecretSettingName,omitempty"` + // GoogleOAuthScopes - The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. + // This setting is optional. If not specified, "openid", "profile", and "email" are used as default scopes. + // Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/ + GoogleOAuthScopes *[]string `json:"googleOAuthScopes,omitempty"` + // FacebookAppID - The App ID of the Facebook app used for login. + // This setting is required for enabling Facebook Login. + // Facebook Login documentation: https://developers.facebook.com/docs/facebook-login + FacebookAppID *string `json:"facebookAppId,omitempty"` + // FacebookAppSecret - The App Secret of the Facebook app used for Facebook Login. + // This setting is required for enabling Facebook Login. + // Facebook Login documentation: https://developers.facebook.com/docs/facebook-login + FacebookAppSecret *string `json:"facebookAppSecret,omitempty"` + // FacebookAppSecretSettingName - The app setting name that contains the app secret used for Facebook Login. + FacebookAppSecretSettingName *string `json:"facebookAppSecretSettingName,omitempty"` + // FacebookOAuthScopes - The OAuth 2.0 scopes that will be requested as part of Facebook Login authentication. + // This setting is optional. + // Facebook Login documentation: https://developers.facebook.com/docs/facebook-login + FacebookOAuthScopes *[]string `json:"facebookOAuthScopes,omitempty"` + // GitHubClientID - The Client Id of the GitHub app used for login. + // This setting is required for enabling Github login + GitHubClientID *string `json:"gitHubClientId,omitempty"` + // GitHubClientSecret - The Client Secret of the GitHub app used for Github Login. + // This setting is required for enabling Github login. + GitHubClientSecret *string `json:"gitHubClientSecret,omitempty"` + // GitHubClientSecretSettingName - The app setting name that contains the client secret of the Github + // app used for GitHub Login. + GitHubClientSecretSettingName *string `json:"gitHubClientSecretSettingName,omitempty"` + // GitHubOAuthScopes - The OAuth 2.0 scopes that will be requested as part of GitHub Login authentication. + // This setting is optional + GitHubOAuthScopes *[]string `json:"gitHubOAuthScopes,omitempty"` + // TwitterConsumerKey - The OAuth 1.0a consumer key of the Twitter application used for sign-in. + // This setting is required for enabling Twitter Sign-In. + // Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in + TwitterConsumerKey *string `json:"twitterConsumerKey,omitempty"` + // TwitterConsumerSecret - The OAuth 1.0a consumer secret of the Twitter application used for sign-in. + // This setting is required for enabling Twitter Sign-In. + // Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in + TwitterConsumerSecret *string `json:"twitterConsumerSecret,omitempty"` + // TwitterConsumerSecretSettingName - The app setting name that contains the OAuth 1.0a consumer secret of the Twitter + // application used for sign-in. + TwitterConsumerSecretSettingName *string `json:"twitterConsumerSecretSettingName,omitempty"` + // MicrosoftAccountClientID - The OAuth 2.0 client ID that was created for the app used for authentication. + // This setting is required for enabling Microsoft Account authentication. + // Microsoft Account OAuth documentation: https://dev.onedrive.com/auth/msa_oauth.htm + MicrosoftAccountClientID *string `json:"microsoftAccountClientId,omitempty"` + // MicrosoftAccountClientSecret - The OAuth 2.0 client secret that was created for the app used for authentication. + // This setting is required for enabling Microsoft Account authentication. + // Microsoft Account OAuth documentation: https://dev.onedrive.com/auth/msa_oauth.htm + MicrosoftAccountClientSecret *string `json:"microsoftAccountClientSecret,omitempty"` + // MicrosoftAccountClientSecretSettingName - The app setting name containing the OAuth 2.0 client secret that was created for the + // app used for authentication. + MicrosoftAccountClientSecretSettingName *string `json:"microsoftAccountClientSecretSettingName,omitempty"` + // MicrosoftAccountOAuthScopes - The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. + // This setting is optional. If not specified, "wl.basic" is used as the default scope. + // Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en-us/library/dn631845.aspx + MicrosoftAccountOAuthScopes *[]string `json:"microsoftAccountOAuthScopes,omitempty"` + // IsAuthFromFile - "true" if the auth config settings should be read from a file, + // "false" otherwise + IsAuthFromFile *string `json:"isAuthFromFile,omitempty"` + // AuthFilePath - The path of the config file containing auth settings. + // If the path is relative, base will the site's root directory. + AuthFilePath *string `json:"authFilePath,omitempty"` + // ConfigVersion - The ConfigVersion of the Authentication / Authorization feature in use for the current app. + // The setting in this value can control the behavior of the control plane for Authentication / Authorization. + ConfigVersion *string `json:"configVersion,omitempty"` +} + +// SiteAuthSettingsV2 configuration settings for the Azure App Service Authentication / Authorization V2 +// feature. +type SiteAuthSettingsV2 struct { + autorest.Response `json:"-"` + // SiteAuthSettingsV2Properties - SiteAuthSettingsV2 resource specific properties + *SiteAuthSettingsV2Properties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SiteAuthSettingsV2. +func (sasv SiteAuthSettingsV2) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sasv.SiteAuthSettingsV2Properties != nil { + objectMap["properties"] = sasv.SiteAuthSettingsV2Properties + } + if sasv.Kind != nil { + objectMap["kind"] = sasv.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SiteAuthSettingsV2 struct. +func (sasv *SiteAuthSettingsV2) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var siteAuthSettingsV2Properties SiteAuthSettingsV2Properties + err = json.Unmarshal(*v, &siteAuthSettingsV2Properties) + if err != nil { + return err + } + sasv.SiteAuthSettingsV2Properties = &siteAuthSettingsV2Properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sasv.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sasv.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + sasv.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sasv.Type = &typeVar + } + } + } + + return nil +} + +// SiteAuthSettingsV2Properties siteAuthSettingsV2 resource specific properties +type SiteAuthSettingsV2Properties struct { + // Platform - The configuration settings of the platform of App Service Authentication/Authorization. + Platform *AuthPlatform `json:"platform,omitempty"` + // GlobalValidation - The configuration settings that determines the validation flow of users using App Service Authentication/Authorization. + GlobalValidation *GlobalValidation `json:"globalValidation,omitempty"` + // IdentityProviders - The configuration settings of each of the identity providers used to configure App Service Authentication/Authorization. + IdentityProviders *IdentityProviders `json:"identityProviders,omitempty"` + // Login - The configuration settings of the login flow of users using App Service Authentication/Authorization. + Login *Login `json:"login,omitempty"` + // HTTPSettings - The configuration settings of the HTTP requests for authentication and authorization requests made against App Service Authentication/Authorization. + HTTPSettings *HTTPSettings `json:"httpSettings,omitempty"` +} + +// SiteCloneability represents whether or not an app is cloneable. +type SiteCloneability struct { + autorest.Response `json:"-"` + // Result - Name of app. Possible values include: 'CloneAbilityResultCloneable', 'CloneAbilityResultPartiallyCloneable', 'CloneAbilityResultNotCloneable' + Result CloneAbilityResult `json:"result,omitempty"` + // BlockingFeatures - List of features enabled on app that prevent cloning. + BlockingFeatures *[]SiteCloneabilityCriterion `json:"blockingFeatures,omitempty"` + // UnsupportedFeatures - List of features enabled on app that are non-blocking but cannot be cloned. The app can still be cloned + // but the features in this list will not be set up on cloned app. + UnsupportedFeatures *[]SiteCloneabilityCriterion `json:"unsupportedFeatures,omitempty"` + // BlockingCharacteristics - List of blocking application characteristics. + BlockingCharacteristics *[]SiteCloneabilityCriterion `json:"blockingCharacteristics,omitempty"` +} + +// SiteCloneabilityCriterion an app cloneability criterion. +type SiteCloneabilityCriterion struct { + // Name - Name of criterion. + Name *string `json:"name,omitempty"` + // Description - Description of criterion. + Description *string `json:"description,omitempty"` +} + +// SiteConfig configuration of an App Service app. +type SiteConfig struct { + // NumberOfWorkers - Number of workers. + NumberOfWorkers *int32 `json:"numberOfWorkers,omitempty"` + // DefaultDocuments - Default documents. + DefaultDocuments *[]string `json:"defaultDocuments,omitempty"` + // NetFrameworkVersion - .NET Framework version. + NetFrameworkVersion *string `json:"netFrameworkVersion,omitempty"` + // PhpVersion - Version of PHP. + PhpVersion *string `json:"phpVersion,omitempty"` + // PythonVersion - Version of Python. + PythonVersion *string `json:"pythonVersion,omitempty"` + // NodeVersion - Version of Node.js. + NodeVersion *string `json:"nodeVersion,omitempty"` + // PowerShellVersion - Version of PowerShell. + PowerShellVersion *string `json:"powerShellVersion,omitempty"` + // LinuxFxVersion - Linux App Framework and version + LinuxFxVersion *string `json:"linuxFxVersion,omitempty"` + // WindowsFxVersion - Xenon App Framework and version + WindowsFxVersion *string `json:"windowsFxVersion,omitempty"` + // RequestTracingEnabled - true if request tracing is enabled; otherwise, false. + RequestTracingEnabled *bool `json:"requestTracingEnabled,omitempty"` + // RequestTracingExpirationTime - Request tracing expiration time. + RequestTracingExpirationTime *date.Time `json:"requestTracingExpirationTime,omitempty"` + // RemoteDebuggingEnabled - true if remote debugging is enabled; otherwise, false. + RemoteDebuggingEnabled *bool `json:"remoteDebuggingEnabled,omitempty"` + // RemoteDebuggingVersion - Remote debugging version. + RemoteDebuggingVersion *string `json:"remoteDebuggingVersion,omitempty"` + // HTTPLoggingEnabled - true if HTTP logging is enabled; otherwise, false. + HTTPLoggingEnabled *bool `json:"httpLoggingEnabled,omitempty"` + // AcrUseManagedIdentityCreds - Flag to use Managed Identity Creds for ACR pull + AcrUseManagedIdentityCreds *bool `json:"acrUseManagedIdentityCreds,omitempty"` + // AcrUserManagedIdentityID - If using user managed identity, the user managed identity ClientId + AcrUserManagedIdentityID *string `json:"acrUserManagedIdentityID,omitempty"` + // LogsDirectorySizeLimit - HTTP logs directory size limit. + LogsDirectorySizeLimit *int32 `json:"logsDirectorySizeLimit,omitempty"` + // DetailedErrorLoggingEnabled - true if detailed error logging is enabled; otherwise, false. + DetailedErrorLoggingEnabled *bool `json:"detailedErrorLoggingEnabled,omitempty"` + // PublishingUsername - Publishing user name. + PublishingUsername *string `json:"publishingUsername,omitempty"` + // AppSettings - Application settings. + AppSettings *[]NameValuePair `json:"appSettings,omitempty"` + // Metadata - Application metadata. This property cannot be retrieved, since it may contain secrets. + Metadata *[]NameValuePair `json:"metadata,omitempty"` + // ConnectionStrings - Connection strings. + ConnectionStrings *[]ConnStringInfo `json:"connectionStrings,omitempty"` + // MachineKey - READ-ONLY; Site MachineKey. + MachineKey *SiteMachineKey `json:"machineKey,omitempty"` + // HandlerMappings - Handler mappings. + HandlerMappings *[]HandlerMapping `json:"handlerMappings,omitempty"` + // DocumentRoot - Document root. + DocumentRoot *string `json:"documentRoot,omitempty"` + // ScmType - SCM type. Possible values include: 'ScmTypeNone', 'ScmTypeDropbox', 'ScmTypeTfs', 'ScmTypeLocalGit', 'ScmTypeGitHub', 'ScmTypeCodePlexGit', 'ScmTypeCodePlexHg', 'ScmTypeBitbucketGit', 'ScmTypeBitbucketHg', 'ScmTypeExternalGit', 'ScmTypeExternalHg', 'ScmTypeOneDrive', 'ScmTypeVSO', 'ScmTypeVSTSRM' + ScmType ScmType `json:"scmType,omitempty"` + // Use32BitWorkerProcess - true to use 32-bit worker process; otherwise, false. + Use32BitWorkerProcess *bool `json:"use32BitWorkerProcess,omitempty"` + // WebSocketsEnabled - true if WebSocket is enabled; otherwise, false. + WebSocketsEnabled *bool `json:"webSocketsEnabled,omitempty"` + // AlwaysOn - true if Always On is enabled; otherwise, false. + AlwaysOn *bool `json:"alwaysOn,omitempty"` + // JavaVersion - Java version. + JavaVersion *string `json:"javaVersion,omitempty"` + // JavaContainer - Java container. + JavaContainer *string `json:"javaContainer,omitempty"` + // JavaContainerVersion - Java container version. + JavaContainerVersion *string `json:"javaContainerVersion,omitempty"` + // AppCommandLine - App command line to launch. + AppCommandLine *string `json:"appCommandLine,omitempty"` + // ManagedPipelineMode - Managed pipeline mode. Possible values include: 'ManagedPipelineModeIntegrated', 'ManagedPipelineModeClassic' + ManagedPipelineMode ManagedPipelineMode `json:"managedPipelineMode,omitempty"` + // VirtualApplications - Virtual applications. + VirtualApplications *[]VirtualApplication `json:"virtualApplications,omitempty"` + // LoadBalancing - Site load balancing. Possible values include: 'SiteLoadBalancingWeightedRoundRobin', 'SiteLoadBalancingLeastRequests', 'SiteLoadBalancingLeastResponseTime', 'SiteLoadBalancingWeightedTotalTraffic', 'SiteLoadBalancingRequestHash', 'SiteLoadBalancingPerSiteRoundRobin' + LoadBalancing SiteLoadBalancing `json:"loadBalancing,omitempty"` + // Experiments - This is work around for polymorphic types. + Experiments *Experiments `json:"experiments,omitempty"` + // Limits - Site limits. + Limits *SiteLimits `json:"limits,omitempty"` + // AutoHealEnabled - true if Auto Heal is enabled; otherwise, false. + AutoHealEnabled *bool `json:"autoHealEnabled,omitempty"` + // AutoHealRules - Auto Heal rules. + AutoHealRules *AutoHealRules `json:"autoHealRules,omitempty"` + // TracingOptions - Tracing options. + TracingOptions *string `json:"tracingOptions,omitempty"` + // VnetName - Virtual Network name. + VnetName *string `json:"vnetName,omitempty"` + // VnetRouteAllEnabled - 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"` + // VnetPrivatePortsCount - The number of private ports assigned to this app. These will be assigned dynamically on runtime. + VnetPrivatePortsCount *int32 `json:"vnetPrivatePortsCount,omitempty"` + // Cors - Cross-Origin Resource Sharing (CORS) settings. + Cors *CorsSettings `json:"cors,omitempty"` + // Push - Push endpoint settings. + Push *PushSettings `json:"push,omitempty"` + // APIDefinition - Information about the formal API definition for the app. + APIDefinition *APIDefinitionInfo `json:"apiDefinition,omitempty"` + // APIManagementConfig - Azure API management settings linked to the app. + APIManagementConfig *APIManagementConfig `json:"apiManagementConfig,omitempty"` + // AutoSwapSlotName - Auto-swap slot name. + AutoSwapSlotName *string `json:"autoSwapSlotName,omitempty"` + // LocalMySQLEnabled - true to enable local MySQL; otherwise, false. + LocalMySQLEnabled *bool `json:"localMySqlEnabled,omitempty"` + // ManagedServiceIdentityID - Managed Service Identity Id + ManagedServiceIdentityID *int32 `json:"managedServiceIdentityId,omitempty"` + // XManagedServiceIdentityID - Explicit Managed Service Identity Id + XManagedServiceIdentityID *int32 `json:"xManagedServiceIdentityId,omitempty"` + // KeyVaultReferenceIdentity - Identity to use for Key Vault Reference authentication. + KeyVaultReferenceIdentity *string `json:"keyVaultReferenceIdentity,omitempty"` + // IPSecurityRestrictions - IP security restrictions for main. + IPSecurityRestrictions *[]IPSecurityRestriction `json:"ipSecurityRestrictions,omitempty"` + // IPSecurityRestrictionsDefaultAction - Default action for main access restriction if no rules are matched. Possible values include: 'DefaultActionAllow', 'DefaultActionDeny' + IPSecurityRestrictionsDefaultAction DefaultAction `json:"ipSecurityRestrictionsDefaultAction,omitempty"` + // ScmIPSecurityRestrictions - IP security restrictions for scm. + ScmIPSecurityRestrictions *[]IPSecurityRestriction `json:"scmIpSecurityRestrictions,omitempty"` + // ScmIPSecurityRestrictionsDefaultAction - Default action for scm access restriction if no rules are matched. Possible values include: 'DefaultActionAllow', 'DefaultActionDeny' + ScmIPSecurityRestrictionsDefaultAction DefaultAction `json:"scmIpSecurityRestrictionsDefaultAction,omitempty"` + // ScmIPSecurityRestrictionsUseMain - IP security restrictions for scm to use main. + ScmIPSecurityRestrictionsUseMain *bool `json:"scmIpSecurityRestrictionsUseMain,omitempty"` + // HTTP20Enabled - Http20Enabled: configures a web site to allow clients to connect over http2.0 + HTTP20Enabled *bool `json:"http20Enabled,omitempty"` + // MinTLSVersion - MinTlsVersion: configures the minimum version of TLS required for SSL requests. Possible values include: 'SupportedTLSVersionsOneFullStopZero', 'SupportedTLSVersionsOneFullStopOne', 'SupportedTLSVersionsOneFullStopTwo' + MinTLSVersion SupportedTLSVersions `json:"minTlsVersion,omitempty"` + // ScmMinTLSVersion - ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. Possible values include: 'SupportedTLSVersionsOneFullStopZero', 'SupportedTLSVersionsOneFullStopOne', 'SupportedTLSVersionsOneFullStopTwo' + ScmMinTLSVersion SupportedTLSVersions `json:"scmMinTlsVersion,omitempty"` + // FtpsState - State of FTP / FTPS service. Possible values include: 'FtpsStateAllAllowed', 'FtpsStateFtpsOnly', 'FtpsStateDisabled' + FtpsState FtpsState `json:"ftpsState,omitempty"` + // PreWarmedInstanceCount - Number of preWarmed instances. + // This setting only applies to the Consumption and Elastic Plans + PreWarmedInstanceCount *int32 `json:"preWarmedInstanceCount,omitempty"` + // FunctionAppScaleLimit - Maximum number of workers that a site can scale out to. + // This setting only applies to the Consumption and Elastic Premium Plans + FunctionAppScaleLimit *int32 `json:"functionAppScaleLimit,omitempty"` + // ElasticWebAppScaleLimit - Maximum number of workers that a site can scale out to. + // This setting only applies to apps in plans where ElasticScaleEnabled is true + ElasticWebAppScaleLimit *int32 `json:"elasticWebAppScaleLimit,omitempty"` + // HealthCheckPath - Health check path + HealthCheckPath *string `json:"healthCheckPath,omitempty"` + // FunctionsRuntimeScaleMonitoringEnabled - Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled, + // the ScaleController will not monitor event sources directly, but will instead call to the + // runtime to get scale status. + FunctionsRuntimeScaleMonitoringEnabled *bool `json:"functionsRuntimeScaleMonitoringEnabled,omitempty"` + // WebsiteTimeZone - Sets the time zone a site uses for generating timestamps. Compatible with Linux and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence over this config. For Linux, expects tz database values https://www.iana.org/time-zones (for a quick reference see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, expects one of the time zones listed under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones + WebsiteTimeZone *string `json:"websiteTimeZone,omitempty"` + // MinimumElasticInstanceCount - Number of minimum instance count for a site + // This setting only applies to the Elastic Plans + MinimumElasticInstanceCount *int32 `json:"minimumElasticInstanceCount,omitempty"` + // AzureStorageAccounts - List of Azure Storage Accounts. + AzureStorageAccounts map[string]*AzureStorageInfoValue `json:"azureStorageAccounts"` + // PublicNetworkAccess - Property to allow or block all public traffic. + PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` +} + +// MarshalJSON is the custom marshaler for SiteConfig. +func (sc SiteConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sc.NumberOfWorkers != nil { + objectMap["numberOfWorkers"] = sc.NumberOfWorkers + } + if sc.DefaultDocuments != nil { + objectMap["defaultDocuments"] = sc.DefaultDocuments + } + if sc.NetFrameworkVersion != nil { + objectMap["netFrameworkVersion"] = sc.NetFrameworkVersion + } + if sc.PhpVersion != nil { + objectMap["phpVersion"] = sc.PhpVersion + } + if sc.PythonVersion != nil { + objectMap["pythonVersion"] = sc.PythonVersion + } + if sc.NodeVersion != nil { + objectMap["nodeVersion"] = sc.NodeVersion + } + if sc.PowerShellVersion != nil { + objectMap["powerShellVersion"] = sc.PowerShellVersion + } + if sc.LinuxFxVersion != nil { + objectMap["linuxFxVersion"] = sc.LinuxFxVersion + } + if sc.WindowsFxVersion != nil { + objectMap["windowsFxVersion"] = sc.WindowsFxVersion + } + if sc.RequestTracingEnabled != nil { + objectMap["requestTracingEnabled"] = sc.RequestTracingEnabled + } + if sc.RequestTracingExpirationTime != nil { + objectMap["requestTracingExpirationTime"] = sc.RequestTracingExpirationTime + } + if sc.RemoteDebuggingEnabled != nil { + objectMap["remoteDebuggingEnabled"] = sc.RemoteDebuggingEnabled + } + if sc.RemoteDebuggingVersion != nil { + objectMap["remoteDebuggingVersion"] = sc.RemoteDebuggingVersion + } + if sc.HTTPLoggingEnabled != nil { + objectMap["httpLoggingEnabled"] = sc.HTTPLoggingEnabled + } + if sc.AcrUseManagedIdentityCreds != nil { + objectMap["acrUseManagedIdentityCreds"] = sc.AcrUseManagedIdentityCreds + } + if sc.AcrUserManagedIdentityID != nil { + objectMap["acrUserManagedIdentityID"] = sc.AcrUserManagedIdentityID + } + if sc.LogsDirectorySizeLimit != nil { + objectMap["logsDirectorySizeLimit"] = sc.LogsDirectorySizeLimit + } + if sc.DetailedErrorLoggingEnabled != nil { + objectMap["detailedErrorLoggingEnabled"] = sc.DetailedErrorLoggingEnabled + } + if sc.PublishingUsername != nil { + objectMap["publishingUsername"] = sc.PublishingUsername + } + if sc.AppSettings != nil { + objectMap["appSettings"] = sc.AppSettings + } + if sc.Metadata != nil { + objectMap["metadata"] = sc.Metadata + } + if sc.ConnectionStrings != nil { + objectMap["connectionStrings"] = sc.ConnectionStrings + } + if sc.HandlerMappings != nil { + objectMap["handlerMappings"] = sc.HandlerMappings + } + if sc.DocumentRoot != nil { + objectMap["documentRoot"] = sc.DocumentRoot + } + if sc.ScmType != "" { + objectMap["scmType"] = sc.ScmType + } + if sc.Use32BitWorkerProcess != nil { + objectMap["use32BitWorkerProcess"] = sc.Use32BitWorkerProcess + } + if sc.WebSocketsEnabled != nil { + objectMap["webSocketsEnabled"] = sc.WebSocketsEnabled + } + if sc.AlwaysOn != nil { + objectMap["alwaysOn"] = sc.AlwaysOn + } + if sc.JavaVersion != nil { + objectMap["javaVersion"] = sc.JavaVersion + } + if sc.JavaContainer != nil { + objectMap["javaContainer"] = sc.JavaContainer + } + if sc.JavaContainerVersion != nil { + objectMap["javaContainerVersion"] = sc.JavaContainerVersion + } + if sc.AppCommandLine != nil { + objectMap["appCommandLine"] = sc.AppCommandLine + } + if sc.ManagedPipelineMode != "" { + objectMap["managedPipelineMode"] = sc.ManagedPipelineMode + } + if sc.VirtualApplications != nil { + objectMap["virtualApplications"] = sc.VirtualApplications + } + if sc.LoadBalancing != "" { + objectMap["loadBalancing"] = sc.LoadBalancing + } + if sc.Experiments != nil { + objectMap["experiments"] = sc.Experiments + } + if sc.Limits != nil { + objectMap["limits"] = sc.Limits + } + if sc.AutoHealEnabled != nil { + objectMap["autoHealEnabled"] = sc.AutoHealEnabled + } + if sc.AutoHealRules != nil { + objectMap["autoHealRules"] = sc.AutoHealRules + } + if sc.TracingOptions != nil { + objectMap["tracingOptions"] = sc.TracingOptions + } + if sc.VnetName != nil { + objectMap["vnetName"] = sc.VnetName + } + if sc.VnetRouteAllEnabled != nil { + objectMap["vnetRouteAllEnabled"] = sc.VnetRouteAllEnabled + } + if sc.VnetPrivatePortsCount != nil { + objectMap["vnetPrivatePortsCount"] = sc.VnetPrivatePortsCount + } + if sc.Cors != nil { + objectMap["cors"] = sc.Cors + } + if sc.Push != nil { + objectMap["push"] = sc.Push + } + if sc.APIDefinition != nil { + objectMap["apiDefinition"] = sc.APIDefinition + } + if sc.APIManagementConfig != nil { + objectMap["apiManagementConfig"] = sc.APIManagementConfig + } + if sc.AutoSwapSlotName != nil { + objectMap["autoSwapSlotName"] = sc.AutoSwapSlotName + } + if sc.LocalMySQLEnabled != nil { + objectMap["localMySqlEnabled"] = sc.LocalMySQLEnabled + } + if sc.ManagedServiceIdentityID != nil { + objectMap["managedServiceIdentityId"] = sc.ManagedServiceIdentityID + } + if sc.XManagedServiceIdentityID != nil { + objectMap["xManagedServiceIdentityId"] = sc.XManagedServiceIdentityID + } + if sc.KeyVaultReferenceIdentity != nil { + objectMap["keyVaultReferenceIdentity"] = sc.KeyVaultReferenceIdentity + } + if sc.IPSecurityRestrictions != nil { + objectMap["ipSecurityRestrictions"] = sc.IPSecurityRestrictions + } + if sc.IPSecurityRestrictionsDefaultAction != "" { + objectMap["ipSecurityRestrictionsDefaultAction"] = sc.IPSecurityRestrictionsDefaultAction + } + if sc.ScmIPSecurityRestrictions != nil { + objectMap["scmIpSecurityRestrictions"] = sc.ScmIPSecurityRestrictions + } + if sc.ScmIPSecurityRestrictionsDefaultAction != "" { + objectMap["scmIpSecurityRestrictionsDefaultAction"] = sc.ScmIPSecurityRestrictionsDefaultAction } - if rmeRpec.Type != nil { - objectMap["type"] = rmeRpec.Type + if sc.ScmIPSecurityRestrictionsUseMain != nil { + objectMap["scmIpSecurityRestrictionsUseMain"] = sc.ScmIPSecurityRestrictionsUseMain } - if rmeRpec.Location != nil { - objectMap["location"] = rmeRpec.Location + if sc.HTTP20Enabled != nil { + objectMap["http20Enabled"] = sc.HTTP20Enabled } - if rmeRpec.Tags != nil { - objectMap["tags"] = rmeRpec.Tags + if sc.MinTLSVersion != "" { + objectMap["minTlsVersion"] = sc.MinTLSVersion } - if rmeRpec.Plan != nil { - objectMap["plan"] = rmeRpec.Plan + if sc.ScmMinTLSVersion != "" { + objectMap["scmMinTlsVersion"] = sc.ScmMinTLSVersion } - if rmeRpec.Properties != nil { - objectMap["properties"] = rmeRpec.Properties + if sc.FtpsState != "" { + objectMap["ftpsState"] = sc.FtpsState } - if rmeRpec.Sku != nil { - objectMap["sku"] = rmeRpec.Sku + if sc.PreWarmedInstanceCount != nil { + objectMap["preWarmedInstanceCount"] = sc.PreWarmedInstanceCount } - if rmeRpec.Status != nil { - objectMap["status"] = rmeRpec.Status + if sc.FunctionAppScaleLimit != nil { + objectMap["functionAppScaleLimit"] = sc.FunctionAppScaleLimit } - if rmeRpec.Error != nil { - objectMap["error"] = rmeRpec.Error + if sc.ElasticWebAppScaleLimit != nil { + objectMap["elasticWebAppScaleLimit"] = sc.ElasticWebAppScaleLimit } - if rmeRpec.Identity != nil { - objectMap["identity"] = rmeRpec.Identity + if sc.HealthCheckPath != nil { + objectMap["healthCheckPath"] = sc.HealthCheckPath } - if rmeRpec.Zones != nil { - objectMap["zones"] = rmeRpec.Zones + if sc.FunctionsRuntimeScaleMonitoringEnabled != nil { + objectMap["functionsRuntimeScaleMonitoringEnabled"] = sc.FunctionsRuntimeScaleMonitoringEnabled } - return json.Marshal(objectMap) -} - -// ResponseMetaData ... -type ResponseMetaData struct { - // DataSource - Source of the Data - DataSource *DataSource `json:"dataSource,omitempty"` -} - -// RestoreRequest description of a restore request. -type RestoreRequest struct { - autorest.Response `json:"-"` - // RestoreRequestProperties - RestoreRequest resource specific properties - *RestoreRequestProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for RestoreRequest. -func (rr RestoreRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rr.RestoreRequestProperties != nil { - objectMap["properties"] = rr.RestoreRequestProperties + if sc.WebsiteTimeZone != nil { + objectMap["websiteTimeZone"] = sc.WebsiteTimeZone } - if rr.Kind != nil { - objectMap["kind"] = rr.Kind + if sc.MinimumElasticInstanceCount != nil { + objectMap["minimumElasticInstanceCount"] = sc.MinimumElasticInstanceCount } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for RestoreRequest struct. -func (rr *RestoreRequest) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err + if sc.AzureStorageAccounts != nil { + objectMap["azureStorageAccounts"] = sc.AzureStorageAccounts } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var restoreRequestProperties RestoreRequestProperties - err = json.Unmarshal(*v, &restoreRequestProperties) - if err != nil { - return err - } - rr.RestoreRequestProperties = &restoreRequestProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - rr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - rr.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - rr.Kind = &kind - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - rr.Type = &typeVar - } - } + if sc.PublicNetworkAccess != nil { + objectMap["publicNetworkAccess"] = sc.PublicNetworkAccess } + return json.Marshal(objectMap) +} - return nil +// SiteConfigPropertiesDictionary site config properties dictionary. +type SiteConfigPropertiesDictionary struct { + // Use32BitWorkerProcess - READ-ONLY; true if use32BitWorkerProcess should be set to true for the stack; otherwise, false. + Use32BitWorkerProcess *bool `json:"use32BitWorkerProcess,omitempty"` + // LinuxFxVersion - READ-ONLY; LinuxFxVersion configuration setting. + LinuxFxVersion *string `json:"linuxFxVersion,omitempty"` + // JavaVersion - READ-ONLY; JavaVersion configuration setting. + JavaVersion *string `json:"javaVersion,omitempty"` + // PowerShellVersion - READ-ONLY; PowerShellVersion configuration setting. + PowerShellVersion *string `json:"powerShellVersion,omitempty"` } -// RestoreRequestProperties restoreRequest resource specific properties -type RestoreRequestProperties struct { - // StorageAccountURL - SAS URL to the container. - StorageAccountURL *string `json:"storageAccountUrl,omitempty"` - // BlobName - Name of a blob which contains the backup. - BlobName *string `json:"blobName,omitempty"` - // Overwrite - true if the restore operation can overwrite target app; otherwise, false. true is needed if trying to restore over an existing app. - Overwrite *bool `json:"overwrite,omitempty"` - // SiteName - Name of an app. - SiteName *string `json:"siteName,omitempty"` - // Databases - Collection of databases which should be restored. This list has to match the list of databases included in the backup. - Databases *[]DatabaseBackupSetting `json:"databases,omitempty"` - // IgnoreConflictingHostNames - Changes a logic when restoring an app with custom domains. true to remove custom domains automatically. If false, custom domains are added to - // the app's object when it is being restored, but that might fail due to conflicts during the operation. - IgnoreConflictingHostNames *bool `json:"ignoreConflictingHostNames,omitempty"` - // IgnoreDatabases - Ignore the databases and only restore the site content - IgnoreDatabases *bool `json:"ignoreDatabases,omitempty"` - // AppServicePlan - Specify app service plan that will own restored site. - AppServicePlan *string `json:"appServicePlan,omitempty"` - // OperationType - Operation type. Possible values include: 'BackupRestoreOperationTypeDefault', 'BackupRestoreOperationTypeClone', 'BackupRestoreOperationTypeRelocation', 'BackupRestoreOperationTypeSnapshot', 'BackupRestoreOperationTypeCloudFS' - OperationType BackupRestoreOperationType `json:"operationType,omitempty"` - // AdjustConnectionStrings - true if SiteConfig.ConnectionStrings should be set in new app; otherwise, false. - AdjustConnectionStrings *bool `json:"adjustConnectionStrings,omitempty"` - // HostingEnvironment - App Service Environment name, if needed (only when restoring an app to an App Service Environment). - HostingEnvironment *string `json:"hostingEnvironment,omitempty"` +// MarshalJSON is the custom marshaler for SiteConfigPropertiesDictionary. +func (scpd SiteConfigPropertiesDictionary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) } -// Revision container App Revision. -type Revision struct { +// SiteConfigResource web app configuration ARM resource. +type SiteConfigResource struct { autorest.Response `json:"-"` - // RevisionProperties - Revision resource specific properties - *RevisionProperties `json:"properties,omitempty"` + // SiteConfig - Core resource properties + *SiteConfig `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. Name *string `json:"name,omitempty"` // Kind - Kind of resource. Kind *string `json:"kind,omitempty"` - // Location - Resource Location. - Location *string `json:"location,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for Revision. -func (r Revision) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for SiteConfigResource. +func (scr SiteConfigResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if r.RevisionProperties != nil { - objectMap["properties"] = r.RevisionProperties - } - if r.Kind != nil { - objectMap["kind"] = r.Kind - } - if r.Location != nil { - objectMap["location"] = r.Location + if scr.SiteConfig != nil { + objectMap["properties"] = scr.SiteConfig } - if r.Tags != nil { - objectMap["tags"] = r.Tags + if scr.Kind != nil { + objectMap["kind"] = scr.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for Revision struct. -func (r *Revision) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for SiteConfigResource struct. +func (scr *SiteConfigResource) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -22231,12 +24932,12 @@ func (r *Revision) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var revisionProperties RevisionProperties - err = json.Unmarshal(*v, &revisionProperties) + var siteConfig SiteConfig + err = json.Unmarshal(*v, &siteConfig) if err != nil { return err } - r.RevisionProperties = &revisionProperties + scr.SiteConfig = &siteConfig } case "id": if v != nil { @@ -22245,7 +24946,7 @@ func (r *Revision) UnmarshalJSON(body []byte) error { if err != nil { return err } - r.ID = &ID + scr.ID = &ID } case "name": if v != nil { @@ -22254,7 +24955,7 @@ func (r *Revision) UnmarshalJSON(body []byte) error { if err != nil { return err } - r.Name = &name + scr.Name = &name } case "kind": if v != nil { @@ -22263,16 +24964,7 @@ func (r *Revision) UnmarshalJSON(body []byte) error { if err != nil { return err } - r.Kind = &kind - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - r.Location = &location + scr.Kind = &kind } case "type": if v != nil { @@ -22281,16 +24973,7 @@ func (r *Revision) UnmarshalJSON(body []byte) error { if err != nil { return err } - r.Type = &typeVar - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - r.Tags = tags + scr.Type = &typeVar } } } @@ -22298,35 +24981,35 @@ func (r *Revision) UnmarshalJSON(body []byte) error { return nil } -// RevisionCollection container App Revisions collection ARM resource. -type RevisionCollection struct { +// SiteConfigResourceCollection collection of site configurations. +type SiteConfigResourceCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]Revision `json:"value,omitempty"` + Value *[]SiteConfigResource `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for RevisionCollection. -func (rc RevisionCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for SiteConfigResourceCollection. +func (scrc SiteConfigResourceCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if rc.Value != nil { - objectMap["value"] = rc.Value + if scrc.Value != nil { + objectMap["value"] = scrc.Value } return json.Marshal(objectMap) } -// RevisionCollectionIterator provides access to a complete listing of Revision values. -type RevisionCollectionIterator struct { +// SiteConfigResourceCollectionIterator provides access to a complete listing of SiteConfigResource values. +type SiteConfigResourceCollectionIterator struct { i int - page RevisionCollectionPage + page SiteConfigResourceCollectionPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *RevisionCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *SiteConfigResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RevisionCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/SiteConfigResourceCollectionIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -22351,67 +25034,67 @@ func (iter *RevisionCollectionIterator) NextWithContext(ctx context.Context) (er // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *RevisionCollectionIterator) Next() error { +func (iter *SiteConfigResourceCollectionIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter RevisionCollectionIterator) NotDone() bool { +func (iter SiteConfigResourceCollectionIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter RevisionCollectionIterator) Response() RevisionCollection { +func (iter SiteConfigResourceCollectionIterator) Response() SiteConfigResourceCollection { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter RevisionCollectionIterator) Value() Revision { +func (iter SiteConfigResourceCollectionIterator) Value() SiteConfigResource { if !iter.page.NotDone() { - return Revision{} + return SiteConfigResource{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the RevisionCollectionIterator type. -func NewRevisionCollectionIterator(page RevisionCollectionPage) RevisionCollectionIterator { - return RevisionCollectionIterator{page: page} +// Creates a new instance of the SiteConfigResourceCollectionIterator type. +func NewSiteConfigResourceCollectionIterator(page SiteConfigResourceCollectionPage) SiteConfigResourceCollectionIterator { + return SiteConfigResourceCollectionIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (rc RevisionCollection) IsEmpty() bool { - return rc.Value == nil || len(*rc.Value) == 0 +func (scrc SiteConfigResourceCollection) IsEmpty() bool { + return scrc.Value == nil || len(*scrc.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (rc RevisionCollection) hasNextLink() bool { - return rc.NextLink != nil && len(*rc.NextLink) != 0 +func (scrc SiteConfigResourceCollection) hasNextLink() bool { + return scrc.NextLink != nil && len(*scrc.NextLink) != 0 } -// revisionCollectionPreparer prepares a request to retrieve the next set of results. +// siteConfigResourceCollectionPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (rc RevisionCollection) revisionCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !rc.hasNextLink() { +func (scrc SiteConfigResourceCollection) siteConfigResourceCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !scrc.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(rc.NextLink))) + autorest.WithBaseURL(to.String(scrc.NextLink))) } -// RevisionCollectionPage contains a page of Revision values. -type RevisionCollectionPage struct { - fn func(context.Context, RevisionCollection) (RevisionCollection, error) - rc RevisionCollection +// SiteConfigResourceCollectionPage contains a page of SiteConfigResource values. +type SiteConfigResourceCollectionPage struct { + fn func(context.Context, SiteConfigResourceCollection) (SiteConfigResourceCollection, error) + scrc SiteConfigResourceCollection } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *RevisionCollectionPage) NextWithContext(ctx context.Context) (err error) { +func (page *SiteConfigResourceCollectionPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RevisionCollectionPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/SiteConfigResourceCollectionPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -22421,11 +25104,11 @@ func (page *RevisionCollectionPage) NextWithContext(ctx context.Context) (err er }() } for { - next, err := page.fn(ctx, page.rc) + next, err := page.fn(ctx, page.scrc) if err != nil { return err } - page.rc = next + page.scrc = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -22436,214 +25119,79 @@ func (page *RevisionCollectionPage) NextWithContext(ctx context.Context) (err er // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *RevisionCollectionPage) Next() error { +func (page *SiteConfigResourceCollectionPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page RevisionCollectionPage) NotDone() bool { - return !page.rc.IsEmpty() +func (page SiteConfigResourceCollectionPage) NotDone() bool { + return !page.scrc.IsEmpty() } // Response returns the raw server response from the last page request. -func (page RevisionCollectionPage) Response() RevisionCollection { - return page.rc +func (page SiteConfigResourceCollectionPage) Response() SiteConfigResourceCollection { + return page.scrc } // Values returns the slice of values for the current page or nil if there are no values. -func (page RevisionCollectionPage) Values() []Revision { - if page.rc.IsEmpty() { +func (page SiteConfigResourceCollectionPage) Values() []SiteConfigResource { + if page.scrc.IsEmpty() { return nil } - return *page.rc.Value + return *page.scrc.Value } -// Creates a new instance of the RevisionCollectionPage type. -func NewRevisionCollectionPage(cur RevisionCollection, getNextPage func(context.Context, RevisionCollection) (RevisionCollection, error)) RevisionCollectionPage { - return RevisionCollectionPage{ - fn: getNextPage, - rc: cur, +// Creates a new instance of the SiteConfigResourceCollectionPage type. +func NewSiteConfigResourceCollectionPage(cur SiteConfigResourceCollection, getNextPage func(context.Context, SiteConfigResourceCollection) (SiteConfigResourceCollection, error)) SiteConfigResourceCollectionPage { + return SiteConfigResourceCollectionPage{ + fn: getNextPage, + scrc: cur, } } -// RevisionProperties revision resource specific properties -type RevisionProperties struct { - // CreatedTime - READ-ONLY; Timestamp describing when the revision was created - // by controller - CreatedTime *date.Time `json:"createdTime,omitempty"` - // Fqdn - READ-ONLY; Fully qualified domain name of the revision - Fqdn *string `json:"fqdn,omitempty"` - // Template - READ-ONLY; Container App Revision Template with all possible settings and the - // defaults if user did not provide them. The defaults are populated - // as they were at the creation time - Template *Template `json:"template,omitempty"` - // Active - READ-ONLY; Boolean describing if the Revision is Active - Active *bool `json:"active,omitempty"` - // Replicas - READ-ONLY; Number of pods currently running for this revision - Replicas *int32 `json:"replicas,omitempty"` - // TrafficWeight - READ-ONLY; Traffic weight assigned to this revision - TrafficWeight *int32 `json:"trafficWeight,omitempty"` - // ProvisioningError - READ-ONLY; Optional Field - Platform Error Message - ProvisioningError *string `json:"provisioningError,omitempty"` - // HealthState - READ-ONLY; Current health State of the revision. Possible values include: 'RevisionHealthStateHealthy', 'RevisionHealthStateUnhealthy', 'RevisionHealthStateNone' - HealthState RevisionHealthState `json:"healthState,omitempty"` - // ProvisioningState - READ-ONLY; Current provisioning State of the revision. Possible values include: 'RevisionProvisioningStateProvisioning', 'RevisionProvisioningStateProvisioned', 'RevisionProvisioningStateFailed', 'RevisionProvisioningStateDeprovisioning', 'RevisionProvisioningStateDeprovisioned' - ProvisioningState RevisionProvisioningState `json:"provisioningState,omitempty"` -} - -// MarshalJSON is the custom marshaler for RevisionProperties. -func (r RevisionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SampleUtterance sample utterance. -type SampleUtterance struct { - // Text - Text attribute of sample utterance. - Text *string `json:"text,omitempty"` - // Links - Links attribute of sample utterance. - Links *[]string `json:"links,omitempty"` - // Qid - Question id of sample utterance (for stackoverflow questions titles). - Qid *string `json:"qid,omitempty"` -} - -// Scale container App scaling configurations. -type Scale struct { - // MinReplicas - Optional. Minimum number of container replicas. - MinReplicas *int32 `json:"minReplicas,omitempty"` - // MaxReplicas - Optional. Maximum number of container replicas. Defaults to 10 if not set. - MaxReplicas *int32 `json:"maxReplicas,omitempty"` - // Rules - Scaling rules. - Rules *[]ScaleRule `json:"rules,omitempty"` -} - -// ScaleRule container App container scaling rule. -type ScaleRule struct { - // Name - Scale Rule Name - Name *string `json:"name,omitempty"` - // AzureQueue - Azure Queue based scaling. - AzureQueue *QueueScaleRule `json:"azureQueue,omitempty"` - // Custom - Custom scale rule. - Custom *CustomScaleRule `json:"custom,omitempty"` - // HTTP - HTTP requests based scaling. - HTTP *HTTPScaleRule `json:"http,omitempty"` -} - -// ScaleRuleAuth auth Secrets for Container App Scale Rule -type ScaleRuleAuth struct { - // SecretRef - Name of the Container App secret from which to pull the auth params. - SecretRef *string `json:"secretRef,omitempty"` - // TriggerParameter - Trigger Parameter that uses the secret - TriggerParameter *string `json:"triggerParameter,omitempty"` -} - -// Secret container App Secret. -type Secret struct { - // Name - Secret Name. - Name *string `json:"name,omitempty"` - // Value - Secret Value. - Value *string `json:"value,omitempty"` -} - -// SecretsCollection container App Secrets Collection ARM resource. -type SecretsCollection struct { - autorest.Response `json:"-"` - // Value - Collection of resources. - Value *[]ContainerAppSecret `json:"value,omitempty"` -} - -// ServiceSpecification resource metrics service provided by Microsoft.Insights resource provider. -type ServiceSpecification struct { - MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"` - LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"` -} - -// SetObject ... -type SetObject struct { - autorest.Response `json:"-"` - Value interface{} `json:"value,omitempty"` -} - -// Site a web app, a mobile app backend, or an API app. -type Site struct { - autorest.Response `json:"-"` - // SiteProperties - Site resource specific properties - *SiteProperties `json:"properties,omitempty"` - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` +// SiteConfigurationSnapshotInfo a snapshot of a web app configuration. +type SiteConfigurationSnapshotInfo struct { + // SiteConfigurationSnapshotInfoProperties - SiteConfigurationSnapshotInfo resource specific properties + *SiteConfigurationSnapshotInfoProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. Name *string `json:"name,omitempty"` // Kind - Kind of resource. Kind *string `json:"kind,omitempty"` - // Location - Resource Location. - Location *string `json:"location,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for Site. -func (s Site) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for SiteConfigurationSnapshotInfo. +func (scsi SiteConfigurationSnapshotInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if s.SiteProperties != nil { - objectMap["properties"] = s.SiteProperties - } - if s.Identity != nil { - objectMap["identity"] = s.Identity - } - if s.ExtendedLocation != nil { - objectMap["extendedLocation"] = s.ExtendedLocation - } - if s.Kind != nil { - objectMap["kind"] = s.Kind - } - if s.Location != nil { - objectMap["location"] = s.Location - } - if s.Tags != nil { - objectMap["tags"] = s.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Site struct. -func (s *Site) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err + if scsi.SiteConfigurationSnapshotInfoProperties != nil { + objectMap["properties"] = scsi.SiteConfigurationSnapshotInfoProperties } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var siteProperties SiteProperties - err = json.Unmarshal(*v, &siteProperties) - if err != nil { - return err - } - s.SiteProperties = &siteProperties - } - case "identity": - if v != nil { - var identity ManagedServiceIdentity - err = json.Unmarshal(*v, &identity) - if err != nil { - return err - } - s.Identity = &identity - } - case "extendedLocation": + if scsi.Kind != nil { + objectMap["kind"] = scsi.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SiteConfigurationSnapshotInfo struct. +func (scsi *SiteConfigurationSnapshotInfo) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": if v != nil { - var extendedLocation ExtendedLocation - err = json.Unmarshal(*v, &extendedLocation) + var siteConfigurationSnapshotInfoProperties SiteConfigurationSnapshotInfoProperties + err = json.Unmarshal(*v, &siteConfigurationSnapshotInfoProperties) if err != nil { return err } - s.ExtendedLocation = &extendedLocation + scsi.SiteConfigurationSnapshotInfoProperties = &siteConfigurationSnapshotInfoProperties } case "id": if v != nil { @@ -22652,7 +25200,7 @@ func (s *Site) UnmarshalJSON(body []byte) error { if err != nil { return err } - s.ID = &ID + scsi.ID = &ID } case "name": if v != nil { @@ -22661,7 +25209,7 @@ func (s *Site) UnmarshalJSON(body []byte) error { if err != nil { return err } - s.Name = &name + scsi.Name = &name } case "kind": if v != nil { @@ -22670,16 +25218,7 @@ func (s *Site) UnmarshalJSON(body []byte) error { if err != nil { return err } - s.Kind = &kind - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - s.Location = &location + scsi.Kind = &kind } case "type": if v != nil { @@ -22688,16 +25227,7 @@ func (s *Site) UnmarshalJSON(body []byte) error { if err != nil { return err } - s.Type = &typeVar - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - s.Tags = tags + scsi.Type = &typeVar } } } @@ -22705,12 +25235,195 @@ func (s *Site) UnmarshalJSON(body []byte) error { return nil } -// SiteAuthSettings configuration settings for the Azure App Service Authentication / Authorization -// feature. -type SiteAuthSettings struct { +// SiteConfigurationSnapshotInfoCollection collection of metadata for the app configuration snapshots that +// can be restored. +type SiteConfigurationSnapshotInfoCollection struct { autorest.Response `json:"-"` - // SiteAuthSettingsProperties - SiteAuthSettings resource specific properties - *SiteAuthSettingsProperties `json:"properties,omitempty"` + // Value - Collection of resources. + Value *[]SiteConfigurationSnapshotInfo `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for SiteConfigurationSnapshotInfoCollection. +func (scsic SiteConfigurationSnapshotInfoCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if scsic.Value != nil { + objectMap["value"] = scsic.Value + } + return json.Marshal(objectMap) +} + +// SiteConfigurationSnapshotInfoCollectionIterator provides access to a complete listing of +// SiteConfigurationSnapshotInfo values. +type SiteConfigurationSnapshotInfoCollectionIterator struct { + i int + page SiteConfigurationSnapshotInfoCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *SiteConfigurationSnapshotInfoCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SiteConfigurationSnapshotInfoCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *SiteConfigurationSnapshotInfoCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SiteConfigurationSnapshotInfoCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter SiteConfigurationSnapshotInfoCollectionIterator) Response() SiteConfigurationSnapshotInfoCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter SiteConfigurationSnapshotInfoCollectionIterator) Value() SiteConfigurationSnapshotInfo { + if !iter.page.NotDone() { + return SiteConfigurationSnapshotInfo{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SiteConfigurationSnapshotInfoCollectionIterator type. +func NewSiteConfigurationSnapshotInfoCollectionIterator(page SiteConfigurationSnapshotInfoCollectionPage) SiteConfigurationSnapshotInfoCollectionIterator { + return SiteConfigurationSnapshotInfoCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (scsic SiteConfigurationSnapshotInfoCollection) IsEmpty() bool { + return scsic.Value == nil || len(*scsic.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (scsic SiteConfigurationSnapshotInfoCollection) hasNextLink() bool { + return scsic.NextLink != nil && len(*scsic.NextLink) != 0 +} + +// siteConfigurationSnapshotInfoCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (scsic SiteConfigurationSnapshotInfoCollection) siteConfigurationSnapshotInfoCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !scsic.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(scsic.NextLink))) +} + +// SiteConfigurationSnapshotInfoCollectionPage contains a page of SiteConfigurationSnapshotInfo values. +type SiteConfigurationSnapshotInfoCollectionPage struct { + fn func(context.Context, SiteConfigurationSnapshotInfoCollection) (SiteConfigurationSnapshotInfoCollection, error) + scsic SiteConfigurationSnapshotInfoCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *SiteConfigurationSnapshotInfoCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SiteConfigurationSnapshotInfoCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.scsic) + if err != nil { + return err + } + page.scsic = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *SiteConfigurationSnapshotInfoCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SiteConfigurationSnapshotInfoCollectionPage) NotDone() bool { + return !page.scsic.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SiteConfigurationSnapshotInfoCollectionPage) Response() SiteConfigurationSnapshotInfoCollection { + return page.scsic +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SiteConfigurationSnapshotInfoCollectionPage) Values() []SiteConfigurationSnapshotInfo { + if page.scsic.IsEmpty() { + return nil + } + return *page.scsic.Value +} + +// Creates a new instance of the SiteConfigurationSnapshotInfoCollectionPage type. +func NewSiteConfigurationSnapshotInfoCollectionPage(cur SiteConfigurationSnapshotInfoCollection, getNextPage func(context.Context, SiteConfigurationSnapshotInfoCollection) (SiteConfigurationSnapshotInfoCollection, error)) SiteConfigurationSnapshotInfoCollectionPage { + return SiteConfigurationSnapshotInfoCollectionPage{ + fn: getNextPage, + scsic: cur, + } +} + +// SiteConfigurationSnapshotInfoProperties siteConfigurationSnapshotInfo resource specific properties +type SiteConfigurationSnapshotInfoProperties struct { + // Time - READ-ONLY; The time the snapshot was taken. + Time *date.Time `json:"time,omitempty"` + // SnapshotID - READ-ONLY; The id of the snapshot + SnapshotID *int32 `json:"snapshotId,omitempty"` +} + +// MarshalJSON is the custom marshaler for SiteConfigurationSnapshotInfoProperties. +func (scsi SiteConfigurationSnapshotInfoProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// SiteExtensionInfo site Extension Information. +type SiteExtensionInfo struct { + autorest.Response `json:"-"` + // SiteExtensionInfoProperties - SiteExtensionInfo resource specific properties + *SiteExtensionInfoProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -22721,20 +25434,20 @@ type SiteAuthSettings struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for SiteAuthSettings. -func (sas SiteAuthSettings) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for SiteExtensionInfo. +func (sei SiteExtensionInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if sas.SiteAuthSettingsProperties != nil { - objectMap["properties"] = sas.SiteAuthSettingsProperties + if sei.SiteExtensionInfoProperties != nil { + objectMap["properties"] = sei.SiteExtensionInfoProperties } - if sas.Kind != nil { - objectMap["kind"] = sas.Kind + if sei.Kind != nil { + objectMap["kind"] = sei.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for SiteAuthSettings struct. -func (sas *SiteAuthSettings) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for SiteExtensionInfo struct. +func (sei *SiteExtensionInfo) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -22744,12 +25457,12 @@ func (sas *SiteAuthSettings) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var siteAuthSettingsProperties SiteAuthSettingsProperties - err = json.Unmarshal(*v, &siteAuthSettingsProperties) + var siteExtensionInfoProperties SiteExtensionInfoProperties + err = json.Unmarshal(*v, &siteExtensionInfoProperties) if err != nil { return err } - sas.SiteAuthSettingsProperties = &siteAuthSettingsProperties + sei.SiteExtensionInfoProperties = &siteExtensionInfoProperties } case "id": if v != nil { @@ -22758,7 +25471,7 @@ func (sas *SiteAuthSettings) UnmarshalJSON(body []byte) error { if err != nil { return err } - sas.ID = &ID + sei.ID = &ID } case "name": if v != nil { @@ -22767,7 +25480,7 @@ func (sas *SiteAuthSettings) UnmarshalJSON(body []byte) error { if err != nil { return err } - sas.Name = &name + sei.Name = &name } case "kind": if v != nil { @@ -22776,7 +25489,7 @@ func (sas *SiteAuthSettings) UnmarshalJSON(body []byte) error { if err != nil { return err } - sas.Kind = &kind + sei.Kind = &kind } case "type": if v != nil { @@ -22785,7 +25498,7 @@ func (sas *SiteAuthSettings) UnmarshalJSON(body []byte) error { if err != nil { return err } - sas.Type = &typeVar + sei.Type = &typeVar } } } @@ -22793,144 +25506,222 @@ func (sas *SiteAuthSettings) UnmarshalJSON(body []byte) error { return nil } -// SiteAuthSettingsProperties siteAuthSettings resource specific properties -type SiteAuthSettingsProperties struct { - // Enabled - true if the Authentication / Authorization feature is enabled for the current app; otherwise, false. - Enabled *bool `json:"enabled,omitempty"` - // RuntimeVersion - The RuntimeVersion of the Authentication / Authorization feature in use for the current app. - // The setting in this value can control the behavior of certain features in the Authentication / Authorization module. - RuntimeVersion *string `json:"runtimeVersion,omitempty"` - // UnauthenticatedClientAction - The action to take when an unauthenticated client attempts to access the app. Possible values include: 'UnauthenticatedClientActionRedirectToLoginPage', 'UnauthenticatedClientActionAllowAnonymous' - UnauthenticatedClientAction UnauthenticatedClientAction `json:"unauthenticatedClientAction,omitempty"` - // TokenStoreEnabled - true to durably store platform-specific security tokens that are obtained during login flows; otherwise, false. - // The default is false. - TokenStoreEnabled *bool `json:"tokenStoreEnabled,omitempty"` - // AllowedExternalRedirectUrls - External URLs that can be redirected to as part of logging in or logging out of the app. Note that the query string part of the URL is ignored. - // This is an advanced setting typically only needed by Windows Store application backends. - // Note that URLs within the current domain are always implicitly allowed. - AllowedExternalRedirectUrls *[]string `json:"allowedExternalRedirectUrls,omitempty"` - // DefaultProvider - The default authentication provider to use when multiple providers are configured. - // This setting is only needed if multiple providers are configured and the unauthenticated client - // action is set to "RedirectToLoginPage". Possible values include: 'BuiltInAuthenticationProviderAzureActiveDirectory', 'BuiltInAuthenticationProviderFacebook', 'BuiltInAuthenticationProviderGoogle', 'BuiltInAuthenticationProviderMicrosoftAccount', 'BuiltInAuthenticationProviderTwitter', 'BuiltInAuthenticationProviderGithub' - DefaultProvider BuiltInAuthenticationProvider `json:"defaultProvider,omitempty"` - // TokenRefreshExtensionHours - The number of hours after session token expiration that a session token can be used to - // call the token refresh API. The default is 72 hours. - TokenRefreshExtensionHours *float64 `json:"tokenRefreshExtensionHours,omitempty"` - // ClientID - The Client ID of this relying party application, known as the client_id. - // This setting is required for enabling OpenID Connection authentication with Azure Active Directory or - // other 3rd party OpenID Connect providers. - // More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html - ClientID *string `json:"clientId,omitempty"` - // ClientSecret - The Client Secret of this relying party application (in Azure Active Directory, this is also referred to as the Key). - // This setting is optional. If no client secret is configured, the OpenID Connect implicit auth flow is used to authenticate end users. - // Otherwise, the OpenID Connect Authorization Code Flow is used to authenticate end users. - // More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html - ClientSecret *string `json:"clientSecret,omitempty"` - // ClientSecretSettingName - The app setting name that contains the client secret of the relying party application. - ClientSecretSettingName *string `json:"clientSecretSettingName,omitempty"` - // ClientSecretCertificateThumbprint - An alternative to the client secret, that is the thumbprint of a certificate used for signing purposes. This property acts as - // a replacement for the Client Secret. It is also optional. - ClientSecretCertificateThumbprint *string `json:"clientSecretCertificateThumbprint,omitempty"` - // Issuer - The OpenID Connect Issuer URI that represents the entity which issues access tokens for this application. - // When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/. - // This URI is a case-sensitive identifier for the token issuer. - // More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html - Issuer *string `json:"issuer,omitempty"` - // ValidateIssuer - Gets a value indicating whether the issuer should be a valid HTTPS url and be validated as such. - ValidateIssuer *bool `json:"validateIssuer,omitempty"` - // AllowedAudiences - Allowed audience values to consider when validating JWTs issued by - // Azure Active Directory. Note that the ClientID value is always considered an - // allowed audience, regardless of this setting. - AllowedAudiences *[]string `json:"allowedAudiences,omitempty"` - // AdditionalLoginParams - Login parameters to send to the OpenID Connect authorization endpoint when - // a user logs in. Each parameter must be in the form "key=value". - AdditionalLoginParams *[]string `json:"additionalLoginParams,omitempty"` - // AadClaimsAuthorization - Gets a JSON string containing the Azure AD Acl settings. - AadClaimsAuthorization *string `json:"aadClaimsAuthorization,omitempty"` - // GoogleClientID - The OpenID Connect Client ID for the Google web application. - // This setting is required for enabling Google Sign-In. - // Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/ - GoogleClientID *string `json:"googleClientId,omitempty"` - // GoogleClientSecret - The client secret associated with the Google web application. - // This setting is required for enabling Google Sign-In. - // Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/ - GoogleClientSecret *string `json:"googleClientSecret,omitempty"` - // GoogleClientSecretSettingName - The app setting name that contains the client secret associated with - // the Google web application. - GoogleClientSecretSettingName *string `json:"googleClientSecretSettingName,omitempty"` - // GoogleOAuthScopes - The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. - // This setting is optional. If not specified, "openid", "profile", and "email" are used as default scopes. - // Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/ - GoogleOAuthScopes *[]string `json:"googleOAuthScopes,omitempty"` - // FacebookAppID - The App ID of the Facebook app used for login. - // This setting is required for enabling Facebook Login. - // Facebook Login documentation: https://developers.facebook.com/docs/facebook-login - FacebookAppID *string `json:"facebookAppId,omitempty"` - // FacebookAppSecret - The App Secret of the Facebook app used for Facebook Login. - // This setting is required for enabling Facebook Login. - // Facebook Login documentation: https://developers.facebook.com/docs/facebook-login - FacebookAppSecret *string `json:"facebookAppSecret,omitempty"` - // FacebookAppSecretSettingName - The app setting name that contains the app secret used for Facebook Login. - FacebookAppSecretSettingName *string `json:"facebookAppSecretSettingName,omitempty"` - // FacebookOAuthScopes - The OAuth 2.0 scopes that will be requested as part of Facebook Login authentication. - // This setting is optional. - // Facebook Login documentation: https://developers.facebook.com/docs/facebook-login - FacebookOAuthScopes *[]string `json:"facebookOAuthScopes,omitempty"` - // GitHubClientID - The Client Id of the GitHub app used for login. - // This setting is required for enabling Github login - GitHubClientID *string `json:"gitHubClientId,omitempty"` - // GitHubClientSecret - The Client Secret of the GitHub app used for Github Login. - // This setting is required for enabling Github login. - GitHubClientSecret *string `json:"gitHubClientSecret,omitempty"` - // GitHubClientSecretSettingName - The app setting name that contains the client secret of the Github - // app used for GitHub Login. - GitHubClientSecretSettingName *string `json:"gitHubClientSecretSettingName,omitempty"` - // GitHubOAuthScopes - The OAuth 2.0 scopes that will be requested as part of GitHub Login authentication. - // This setting is optional - GitHubOAuthScopes *[]string `json:"gitHubOAuthScopes,omitempty"` - // TwitterConsumerKey - The OAuth 1.0a consumer key of the Twitter application used for sign-in. - // This setting is required for enabling Twitter Sign-In. - // Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in - TwitterConsumerKey *string `json:"twitterConsumerKey,omitempty"` - // TwitterConsumerSecret - The OAuth 1.0a consumer secret of the Twitter application used for sign-in. - // This setting is required for enabling Twitter Sign-In. - // Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in - TwitterConsumerSecret *string `json:"twitterConsumerSecret,omitempty"` - // TwitterConsumerSecretSettingName - The app setting name that contains the OAuth 1.0a consumer secret of the Twitter - // application used for sign-in. - TwitterConsumerSecretSettingName *string `json:"twitterConsumerSecretSettingName,omitempty"` - // MicrosoftAccountClientID - The OAuth 2.0 client ID that was created for the app used for authentication. - // This setting is required for enabling Microsoft Account authentication. - // Microsoft Account OAuth documentation: https://dev.onedrive.com/auth/msa_oauth.htm - MicrosoftAccountClientID *string `json:"microsoftAccountClientId,omitempty"` - // MicrosoftAccountClientSecret - The OAuth 2.0 client secret that was created for the app used for authentication. - // This setting is required for enabling Microsoft Account authentication. - // Microsoft Account OAuth documentation: https://dev.onedrive.com/auth/msa_oauth.htm - MicrosoftAccountClientSecret *string `json:"microsoftAccountClientSecret,omitempty"` - // MicrosoftAccountClientSecretSettingName - The app setting name containing the OAuth 2.0 client secret that was created for the - // app used for authentication. - MicrosoftAccountClientSecretSettingName *string `json:"microsoftAccountClientSecretSettingName,omitempty"` - // MicrosoftAccountOAuthScopes - The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. - // This setting is optional. If not specified, "wl.basic" is used as the default scope. - // Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en-us/library/dn631845.aspx - MicrosoftAccountOAuthScopes *[]string `json:"microsoftAccountOAuthScopes,omitempty"` - // IsAuthFromFile - "true" if the auth config settings should be read from a file, - // "false" otherwise - IsAuthFromFile *string `json:"isAuthFromFile,omitempty"` - // AuthFilePath - The path of the config file containing auth settings. - // If the path is relative, base will the site's root directory. - AuthFilePath *string `json:"authFilePath,omitempty"` - // ConfigVersion - The ConfigVersion of the Authentication / Authorization feature in use for the current app. - // The setting in this value can control the behavior of the control plane for Authentication / Authorization. - ConfigVersion *string `json:"configVersion,omitempty"` +// SiteExtensionInfoCollection collection of Kudu site extension information elements. +type SiteExtensionInfoCollection struct { + autorest.Response `json:"-"` + // Value - Collection of resources. + Value *[]SiteExtensionInfo `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for SiteExtensionInfoCollection. +func (seic SiteExtensionInfoCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if seic.Value != nil { + objectMap["value"] = seic.Value + } + return json.Marshal(objectMap) +} + +// SiteExtensionInfoCollectionIterator provides access to a complete listing of SiteExtensionInfo values. +type SiteExtensionInfoCollectionIterator struct { + i int + page SiteExtensionInfoCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *SiteExtensionInfoCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SiteExtensionInfoCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *SiteExtensionInfoCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SiteExtensionInfoCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter SiteExtensionInfoCollectionIterator) Response() SiteExtensionInfoCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter SiteExtensionInfoCollectionIterator) Value() SiteExtensionInfo { + if !iter.page.NotDone() { + return SiteExtensionInfo{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SiteExtensionInfoCollectionIterator type. +func NewSiteExtensionInfoCollectionIterator(page SiteExtensionInfoCollectionPage) SiteExtensionInfoCollectionIterator { + return SiteExtensionInfoCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (seic SiteExtensionInfoCollection) IsEmpty() bool { + return seic.Value == nil || len(*seic.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (seic SiteExtensionInfoCollection) hasNextLink() bool { + return seic.NextLink != nil && len(*seic.NextLink) != 0 +} + +// siteExtensionInfoCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (seic SiteExtensionInfoCollection) siteExtensionInfoCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !seic.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(seic.NextLink))) +} + +// SiteExtensionInfoCollectionPage contains a page of SiteExtensionInfo values. +type SiteExtensionInfoCollectionPage struct { + fn func(context.Context, SiteExtensionInfoCollection) (SiteExtensionInfoCollection, error) + seic SiteExtensionInfoCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *SiteExtensionInfoCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SiteExtensionInfoCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.seic) + if err != nil { + return err + } + page.seic = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil } -// SiteAuthSettingsV2 configuration settings for the Azure App Service Authentication / Authorization V2 -// feature. -type SiteAuthSettingsV2 struct { +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *SiteExtensionInfoCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SiteExtensionInfoCollectionPage) NotDone() bool { + return !page.seic.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SiteExtensionInfoCollectionPage) Response() SiteExtensionInfoCollection { + return page.seic +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SiteExtensionInfoCollectionPage) Values() []SiteExtensionInfo { + if page.seic.IsEmpty() { + return nil + } + return *page.seic.Value +} + +// Creates a new instance of the SiteExtensionInfoCollectionPage type. +func NewSiteExtensionInfoCollectionPage(cur SiteExtensionInfoCollection, getNextPage func(context.Context, SiteExtensionInfoCollection) (SiteExtensionInfoCollection, error)) SiteExtensionInfoCollectionPage { + return SiteExtensionInfoCollectionPage{ + fn: getNextPage, + seic: cur, + } +} + +// SiteExtensionInfoProperties siteExtensionInfo resource specific properties +type SiteExtensionInfoProperties struct { + // ExtensionID - Site extension ID. + ExtensionID *string `json:"extension_id,omitempty"` + Title *string `json:"title,omitempty"` + // ExtensionType - Site extension type. Possible values include: 'SiteExtensionTypeGallery', 'SiteExtensionTypeWebRoot' + ExtensionType SiteExtensionType `json:"extension_type,omitempty"` + // Summary - Summary description. + Summary *string `json:"summary,omitempty"` + // Description - Detailed description. + Description *string `json:"description,omitempty"` + // Version - Version information. + Version *string `json:"version,omitempty"` + // ExtensionURL - Extension URL. + ExtensionURL *string `json:"extension_url,omitempty"` + // ProjectURL - Project URL. + ProjectURL *string `json:"project_url,omitempty"` + // IconURL - Icon URL. + IconURL *string `json:"icon_url,omitempty"` + // LicenseURL - License URL. + LicenseURL *string `json:"license_url,omitempty"` + // FeedURL - Feed URL. + FeedURL *string `json:"feed_url,omitempty"` + // Authors - List of authors. + Authors *[]string `json:"authors,omitempty"` + // InstallerCommandLineParams - Installer command line parameters. + InstallerCommandLineParams *string `json:"installer_command_line_params,omitempty"` + // PublishedDateTime - Published timestamp. + PublishedDateTime *date.Time `json:"published_date_time,omitempty"` + // DownloadCount - Count of downloads. + DownloadCount *int32 `json:"download_count,omitempty"` + // LocalIsLatestVersion - true if the local version is the latest version; false otherwise. + LocalIsLatestVersion *bool `json:"local_is_latest_version,omitempty"` + // LocalPath - Local path. + LocalPath *string `json:"local_path,omitempty"` + // InstalledDateTime - Installed timestamp. + InstalledDateTime *date.Time `json:"installed_date_time,omitempty"` + // ProvisioningState - Provisioning state. + ProvisioningState *string `json:"provisioningState,omitempty"` + // Comment - Site Extension comment. + Comment *string `json:"comment,omitempty"` +} + +// SiteInstanceStatus ... +type SiteInstanceStatus struct { autorest.Response `json:"-"` - // SiteAuthSettingsV2Properties - SiteAuthSettingsV2 resource specific properties - *SiteAuthSettingsV2Properties `json:"properties,omitempty"` + // SiteInstanceStatusProperties - WebSiteInstanceStatus resource specific properties + *SiteInstanceStatusProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -22941,20 +25732,20 @@ type SiteAuthSettingsV2 struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for SiteAuthSettingsV2. -func (sasv SiteAuthSettingsV2) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for SiteInstanceStatus. +func (sis SiteInstanceStatus) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if sasv.SiteAuthSettingsV2Properties != nil { - objectMap["properties"] = sasv.SiteAuthSettingsV2Properties + if sis.SiteInstanceStatusProperties != nil { + objectMap["properties"] = sis.SiteInstanceStatusProperties } - if sasv.Kind != nil { - objectMap["kind"] = sasv.Kind + if sis.Kind != nil { + objectMap["kind"] = sis.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for SiteAuthSettingsV2 struct. -func (sasv *SiteAuthSettingsV2) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for SiteInstanceStatus struct. +func (sis *SiteInstanceStatus) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -22964,12 +25755,12 @@ func (sasv *SiteAuthSettingsV2) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var siteAuthSettingsV2Properties SiteAuthSettingsV2Properties - err = json.Unmarshal(*v, &siteAuthSettingsV2Properties) + var siteInstanceStatusProperties SiteInstanceStatusProperties + err = json.Unmarshal(*v, &siteInstanceStatusProperties) if err != nil { return err } - sasv.SiteAuthSettingsV2Properties = &siteAuthSettingsV2Properties + sis.SiteInstanceStatusProperties = &siteInstanceStatusProperties } case "id": if v != nil { @@ -22978,7 +25769,7 @@ func (sasv *SiteAuthSettingsV2) UnmarshalJSON(body []byte) error { if err != nil { return err } - sasv.ID = &ID + sis.ID = &ID } case "name": if v != nil { @@ -22987,7 +25778,7 @@ func (sasv *SiteAuthSettingsV2) UnmarshalJSON(body []byte) error { if err != nil { return err } - sasv.Name = &name + sis.Name = &name } case "kind": if v != nil { @@ -22996,7 +25787,7 @@ func (sasv *SiteAuthSettingsV2) UnmarshalJSON(body []byte) error { if err != nil { return err } - sasv.Kind = &kind + sis.Kind = &kind } case "type": if v != nil { @@ -23005,7 +25796,7 @@ func (sasv *SiteAuthSettingsV2) UnmarshalJSON(body []byte) error { if err != nil { return err } - sasv.Type = &typeVar + sis.Type = &typeVar } } } @@ -23013,412 +25804,60 @@ func (sasv *SiteAuthSettingsV2) UnmarshalJSON(body []byte) error { return nil } -// SiteAuthSettingsV2Properties siteAuthSettingsV2 resource specific properties -type SiteAuthSettingsV2Properties struct { - // Platform - The configuration settings of the platform of App Service Authentication/Authorization. - Platform *AuthPlatform `json:"platform,omitempty"` - // GlobalValidation - The configuration settings that determines the validation flow of users using App Service Authentication/Authorization. - GlobalValidation *GlobalValidation `json:"globalValidation,omitempty"` - // IdentityProviders - The configuration settings of each of the identity providers used to configure App Service Authentication/Authorization. - IdentityProviders *IdentityProviders `json:"identityProviders,omitempty"` - // Login - The configuration settings of the login flow of users using App Service Authentication/Authorization. - Login *Login `json:"login,omitempty"` - // HTTPSettings - The configuration settings of the HTTP requests for authentication and authorization requests made against App Service Authentication/Authorization. - HTTPSettings *HTTPSettings `json:"httpSettings,omitempty"` -} - -// SiteCloneability represents whether or not an app is cloneable. -type SiteCloneability struct { - autorest.Response `json:"-"` - // Result - Name of app. Possible values include: 'CloneAbilityResultCloneable', 'CloneAbilityResultPartiallyCloneable', 'CloneAbilityResultNotCloneable' - Result CloneAbilityResult `json:"result,omitempty"` - // BlockingFeatures - List of features enabled on app that prevent cloning. - BlockingFeatures *[]SiteCloneabilityCriterion `json:"blockingFeatures,omitempty"` - // UnsupportedFeatures - List of features enabled on app that are non-blocking but cannot be cloned. The app can still be cloned - // but the features in this list will not be set up on cloned app. - UnsupportedFeatures *[]SiteCloneabilityCriterion `json:"unsupportedFeatures,omitempty"` - // BlockingCharacteristics - List of blocking application characteristics. - BlockingCharacteristics *[]SiteCloneabilityCriterion `json:"blockingCharacteristics,omitempty"` -} - -// SiteCloneabilityCriterion an app cloneability criterion. -type SiteCloneabilityCriterion struct { - // Name - Name of criterion. - Name *string `json:"name,omitempty"` - // Description - Description of criterion. - Description *string `json:"description,omitempty"` -} - -// SiteConfig configuration of an App Service app. -type SiteConfig struct { - // NumberOfWorkers - Number of workers. - NumberOfWorkers *int32 `json:"numberOfWorkers,omitempty"` - // DefaultDocuments - Default documents. - DefaultDocuments *[]string `json:"defaultDocuments,omitempty"` - // NetFrameworkVersion - .NET Framework version. - NetFrameworkVersion *string `json:"netFrameworkVersion,omitempty"` - // PhpVersion - Version of PHP. - PhpVersion *string `json:"phpVersion,omitempty"` - // PythonVersion - Version of Python. - PythonVersion *string `json:"pythonVersion,omitempty"` - // NodeVersion - Version of Node.js. - NodeVersion *string `json:"nodeVersion,omitempty"` - // PowerShellVersion - Version of PowerShell. - PowerShellVersion *string `json:"powerShellVersion,omitempty"` - // LinuxFxVersion - Linux App Framework and version - LinuxFxVersion *string `json:"linuxFxVersion,omitempty"` - // WindowsFxVersion - Xenon App Framework and version - WindowsFxVersion *string `json:"windowsFxVersion,omitempty"` - // RequestTracingEnabled - true if request tracing is enabled; otherwise, false. - RequestTracingEnabled *bool `json:"requestTracingEnabled,omitempty"` - // RequestTracingExpirationTime - Request tracing expiration time. - RequestTracingExpirationTime *date.Time `json:"requestTracingExpirationTime,omitempty"` - // RemoteDebuggingEnabled - true if remote debugging is enabled; otherwise, false. - RemoteDebuggingEnabled *bool `json:"remoteDebuggingEnabled,omitempty"` - // RemoteDebuggingVersion - Remote debugging version. - RemoteDebuggingVersion *string `json:"remoteDebuggingVersion,omitempty"` - // HTTPLoggingEnabled - true if HTTP logging is enabled; otherwise, false. - HTTPLoggingEnabled *bool `json:"httpLoggingEnabled,omitempty"` - // AcrUseManagedIdentityCreds - Flag to use Managed Identity Creds for ACR pull - AcrUseManagedIdentityCreds *bool `json:"acrUseManagedIdentityCreds,omitempty"` - // AcrUserManagedIdentityID - If using user managed identity, the user managed identity ClientId - AcrUserManagedIdentityID *string `json:"acrUserManagedIdentityID,omitempty"` - // LogsDirectorySizeLimit - HTTP logs directory size limit. - LogsDirectorySizeLimit *int32 `json:"logsDirectorySizeLimit,omitempty"` - // DetailedErrorLoggingEnabled - true if detailed error logging is enabled; otherwise, false. - DetailedErrorLoggingEnabled *bool `json:"detailedErrorLoggingEnabled,omitempty"` - // PublishingUsername - Publishing user name. - PublishingUsername *string `json:"publishingUsername,omitempty"` - // AppSettings - Application settings. - AppSettings *[]NameValuePair `json:"appSettings,omitempty"` - // ConnectionStrings - Connection strings. - ConnectionStrings *[]ConnStringInfo `json:"connectionStrings,omitempty"` - // MachineKey - READ-ONLY; Site MachineKey. - MachineKey *SiteMachineKey `json:"machineKey,omitempty"` - // HandlerMappings - Handler mappings. - HandlerMappings *[]HandlerMapping `json:"handlerMappings,omitempty"` - // DocumentRoot - Document root. - DocumentRoot *string `json:"documentRoot,omitempty"` - // ScmType - SCM type. Possible values include: 'ScmTypeNone', 'ScmTypeDropbox', 'ScmTypeTfs', 'ScmTypeLocalGit', 'ScmTypeGitHub', 'ScmTypeCodePlexGit', 'ScmTypeCodePlexHg', 'ScmTypeBitbucketGit', 'ScmTypeBitbucketHg', 'ScmTypeExternalGit', 'ScmTypeExternalHg', 'ScmTypeOneDrive', 'ScmTypeVSO', 'ScmTypeVSTSRM' - ScmType ScmType `json:"scmType,omitempty"` - // Use32BitWorkerProcess - true to use 32-bit worker process; otherwise, false. - Use32BitWorkerProcess *bool `json:"use32BitWorkerProcess,omitempty"` - // WebSocketsEnabled - true if WebSocket is enabled; otherwise, false. - WebSocketsEnabled *bool `json:"webSocketsEnabled,omitempty"` - // AlwaysOn - true if Always On is enabled; otherwise, false. - AlwaysOn *bool `json:"alwaysOn,omitempty"` - // JavaVersion - Java version. - JavaVersion *string `json:"javaVersion,omitempty"` - // JavaContainer - Java container. - JavaContainer *string `json:"javaContainer,omitempty"` - // JavaContainerVersion - Java container version. - JavaContainerVersion *string `json:"javaContainerVersion,omitempty"` - // AppCommandLine - App command line to launch. - AppCommandLine *string `json:"appCommandLine,omitempty"` - // ManagedPipelineMode - Managed pipeline mode. Possible values include: 'ManagedPipelineModeIntegrated', 'ManagedPipelineModeClassic' - ManagedPipelineMode ManagedPipelineMode `json:"managedPipelineMode,omitempty"` - // VirtualApplications - Virtual applications. - VirtualApplications *[]VirtualApplication `json:"virtualApplications,omitempty"` - // LoadBalancing - Site load balancing. Possible values include: 'SiteLoadBalancingWeightedRoundRobin', 'SiteLoadBalancingLeastRequests', 'SiteLoadBalancingLeastResponseTime', 'SiteLoadBalancingWeightedTotalTraffic', 'SiteLoadBalancingRequestHash', 'SiteLoadBalancingPerSiteRoundRobin' - LoadBalancing SiteLoadBalancing `json:"loadBalancing,omitempty"` - // Experiments - This is work around for polymorphic types. - Experiments *Experiments `json:"experiments,omitempty"` - // Limits - Site limits. - Limits *SiteLimits `json:"limits,omitempty"` - // AutoHealEnabled - true if Auto Heal is enabled; otherwise, false. - AutoHealEnabled *bool `json:"autoHealEnabled,omitempty"` - // AutoHealRules - Auto Heal rules. - AutoHealRules *AutoHealRules `json:"autoHealRules,omitempty"` - // TracingOptions - Tracing options. - TracingOptions *string `json:"tracingOptions,omitempty"` - // VnetName - Virtual Network name. - VnetName *string `json:"vnetName,omitempty"` - // VnetRouteAllEnabled - 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"` - // VnetPrivatePortsCount - The number of private ports assigned to this app. These will be assigned dynamically on runtime. - VnetPrivatePortsCount *int32 `json:"vnetPrivatePortsCount,omitempty"` - // Cors - Cross-Origin Resource Sharing (CORS) settings. - Cors *CorsSettings `json:"cors,omitempty"` - // Push - Push endpoint settings. - Push *PushSettings `json:"push,omitempty"` - // APIDefinition - Information about the formal API definition for the app. - APIDefinition *APIDefinitionInfo `json:"apiDefinition,omitempty"` - // APIManagementConfig - Azure API management settings linked to the app. - APIManagementConfig *APIManagementConfig `json:"apiManagementConfig,omitempty"` - // AutoSwapSlotName - Auto-swap slot name. - AutoSwapSlotName *string `json:"autoSwapSlotName,omitempty"` - // LocalMySQLEnabled - true to enable local MySQL; otherwise, false. - LocalMySQLEnabled *bool `json:"localMySqlEnabled,omitempty"` - // ManagedServiceIdentityID - Managed Service Identity Id - ManagedServiceIdentityID *int32 `json:"managedServiceIdentityId,omitempty"` - // XManagedServiceIdentityID - Explicit Managed Service Identity Id - XManagedServiceIdentityID *int32 `json:"xManagedServiceIdentityId,omitempty"` - // KeyVaultReferenceIdentity - Identity to use for Key Vault Reference authentication. - KeyVaultReferenceIdentity *string `json:"keyVaultReferenceIdentity,omitempty"` - // IPSecurityRestrictions - IP security restrictions for main. - IPSecurityRestrictions *[]IPSecurityRestriction `json:"ipSecurityRestrictions,omitempty"` - // ScmIPSecurityRestrictions - IP security restrictions for scm. - ScmIPSecurityRestrictions *[]IPSecurityRestriction `json:"scmIpSecurityRestrictions,omitempty"` - // ScmIPSecurityRestrictionsUseMain - IP security restrictions for scm to use main. - ScmIPSecurityRestrictionsUseMain *bool `json:"scmIpSecurityRestrictionsUseMain,omitempty"` - // HTTP20Enabled - Http20Enabled: configures a web site to allow clients to connect over http2.0 - HTTP20Enabled *bool `json:"http20Enabled,omitempty"` - // MinTLSVersion - MinTlsVersion: configures the minimum version of TLS required for SSL requests. Possible values include: 'SupportedTLSVersionsOneFullStopZero', 'SupportedTLSVersionsOneFullStopOne', 'SupportedTLSVersionsOneFullStopTwo' - MinTLSVersion SupportedTLSVersions `json:"minTlsVersion,omitempty"` - // ScmMinTLSVersion - ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. Possible values include: 'SupportedTLSVersionsOneFullStopZero', 'SupportedTLSVersionsOneFullStopOne', 'SupportedTLSVersionsOneFullStopTwo' - ScmMinTLSVersion SupportedTLSVersions `json:"scmMinTlsVersion,omitempty"` - // FtpsState - State of FTP / FTPS service. Possible values include: 'FtpsStateAllAllowed', 'FtpsStateFtpsOnly', 'FtpsStateDisabled' - FtpsState FtpsState `json:"ftpsState,omitempty"` - // PreWarmedInstanceCount - Number of preWarmed instances. - // This setting only applies to the Consumption and Elastic Plans - PreWarmedInstanceCount *int32 `json:"preWarmedInstanceCount,omitempty"` - // FunctionAppScaleLimit - Maximum number of workers that a site can scale out to. - // This setting only applies to the Consumption and Elastic Premium Plans - FunctionAppScaleLimit *int32 `json:"functionAppScaleLimit,omitempty"` - // HealthCheckPath - Health check path - HealthCheckPath *string `json:"healthCheckPath,omitempty"` - // FunctionsRuntimeScaleMonitoringEnabled - Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled, - // the ScaleController will not monitor event sources directly, but will instead call to the - // runtime to get scale status. - FunctionsRuntimeScaleMonitoringEnabled *bool `json:"functionsRuntimeScaleMonitoringEnabled,omitempty"` - // WebsiteTimeZone - Sets the time zone a site uses for generating timestamps. Compatible with Linux and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence over this config. For Linux, expects tz database values https://www.iana.org/time-zones (for a quick reference see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, expects one of the time zones listed under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones - WebsiteTimeZone *string `json:"websiteTimeZone,omitempty"` - // MinimumElasticInstanceCount - Number of minimum instance count for a site - // This setting only applies to the Elastic Plans - MinimumElasticInstanceCount *int32 `json:"minimumElasticInstanceCount,omitempty"` - // AzureStorageAccounts - List of Azure Storage Accounts. - AzureStorageAccounts map[string]*AzureStorageInfoValue `json:"azureStorageAccounts"` - // PublicNetworkAccess - Property to allow or block all public traffic. - PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` +// SiteInstanceStatusProperties webSiteInstanceStatus resource specific properties +type SiteInstanceStatusProperties struct { + // State - Possible values include: 'SiteRuntimeStateREADY', 'SiteRuntimeStateSTOPPED', 'SiteRuntimeStateUNKNOWN' + State SiteRuntimeState `json:"state,omitempty"` + // StatusURL - Link to the GetStatusApi in Kudu + StatusURL *string `json:"statusUrl,omitempty"` + // DetectorURL - Link to the Diagnose and Solve Portal + DetectorURL *string `json:"detectorUrl,omitempty"` + // ConsoleURL - Link to the console to web app instance + ConsoleURL *string `json:"consoleUrl,omitempty"` + // HealthCheckURL - Link to the console to web app instance + HealthCheckURL *string `json:"healthCheckUrl,omitempty"` + Containers map[string]*ContainerInfo `json:"containers"` } -// MarshalJSON is the custom marshaler for SiteConfig. -func (sc SiteConfig) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sc.NumberOfWorkers != nil { - objectMap["numberOfWorkers"] = sc.NumberOfWorkers - } - if sc.DefaultDocuments != nil { - objectMap["defaultDocuments"] = sc.DefaultDocuments - } - if sc.NetFrameworkVersion != nil { - objectMap["netFrameworkVersion"] = sc.NetFrameworkVersion - } - if sc.PhpVersion != nil { - objectMap["phpVersion"] = sc.PhpVersion - } - if sc.PythonVersion != nil { - objectMap["pythonVersion"] = sc.PythonVersion - } - if sc.NodeVersion != nil { - objectMap["nodeVersion"] = sc.NodeVersion - } - if sc.PowerShellVersion != nil { - objectMap["powerShellVersion"] = sc.PowerShellVersion - } - if sc.LinuxFxVersion != nil { - objectMap["linuxFxVersion"] = sc.LinuxFxVersion - } - if sc.WindowsFxVersion != nil { - objectMap["windowsFxVersion"] = sc.WindowsFxVersion - } - if sc.RequestTracingEnabled != nil { - objectMap["requestTracingEnabled"] = sc.RequestTracingEnabled - } - if sc.RequestTracingExpirationTime != nil { - objectMap["requestTracingExpirationTime"] = sc.RequestTracingExpirationTime - } - if sc.RemoteDebuggingEnabled != nil { - objectMap["remoteDebuggingEnabled"] = sc.RemoteDebuggingEnabled - } - if sc.RemoteDebuggingVersion != nil { - objectMap["remoteDebuggingVersion"] = sc.RemoteDebuggingVersion - } - if sc.HTTPLoggingEnabled != nil { - objectMap["httpLoggingEnabled"] = sc.HTTPLoggingEnabled - } - if sc.AcrUseManagedIdentityCreds != nil { - objectMap["acrUseManagedIdentityCreds"] = sc.AcrUseManagedIdentityCreds - } - if sc.AcrUserManagedIdentityID != nil { - objectMap["acrUserManagedIdentityID"] = sc.AcrUserManagedIdentityID - } - if sc.LogsDirectorySizeLimit != nil { - objectMap["logsDirectorySizeLimit"] = sc.LogsDirectorySizeLimit - } - if sc.DetailedErrorLoggingEnabled != nil { - objectMap["detailedErrorLoggingEnabled"] = sc.DetailedErrorLoggingEnabled - } - if sc.PublishingUsername != nil { - objectMap["publishingUsername"] = sc.PublishingUsername - } - if sc.AppSettings != nil { - objectMap["appSettings"] = sc.AppSettings - } - if sc.ConnectionStrings != nil { - objectMap["connectionStrings"] = sc.ConnectionStrings - } - if sc.HandlerMappings != nil { - objectMap["handlerMappings"] = sc.HandlerMappings - } - if sc.DocumentRoot != nil { - objectMap["documentRoot"] = sc.DocumentRoot - } - if sc.ScmType != "" { - objectMap["scmType"] = sc.ScmType - } - if sc.Use32BitWorkerProcess != nil { - objectMap["use32BitWorkerProcess"] = sc.Use32BitWorkerProcess - } - if sc.WebSocketsEnabled != nil { - objectMap["webSocketsEnabled"] = sc.WebSocketsEnabled - } - if sc.AlwaysOn != nil { - objectMap["alwaysOn"] = sc.AlwaysOn - } - if sc.JavaVersion != nil { - objectMap["javaVersion"] = sc.JavaVersion - } - if sc.JavaContainer != nil { - objectMap["javaContainer"] = sc.JavaContainer - } - if sc.JavaContainerVersion != nil { - objectMap["javaContainerVersion"] = sc.JavaContainerVersion - } - if sc.AppCommandLine != nil { - objectMap["appCommandLine"] = sc.AppCommandLine - } - if sc.ManagedPipelineMode != "" { - objectMap["managedPipelineMode"] = sc.ManagedPipelineMode - } - if sc.VirtualApplications != nil { - objectMap["virtualApplications"] = sc.VirtualApplications - } - if sc.LoadBalancing != "" { - objectMap["loadBalancing"] = sc.LoadBalancing - } - if sc.Experiments != nil { - objectMap["experiments"] = sc.Experiments - } - if sc.Limits != nil { - objectMap["limits"] = sc.Limits - } - if sc.AutoHealEnabled != nil { - objectMap["autoHealEnabled"] = sc.AutoHealEnabled - } - if sc.AutoHealRules != nil { - objectMap["autoHealRules"] = sc.AutoHealRules - } - if sc.TracingOptions != nil { - objectMap["tracingOptions"] = sc.TracingOptions - } - if sc.VnetName != nil { - objectMap["vnetName"] = sc.VnetName - } - if sc.VnetRouteAllEnabled != nil { - objectMap["vnetRouteAllEnabled"] = sc.VnetRouteAllEnabled - } - if sc.VnetPrivatePortsCount != nil { - objectMap["vnetPrivatePortsCount"] = sc.VnetPrivatePortsCount - } - if sc.Cors != nil { - objectMap["cors"] = sc.Cors - } - if sc.Push != nil { - objectMap["push"] = sc.Push - } - if sc.APIDefinition != nil { - objectMap["apiDefinition"] = sc.APIDefinition - } - if sc.APIManagementConfig != nil { - objectMap["apiManagementConfig"] = sc.APIManagementConfig - } - if sc.AutoSwapSlotName != nil { - objectMap["autoSwapSlotName"] = sc.AutoSwapSlotName - } - if sc.LocalMySQLEnabled != nil { - objectMap["localMySqlEnabled"] = sc.LocalMySQLEnabled - } - if sc.ManagedServiceIdentityID != nil { - objectMap["managedServiceIdentityId"] = sc.ManagedServiceIdentityID - } - if sc.XManagedServiceIdentityID != nil { - objectMap["xManagedServiceIdentityId"] = sc.XManagedServiceIdentityID - } - if sc.KeyVaultReferenceIdentity != nil { - objectMap["keyVaultReferenceIdentity"] = sc.KeyVaultReferenceIdentity - } - if sc.IPSecurityRestrictions != nil { - objectMap["ipSecurityRestrictions"] = sc.IPSecurityRestrictions - } - if sc.ScmIPSecurityRestrictions != nil { - objectMap["scmIpSecurityRestrictions"] = sc.ScmIPSecurityRestrictions - } - if sc.ScmIPSecurityRestrictionsUseMain != nil { - objectMap["scmIpSecurityRestrictionsUseMain"] = sc.ScmIPSecurityRestrictionsUseMain - } - if sc.HTTP20Enabled != nil { - objectMap["http20Enabled"] = sc.HTTP20Enabled - } - if sc.MinTLSVersion != "" { - objectMap["minTlsVersion"] = sc.MinTLSVersion - } - if sc.ScmMinTLSVersion != "" { - objectMap["scmMinTlsVersion"] = sc.ScmMinTLSVersion - } - if sc.FtpsState != "" { - objectMap["ftpsState"] = sc.FtpsState - } - if sc.PreWarmedInstanceCount != nil { - objectMap["preWarmedInstanceCount"] = sc.PreWarmedInstanceCount - } - if sc.FunctionAppScaleLimit != nil { - objectMap["functionAppScaleLimit"] = sc.FunctionAppScaleLimit - } - if sc.HealthCheckPath != nil { - objectMap["healthCheckPath"] = sc.HealthCheckPath +// MarshalJSON is the custom marshaler for SiteInstanceStatusProperties. +func (sis SiteInstanceStatusProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sis.State != "" { + objectMap["state"] = sis.State } - if sc.FunctionsRuntimeScaleMonitoringEnabled != nil { - objectMap["functionsRuntimeScaleMonitoringEnabled"] = sc.FunctionsRuntimeScaleMonitoringEnabled + if sis.StatusURL != nil { + objectMap["statusUrl"] = sis.StatusURL } - if sc.WebsiteTimeZone != nil { - objectMap["websiteTimeZone"] = sc.WebsiteTimeZone + if sis.DetectorURL != nil { + objectMap["detectorUrl"] = sis.DetectorURL } - if sc.MinimumElasticInstanceCount != nil { - objectMap["minimumElasticInstanceCount"] = sc.MinimumElasticInstanceCount + if sis.ConsoleURL != nil { + objectMap["consoleUrl"] = sis.ConsoleURL } - if sc.AzureStorageAccounts != nil { - objectMap["azureStorageAccounts"] = sc.AzureStorageAccounts + if sis.HealthCheckURL != nil { + objectMap["healthCheckUrl"] = sis.HealthCheckURL } - if sc.PublicNetworkAccess != nil { - objectMap["publicNetworkAccess"] = sc.PublicNetworkAccess + if sis.Containers != nil { + objectMap["containers"] = sis.Containers } return json.Marshal(objectMap) } -// SiteConfigPropertiesDictionary site config properties dictionary. -type SiteConfigPropertiesDictionary struct { - // Use32BitWorkerProcess - READ-ONLY; true if use32BitWorkerProcess should be set to true for the stack; otherwise, false. - Use32BitWorkerProcess *bool `json:"use32BitWorkerProcess,omitempty"` - // LinuxFxVersion - READ-ONLY; LinuxFxVersion configuration setting. - LinuxFxVersion *string `json:"linuxFxVersion,omitempty"` - // JavaVersion - READ-ONLY; JavaVersion configuration setting. - JavaVersion *string `json:"javaVersion,omitempty"` - // PowerShellVersion - READ-ONLY; PowerShellVersion configuration setting. - PowerShellVersion *string `json:"powerShellVersion,omitempty"` -} - -// MarshalJSON is the custom marshaler for SiteConfigPropertiesDictionary. -func (scpd SiteConfigPropertiesDictionary) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) +// SiteLimits metric limits set on an app. +type SiteLimits struct { + // MaxPercentageCPU - Maximum allowed CPU usage percentage. + MaxPercentageCPU *float64 `json:"maxPercentageCpu,omitempty"` + // MaxMemoryInMb - Maximum allowed memory usage in MB. + MaxMemoryInMb *int64 `json:"maxMemoryInMb,omitempty"` + // MaxDiskSizeInMb - Maximum allowed disk size usage in MB. + MaxDiskSizeInMb *int64 `json:"maxDiskSizeInMb,omitempty"` } -// SiteConfigResource web app configuration ARM resource. -type SiteConfigResource struct { +// SiteLogsConfig configuration of App Service site logs. +type SiteLogsConfig struct { autorest.Response `json:"-"` - // SiteConfig - Core resource properties - *SiteConfig `json:"properties,omitempty"` + // SiteLogsConfigProperties - SiteLogsConfig resource specific properties + *SiteLogsConfigProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -23429,20 +25868,20 @@ type SiteConfigResource struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for SiteConfigResource. -func (scr SiteConfigResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for SiteLogsConfig. +func (slc SiteLogsConfig) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if scr.SiteConfig != nil { - objectMap["properties"] = scr.SiteConfig + if slc.SiteLogsConfigProperties != nil { + objectMap["properties"] = slc.SiteLogsConfigProperties } - if scr.Kind != nil { - objectMap["kind"] = scr.Kind + if slc.Kind != nil { + objectMap["kind"] = slc.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for SiteConfigResource struct. -func (scr *SiteConfigResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for SiteLogsConfig struct. +func (slc *SiteLogsConfig) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -23452,12 +25891,12 @@ func (scr *SiteConfigResource) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var siteConfig SiteConfig - err = json.Unmarshal(*v, &siteConfig) + var siteLogsConfigProperties SiteLogsConfigProperties + err = json.Unmarshal(*v, &siteLogsConfigProperties) if err != nil { return err } - scr.SiteConfig = &siteConfig + slc.SiteLogsConfigProperties = &siteLogsConfigProperties } case "id": if v != nil { @@ -23466,7 +25905,7 @@ func (scr *SiteConfigResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - scr.ID = &ID + slc.ID = &ID } case "name": if v != nil { @@ -23475,7 +25914,7 @@ func (scr *SiteConfigResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - scr.Name = &name + slc.Name = &name } case "kind": if v != nil { @@ -23484,7 +25923,7 @@ func (scr *SiteConfigResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - scr.Kind = &kind + slc.Kind = &kind } case "type": if v != nil { @@ -23493,7 +25932,7 @@ func (scr *SiteConfigResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - scr.Type = &typeVar + slc.Type = &typeVar } } } @@ -23501,178 +25940,303 @@ func (scr *SiteConfigResource) UnmarshalJSON(body []byte) error { return nil } -// SiteConfigResourceCollection collection of site configurations. -type SiteConfigResourceCollection struct { - autorest.Response `json:"-"` - // Value - Collection of resources. - Value *[]SiteConfigResource `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty"` +// SiteLogsConfigProperties siteLogsConfig resource specific properties +type SiteLogsConfigProperties struct { + // ApplicationLogs - Application logs configuration. + ApplicationLogs *ApplicationLogsConfig `json:"applicationLogs,omitempty"` + // HTTPLogs - HTTP logs configuration. + HTTPLogs *HTTPLogsConfig `json:"httpLogs,omitempty"` + // FailedRequestsTracing - Failed requests tracing configuration. + FailedRequestsTracing *EnabledConfig `json:"failedRequestsTracing,omitempty"` + // DetailedErrorMessages - Detailed error messages configuration. + DetailedErrorMessages *EnabledConfig `json:"detailedErrorMessages,omitempty"` } -// MarshalJSON is the custom marshaler for SiteConfigResourceCollection. -func (scrc SiteConfigResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if scrc.Value != nil { - objectMap["value"] = scrc.Value - } - return json.Marshal(objectMap) +// SiteMachineKey machineKey of an app. +type SiteMachineKey struct { + // Validation - MachineKey validation. + Validation *string `json:"validation,omitempty"` + // ValidationKey - Validation key. + ValidationKey *string `json:"validationKey,omitempty"` + // Decryption - Algorithm used for decryption. + Decryption *string `json:"decryption,omitempty"` + // DecryptionKey - Decryption key. + DecryptionKey *string `json:"decryptionKey,omitempty"` } -// SiteConfigResourceCollectionIterator provides access to a complete listing of SiteConfigResource values. -type SiteConfigResourceCollectionIterator struct { - i int - page SiteConfigResourceCollectionPage +// SitePatchResource ARM resource for a site. +type SitePatchResource struct { + // SitePatchResourceProperties - SitePatchResource resource specific properties + *SitePatchResourceProperties `json:"properties,omitempty"` + Identity *ManagedServiceIdentity `json:"identity,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` } -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *SiteConfigResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SiteConfigResourceCollectionIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil +// MarshalJSON is the custom marshaler for SitePatchResource. +func (spr SitePatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spr.SitePatchResourceProperties != nil { + objectMap["properties"] = spr.SitePatchResourceProperties } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err + if spr.Identity != nil { + objectMap["identity"] = spr.Identity } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *SiteConfigResourceCollectionIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SiteConfigResourceCollectionIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter SiteConfigResourceCollectionIterator) Response() SiteConfigResourceCollection { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter SiteConfigResourceCollectionIterator) Value() SiteConfigResource { - if !iter.page.NotDone() { - return SiteConfigResource{} + if spr.Kind != nil { + objectMap["kind"] = spr.Kind } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the SiteConfigResourceCollectionIterator type. -func NewSiteConfigResourceCollectionIterator(page SiteConfigResourceCollectionPage) SiteConfigResourceCollectionIterator { - return SiteConfigResourceCollectionIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (scrc SiteConfigResourceCollection) IsEmpty() bool { - return scrc.Value == nil || len(*scrc.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (scrc SiteConfigResourceCollection) hasNextLink() bool { - return scrc.NextLink != nil && len(*scrc.NextLink) != 0 + return json.Marshal(objectMap) } -// siteConfigResourceCollectionPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (scrc SiteConfigResourceCollection) siteConfigResourceCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !scrc.hasNextLink() { - return nil, nil +// UnmarshalJSON is the custom unmarshaler for SitePatchResource struct. +func (spr *SitePatchResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(scrc.NextLink))) -} - -// SiteConfigResourceCollectionPage contains a page of SiteConfigResource values. -type SiteConfigResourceCollectionPage struct { - fn func(context.Context, SiteConfigResourceCollection) (SiteConfigResourceCollection, error) - scrc SiteConfigResourceCollection -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *SiteConfigResourceCollectionPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SiteConfigResourceCollectionPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode + for k, v := range m { + switch k { + case "properties": + if v != nil { + var sitePatchResourceProperties SitePatchResourceProperties + err = json.Unmarshal(*v, &sitePatchResourceProperties) + if err != nil { + return err + } + spr.SitePatchResourceProperties = &sitePatchResourceProperties + } + case "identity": + if v != nil { + var identity ManagedServiceIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + spr.Identity = &identity + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + spr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + spr.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + spr.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + spr.Type = &typeVar } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.scrc) - if err != nil { - return err - } - page.scrc = next - if !next.hasNextLink() || !next.IsEmpty() { - break } } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *SiteConfigResourceCollectionPage) Next() error { - return page.NextWithContext(context.Background()) -} -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SiteConfigResourceCollectionPage) NotDone() bool { - return !page.scrc.IsEmpty() + return nil } -// Response returns the raw server response from the last page request. -func (page SiteConfigResourceCollectionPage) Response() SiteConfigResourceCollection { - return page.scrc +// SitePatchResourceProperties sitePatchResource resource specific properties +type SitePatchResourceProperties struct { + // State - READ-ONLY; Current state of the app. + State *string `json:"state,omitempty"` + // HostNames - READ-ONLY; Hostnames associated with the app. + HostNames *[]string `json:"hostNames,omitempty"` + // RepositorySiteName - READ-ONLY; Name of the repository site. + RepositorySiteName *string `json:"repositorySiteName,omitempty"` + // UsageState - READ-ONLY; State indicating whether the app has exceeded its quota usage. Read-only. Possible values include: 'UsageStateNormal', 'UsageStateExceeded' + UsageState UsageState `json:"usageState,omitempty"` + // Enabled - true if the app is enabled; otherwise, false. Setting this value to false disables the app (takes the app offline). + Enabled *bool `json:"enabled,omitempty"` + // EnabledHostNames - READ-ONLY; Enabled hostnames for the app.Hostnames need to be assigned (see HostNames) AND enabled. Otherwise, + // the app is not served on those hostnames. + EnabledHostNames *[]string `json:"enabledHostNames,omitempty"` + // AvailabilityState - READ-ONLY; Management information availability state for the app. Possible values include: 'SiteAvailabilityStateNormal', 'SiteAvailabilityStateLimited', 'SiteAvailabilityStateDisasterRecoveryMode' + AvailabilityState SiteAvailabilityState `json:"availabilityState,omitempty"` + // HostNameSslStates - Hostname SSL states are used to manage the SSL bindings for app's hostnames. + HostNameSslStates *[]HostNameSslState `json:"hostNameSslStates,omitempty"` + // ServerFarmID - Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + ServerFarmID *string `json:"serverFarmId,omitempty"` + // Reserved - true if reserved; otherwise, false. + Reserved *bool `json:"reserved,omitempty"` + // IsXenon - Obsolete: Hyper-V sandbox. + IsXenon *bool `json:"isXenon,omitempty"` + // HyperV - Hyper-V sandbox. + HyperV *bool `json:"hyperV,omitempty"` + // LastModifiedTimeUtc - READ-ONLY; Last time the app was modified, in UTC. Read-only. + LastModifiedTimeUtc *date.Time `json:"lastModifiedTimeUtc,omitempty"` + // SiteConfig - Configuration of the app. + SiteConfig *SiteConfig `json:"siteConfig,omitempty"` + // TrafficManagerHostNames - READ-ONLY; Azure Traffic Manager hostnames associated with the app. Read-only. + TrafficManagerHostNames *[]string `json:"trafficManagerHostNames,omitempty"` + // ScmSiteAlsoStopped - true to stop SCM (KUDU) site when the app is stopped; otherwise, false. The default is false. + ScmSiteAlsoStopped *bool `json:"scmSiteAlsoStopped,omitempty"` + // TargetSwapSlot - READ-ONLY; Specifies which deployment slot this app will swap into. Read-only. + TargetSwapSlot *string `json:"targetSwapSlot,omitempty"` + // HostingEnvironmentProfile - App Service Environment to use for the app. + HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` + // ClientAffinityEnabled - true to enable client affinity; false to stop sending session affinity cookies, which route client requests in the same session to the same instance. Default is true. + ClientAffinityEnabled *bool `json:"clientAffinityEnabled,omitempty"` + // ClientCertEnabled - true to enable client certificate authentication (TLS mutual authentication); otherwise, false. Default is false. + ClientCertEnabled *bool `json:"clientCertEnabled,omitempty"` + // ClientCertMode - This composes with ClientCertEnabled setting. + // - ClientCertEnabled: false means ClientCert is ignored. + // - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. + // - ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. Possible values include: 'ClientCertModeRequired', 'ClientCertModeOptional', 'ClientCertModeOptionalInteractiveUser' + ClientCertMode ClientCertMode `json:"clientCertMode,omitempty"` + // ClientCertExclusionPaths - client certificate authentication comma-separated exclusion paths + ClientCertExclusionPaths *string `json:"clientCertExclusionPaths,omitempty"` + // HostNamesDisabled - true to disable the public hostnames of the app; otherwise, false. + // If true, the app is only accessible via API management process. + HostNamesDisabled *bool `json:"hostNamesDisabled,omitempty"` + // CustomDomainVerificationID - Unique identifier that verifies the custom domains assigned to the app. Customer will add this id to a txt record for verification. + CustomDomainVerificationID *string `json:"customDomainVerificationId,omitempty"` + // OutboundIPAddresses - READ-ONLY; List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from tenants that site can be hosted with current settings. Read-only. + OutboundIPAddresses *string `json:"outboundIpAddresses,omitempty"` + // PossibleOutboundIPAddresses - READ-ONLY; List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read-only. + PossibleOutboundIPAddresses *string `json:"possibleOutboundIpAddresses,omitempty"` + // ContainerSize - Size of the function container. + ContainerSize *int32 `json:"containerSize,omitempty"` + // DailyMemoryTimeQuota - Maximum allowed daily memory-time quota (applicable on dynamic apps only). + DailyMemoryTimeQuota *int32 `json:"dailyMemoryTimeQuota,omitempty"` + // SuspendedTill - READ-ONLY; App suspended till in case memory-time quota is exceeded. + SuspendedTill *date.Time `json:"suspendedTill,omitempty"` + // MaxNumberOfWorkers - READ-ONLY; Maximum number of workers. + // This only applies to Functions container. + MaxNumberOfWorkers *int32 `json:"maxNumberOfWorkers,omitempty"` + // CloningInfo - If specified during app creation, the app is cloned from a source app. + CloningInfo *CloningInfo `json:"cloningInfo,omitempty"` + // ResourceGroup - READ-ONLY; Name of the resource group the app belongs to. Read-only. + ResourceGroup *string `json:"resourceGroup,omitempty"` + // IsDefaultContainer - READ-ONLY; true if the app is a default container; otherwise, false. + IsDefaultContainer *bool `json:"isDefaultContainer,omitempty"` + // DefaultHostName - READ-ONLY; Default hostname of the app. Read-only. + DefaultHostName *string `json:"defaultHostName,omitempty"` + // SlotSwapStatus - READ-ONLY; Status of the last deployment slot swap operation. + SlotSwapStatus *SlotSwapStatus `json:"slotSwapStatus,omitempty"` + // HTTPSOnly - HttpsOnly: configures a web site to accept only https requests. Issues redirect for + // http requests + HTTPSOnly *bool `json:"httpsOnly,omitempty"` + // RedundancyMode - Site redundancy mode. Possible values include: 'RedundancyModeNone', 'RedundancyModeManual', 'RedundancyModeFailover', 'RedundancyModeActiveActive', 'RedundancyModeGeoRedundant' + RedundancyMode RedundancyMode `json:"redundancyMode,omitempty"` + // InProgressOperationID - READ-ONLY; Specifies an operation id if this site has a pending operation. + InProgressOperationID *uuid.UUID `json:"inProgressOperationId,omitempty"` + // StorageAccountRequired - Checks if Customer provided storage account is required + StorageAccountRequired *bool `json:"storageAccountRequired,omitempty"` + // KeyVaultReferenceIdentity - Identity to use for Key Vault Reference authentication. + KeyVaultReferenceIdentity *string `json:"keyVaultReferenceIdentity,omitempty"` + // VirtualNetworkSubnetID - Azure Resource Manager ID of the Virtual network and subnet to be joined by Regional VNET Integration. + // This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} + VirtualNetworkSubnetID *string `json:"virtualNetworkSubnetId,omitempty"` } -// Values returns the slice of values for the current page or nil if there are no values. -func (page SiteConfigResourceCollectionPage) Values() []SiteConfigResource { - if page.scrc.IsEmpty() { - return nil +// MarshalJSON is the custom marshaler for SitePatchResourceProperties. +func (spr SitePatchResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spr.Enabled != nil { + objectMap["enabled"] = spr.Enabled } - return *page.scrc.Value -} - -// Creates a new instance of the SiteConfigResourceCollectionPage type. -func NewSiteConfigResourceCollectionPage(cur SiteConfigResourceCollection, getNextPage func(context.Context, SiteConfigResourceCollection) (SiteConfigResourceCollection, error)) SiteConfigResourceCollectionPage { - return SiteConfigResourceCollectionPage{ - fn: getNextPage, - scrc: cur, + if spr.HostNameSslStates != nil { + objectMap["hostNameSslStates"] = spr.HostNameSslStates + } + if spr.ServerFarmID != nil { + objectMap["serverFarmId"] = spr.ServerFarmID + } + if spr.Reserved != nil { + objectMap["reserved"] = spr.Reserved + } + if spr.IsXenon != nil { + objectMap["isXenon"] = spr.IsXenon + } + if spr.HyperV != nil { + objectMap["hyperV"] = spr.HyperV + } + if spr.SiteConfig != nil { + objectMap["siteConfig"] = spr.SiteConfig } + if spr.ScmSiteAlsoStopped != nil { + objectMap["scmSiteAlsoStopped"] = spr.ScmSiteAlsoStopped + } + if spr.HostingEnvironmentProfile != nil { + objectMap["hostingEnvironmentProfile"] = spr.HostingEnvironmentProfile + } + if spr.ClientAffinityEnabled != nil { + objectMap["clientAffinityEnabled"] = spr.ClientAffinityEnabled + } + if spr.ClientCertEnabled != nil { + objectMap["clientCertEnabled"] = spr.ClientCertEnabled + } + if spr.ClientCertMode != "" { + objectMap["clientCertMode"] = spr.ClientCertMode + } + if spr.ClientCertExclusionPaths != nil { + objectMap["clientCertExclusionPaths"] = spr.ClientCertExclusionPaths + } + if spr.HostNamesDisabled != nil { + objectMap["hostNamesDisabled"] = spr.HostNamesDisabled + } + if spr.CustomDomainVerificationID != nil { + objectMap["customDomainVerificationId"] = spr.CustomDomainVerificationID + } + if spr.ContainerSize != nil { + objectMap["containerSize"] = spr.ContainerSize + } + if spr.DailyMemoryTimeQuota != nil { + objectMap["dailyMemoryTimeQuota"] = spr.DailyMemoryTimeQuota + } + if spr.CloningInfo != nil { + objectMap["cloningInfo"] = spr.CloningInfo + } + if spr.HTTPSOnly != nil { + objectMap["httpsOnly"] = spr.HTTPSOnly + } + if spr.RedundancyMode != "" { + objectMap["redundancyMode"] = spr.RedundancyMode + } + if spr.StorageAccountRequired != nil { + objectMap["storageAccountRequired"] = spr.StorageAccountRequired + } + if spr.KeyVaultReferenceIdentity != nil { + objectMap["keyVaultReferenceIdentity"] = spr.KeyVaultReferenceIdentity + } + if spr.VirtualNetworkSubnetID != nil { + objectMap["virtualNetworkSubnetId"] = spr.VirtualNetworkSubnetID + } + return json.Marshal(objectMap) } -// SiteConfigurationSnapshotInfo a snapshot of a web app configuration. -type SiteConfigurationSnapshotInfo struct { - // SiteConfigurationSnapshotInfoProperties - SiteConfigurationSnapshotInfo resource specific properties - *SiteConfigurationSnapshotInfoProperties `json:"properties,omitempty"` +// SitePhpErrorLogFlag used for getting PHP error logging flag. +type SitePhpErrorLogFlag struct { + autorest.Response `json:"-"` + // SitePhpErrorLogFlagProperties - SitePhpErrorLogFlag resource specific properties + *SitePhpErrorLogFlagProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -23683,20 +26247,20 @@ type SiteConfigurationSnapshotInfo struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for SiteConfigurationSnapshotInfo. -func (scsi SiteConfigurationSnapshotInfo) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for SitePhpErrorLogFlag. +func (spelf SitePhpErrorLogFlag) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if scsi.SiteConfigurationSnapshotInfoProperties != nil { - objectMap["properties"] = scsi.SiteConfigurationSnapshotInfoProperties + if spelf.SitePhpErrorLogFlagProperties != nil { + objectMap["properties"] = spelf.SitePhpErrorLogFlagProperties } - if scsi.Kind != nil { - objectMap["kind"] = scsi.Kind + if spelf.Kind != nil { + objectMap["kind"] = spelf.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for SiteConfigurationSnapshotInfo struct. -func (scsi *SiteConfigurationSnapshotInfo) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for SitePhpErrorLogFlag struct. +func (spelf *SitePhpErrorLogFlag) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -23706,12 +26270,12 @@ func (scsi *SiteConfigurationSnapshotInfo) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var siteConfigurationSnapshotInfoProperties SiteConfigurationSnapshotInfoProperties - err = json.Unmarshal(*v, &siteConfigurationSnapshotInfoProperties) + var sitePhpErrorLogFlagProperties SitePhpErrorLogFlagProperties + err = json.Unmarshal(*v, &sitePhpErrorLogFlagProperties) if err != nil { return err } - scsi.SiteConfigurationSnapshotInfoProperties = &siteConfigurationSnapshotInfoProperties + spelf.SitePhpErrorLogFlagProperties = &sitePhpErrorLogFlagProperties } case "id": if v != nil { @@ -23720,7 +26284,7 @@ func (scsi *SiteConfigurationSnapshotInfo) UnmarshalJSON(body []byte) error { if err != nil { return err } - scsi.ID = &ID + spelf.ID = &ID } case "name": if v != nil { @@ -23729,7 +26293,7 @@ func (scsi *SiteConfigurationSnapshotInfo) UnmarshalJSON(body []byte) error { if err != nil { return err } - scsi.Name = &name + spelf.Name = &name } case "kind": if v != nil { @@ -23738,7 +26302,7 @@ func (scsi *SiteConfigurationSnapshotInfo) UnmarshalJSON(body []byte) error { if err != nil { return err } - scsi.Kind = &kind + spelf.Kind = &kind } case "type": if v != nil { @@ -23747,7 +26311,7 @@ func (scsi *SiteConfigurationSnapshotInfo) UnmarshalJSON(body []byte) error { if err != nil { return err } - scsi.Type = &typeVar + spelf.Type = &typeVar } } } @@ -23755,195 +26319,232 @@ func (scsi *SiteConfigurationSnapshotInfo) UnmarshalJSON(body []byte) error { return nil } -// SiteConfigurationSnapshotInfoCollection collection of metadata for the app configuration snapshots that -// can be restored. -type SiteConfigurationSnapshotInfoCollection struct { - autorest.Response `json:"-"` - // Value - Collection of resources. - Value *[]SiteConfigurationSnapshotInfo `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for SiteConfigurationSnapshotInfoCollection. -func (scsic SiteConfigurationSnapshotInfoCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if scsic.Value != nil { - objectMap["value"] = scsic.Value - } - return json.Marshal(objectMap) +// SitePhpErrorLogFlagProperties sitePhpErrorLogFlag resource specific properties +type SitePhpErrorLogFlagProperties struct { + // LocalLogErrors - Local log_errors setting. + LocalLogErrors *string `json:"localLogErrors,omitempty"` + // MasterLogErrors - Master log_errors setting. + MasterLogErrors *string `json:"masterLogErrors,omitempty"` + // LocalLogErrorsMaxLength - Local log_errors_max_len setting. + LocalLogErrorsMaxLength *string `json:"localLogErrorsMaxLength,omitempty"` + // MasterLogErrorsMaxLength - Master log_errors_max_len setting. + MasterLogErrorsMaxLength *string `json:"masterLogErrorsMaxLength,omitempty"` } -// SiteConfigurationSnapshotInfoCollectionIterator provides access to a complete listing of -// SiteConfigurationSnapshotInfo values. -type SiteConfigurationSnapshotInfoCollectionIterator struct { - i int - page SiteConfigurationSnapshotInfoCollectionPage +// SiteProperties site resource specific properties +type SiteProperties struct { + // State - READ-ONLY; Current state of the app. + State *string `json:"state,omitempty"` + // HostNames - READ-ONLY; Hostnames associated with the app. + HostNames *[]string `json:"hostNames,omitempty"` + // RepositorySiteName - READ-ONLY; Name of the repository site. + RepositorySiteName *string `json:"repositorySiteName,omitempty"` + // UsageState - READ-ONLY; State indicating whether the app has exceeded its quota usage. Read-only. Possible values include: 'UsageStateNormal', 'UsageStateExceeded' + UsageState UsageState `json:"usageState,omitempty"` + // Enabled - true if the app is enabled; otherwise, false. Setting this value to false disables the app (takes the app offline). + Enabled *bool `json:"enabled,omitempty"` + // EnabledHostNames - READ-ONLY; Enabled hostnames for the app.Hostnames need to be assigned (see HostNames) AND enabled. Otherwise, + // the app is not served on those hostnames. + EnabledHostNames *[]string `json:"enabledHostNames,omitempty"` + // AvailabilityState - READ-ONLY; Management information availability state for the app. Possible values include: 'SiteAvailabilityStateNormal', 'SiteAvailabilityStateLimited', 'SiteAvailabilityStateDisasterRecoveryMode' + AvailabilityState SiteAvailabilityState `json:"availabilityState,omitempty"` + // HostNameSslStates - Hostname SSL states are used to manage the SSL bindings for app's hostnames. + HostNameSslStates *[]HostNameSslState `json:"hostNameSslStates,omitempty"` + // ServerFarmID - Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + ServerFarmID *string `json:"serverFarmId,omitempty"` + // Reserved - true if reserved; otherwise, false. + Reserved *bool `json:"reserved,omitempty"` + // IsXenon - Obsolete: Hyper-V sandbox. + IsXenon *bool `json:"isXenon,omitempty"` + // HyperV - Hyper-V sandbox. + HyperV *bool `json:"hyperV,omitempty"` + // LastModifiedTimeUtc - READ-ONLY; Last time the app was modified, in UTC. Read-only. + LastModifiedTimeUtc *date.Time `json:"lastModifiedTimeUtc,omitempty"` + // VnetRouteAllEnabled - 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"` + // VnetImagePullEnabled - To enable pulling image over Virtual Network + VnetImagePullEnabled *bool `json:"vnetImagePullEnabled,omitempty"` + // VnetContentShareEnabled - To enable accessing content over virtual network + VnetContentShareEnabled *bool `json:"vnetContentShareEnabled,omitempty"` + // SiteConfig - Configuration of the app. + SiteConfig *SiteConfig `json:"siteConfig,omitempty"` + // TrafficManagerHostNames - READ-ONLY; Azure Traffic Manager hostnames associated with the app. Read-only. + TrafficManagerHostNames *[]string `json:"trafficManagerHostNames,omitempty"` + // ScmSiteAlsoStopped - true to stop SCM (KUDU) site when the app is stopped; otherwise, false. The default is false. + ScmSiteAlsoStopped *bool `json:"scmSiteAlsoStopped,omitempty"` + // TargetSwapSlot - READ-ONLY; Specifies which deployment slot this app will swap into. Read-only. + TargetSwapSlot *string `json:"targetSwapSlot,omitempty"` + // HostingEnvironmentProfile - App Service Environment to use for the app. + HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` + // ClientAffinityEnabled - true to enable client affinity; false to stop sending session affinity cookies, which route client requests in the same session to the same instance. Default is true. + ClientAffinityEnabled *bool `json:"clientAffinityEnabled,omitempty"` + // ClientCertEnabled - true to enable client certificate authentication (TLS mutual authentication); otherwise, false. Default is false. + ClientCertEnabled *bool `json:"clientCertEnabled,omitempty"` + // ClientCertMode - This composes with ClientCertEnabled setting. + // - ClientCertEnabled: false means ClientCert is ignored. + // - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. + // - ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. Possible values include: 'ClientCertModeRequired', 'ClientCertModeOptional', 'ClientCertModeOptionalInteractiveUser' + ClientCertMode ClientCertMode `json:"clientCertMode,omitempty"` + // ClientCertExclusionPaths - client certificate authentication comma-separated exclusion paths + ClientCertExclusionPaths *string `json:"clientCertExclusionPaths,omitempty"` + // HostNamesDisabled - true to disable the public hostnames of the app; otherwise, false. + // If true, the app is only accessible via API management process. + HostNamesDisabled *bool `json:"hostNamesDisabled,omitempty"` + // CustomDomainVerificationID - Unique identifier that verifies the custom domains assigned to the app. Customer will add this id to a txt record for verification. + CustomDomainVerificationID *string `json:"customDomainVerificationId,omitempty"` + // OutboundIPAddresses - READ-ONLY; List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from tenants that site can be hosted with current settings. Read-only. + OutboundIPAddresses *string `json:"outboundIpAddresses,omitempty"` + // PossibleOutboundIPAddresses - READ-ONLY; List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read-only. + PossibleOutboundIPAddresses *string `json:"possibleOutboundIpAddresses,omitempty"` + // ContainerSize - Size of the function container. + ContainerSize *int32 `json:"containerSize,omitempty"` + // DailyMemoryTimeQuota - Maximum allowed daily memory-time quota (applicable on dynamic apps only). + DailyMemoryTimeQuota *int32 `json:"dailyMemoryTimeQuota,omitempty"` + // SuspendedTill - READ-ONLY; App suspended till in case memory-time quota is exceeded. + SuspendedTill *date.Time `json:"suspendedTill,omitempty"` + // MaxNumberOfWorkers - READ-ONLY; Maximum number of workers. + // This only applies to Functions container. + MaxNumberOfWorkers *int32 `json:"maxNumberOfWorkers,omitempty"` + // CloningInfo - If specified during app creation, the app is cloned from a source app. + CloningInfo *CloningInfo `json:"cloningInfo,omitempty"` + // ResourceGroup - READ-ONLY; Name of the resource group the app belongs to. Read-only. + ResourceGroup *string `json:"resourceGroup,omitempty"` + // IsDefaultContainer - READ-ONLY; true if the app is a default container; otherwise, false. + IsDefaultContainer *bool `json:"isDefaultContainer,omitempty"` + // DefaultHostName - READ-ONLY; Default hostname of the app. Read-only. + DefaultHostName *string `json:"defaultHostName,omitempty"` + // SlotSwapStatus - READ-ONLY; Status of the last deployment slot swap operation. + SlotSwapStatus *SlotSwapStatus `json:"slotSwapStatus,omitempty"` + // HTTPSOnly - HttpsOnly: configures a web site to accept only https requests. Issues redirect for + // http requests + HTTPSOnly *bool `json:"httpsOnly,omitempty"` + // RedundancyMode - Site redundancy mode. Possible values include: 'RedundancyModeNone', 'RedundancyModeManual', 'RedundancyModeFailover', 'RedundancyModeActiveActive', 'RedundancyModeGeoRedundant' + RedundancyMode RedundancyMode `json:"redundancyMode,omitempty"` + // InProgressOperationID - READ-ONLY; Specifies an operation id if this site has a pending operation. + InProgressOperationID *uuid.UUID `json:"inProgressOperationId,omitempty"` + // PublicNetworkAccess - Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string. + PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` + // StorageAccountRequired - Checks if Customer provided storage account is required + StorageAccountRequired *bool `json:"storageAccountRequired,omitempty"` + // KeyVaultReferenceIdentity - Identity to use for Key Vault Reference authentication. + KeyVaultReferenceIdentity *string `json:"keyVaultReferenceIdentity,omitempty"` + // VirtualNetworkSubnetID - Azure Resource Manager ID of the Virtual network and subnet to be joined by Regional VNET Integration. + // This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} + VirtualNetworkSubnetID *string `json:"virtualNetworkSubnetId,omitempty"` + // ManagedEnvironmentID - Azure Resource Manager ID of the customer's selected Managed Environment on which to host this app. This must be of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName} + ManagedEnvironmentID *string `json:"managedEnvironmentId,omitempty"` } -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *SiteConfigurationSnapshotInfoCollectionIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SiteConfigurationSnapshotInfoCollectionIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() +// MarshalJSON is the custom marshaler for SiteProperties. +func (s SiteProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if s.Enabled != nil { + objectMap["enabled"] = s.Enabled } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil + if s.HostNameSslStates != nil { + objectMap["hostNameSslStates"] = s.HostNameSslStates } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err + if s.ServerFarmID != nil { + objectMap["serverFarmId"] = s.ServerFarmID } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *SiteConfigurationSnapshotInfoCollectionIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SiteConfigurationSnapshotInfoCollectionIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter SiteConfigurationSnapshotInfoCollectionIterator) Response() SiteConfigurationSnapshotInfoCollection { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter SiteConfigurationSnapshotInfoCollectionIterator) Value() SiteConfigurationSnapshotInfo { - if !iter.page.NotDone() { - return SiteConfigurationSnapshotInfo{} + if s.Reserved != nil { + objectMap["reserved"] = s.Reserved } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the SiteConfigurationSnapshotInfoCollectionIterator type. -func NewSiteConfigurationSnapshotInfoCollectionIterator(page SiteConfigurationSnapshotInfoCollectionPage) SiteConfigurationSnapshotInfoCollectionIterator { - return SiteConfigurationSnapshotInfoCollectionIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (scsic SiteConfigurationSnapshotInfoCollection) IsEmpty() bool { - return scsic.Value == nil || len(*scsic.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (scsic SiteConfigurationSnapshotInfoCollection) hasNextLink() bool { - return scsic.NextLink != nil && len(*scsic.NextLink) != 0 -} - -// siteConfigurationSnapshotInfoCollectionPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (scsic SiteConfigurationSnapshotInfoCollection) siteConfigurationSnapshotInfoCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !scsic.hasNextLink() { - return nil, nil + if s.IsXenon != nil { + objectMap["isXenon"] = s.IsXenon } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(scsic.NextLink))) -} - -// SiteConfigurationSnapshotInfoCollectionPage contains a page of SiteConfigurationSnapshotInfo values. -type SiteConfigurationSnapshotInfoCollectionPage struct { - fn func(context.Context, SiteConfigurationSnapshotInfoCollection) (SiteConfigurationSnapshotInfoCollection, error) - scsic SiteConfigurationSnapshotInfoCollection -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *SiteConfigurationSnapshotInfoCollectionPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SiteConfigurationSnapshotInfoCollectionPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() + if s.HyperV != nil { + objectMap["hyperV"] = s.HyperV } - for { - next, err := page.fn(ctx, page.scsic) - if err != nil { - return err - } - page.scsic = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } + if s.VnetRouteAllEnabled != nil { + objectMap["vnetRouteAllEnabled"] = s.VnetRouteAllEnabled } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *SiteConfigurationSnapshotInfoCollectionPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SiteConfigurationSnapshotInfoCollectionPage) NotDone() bool { - return !page.scsic.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page SiteConfigurationSnapshotInfoCollectionPage) Response() SiteConfigurationSnapshotInfoCollection { - return page.scsic -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page SiteConfigurationSnapshotInfoCollectionPage) Values() []SiteConfigurationSnapshotInfo { - if page.scsic.IsEmpty() { - return nil + if s.VnetImagePullEnabled != nil { + objectMap["vnetImagePullEnabled"] = s.VnetImagePullEnabled } - return *page.scsic.Value -} - -// Creates a new instance of the SiteConfigurationSnapshotInfoCollectionPage type. -func NewSiteConfigurationSnapshotInfoCollectionPage(cur SiteConfigurationSnapshotInfoCollection, getNextPage func(context.Context, SiteConfigurationSnapshotInfoCollection) (SiteConfigurationSnapshotInfoCollection, error)) SiteConfigurationSnapshotInfoCollectionPage { - return SiteConfigurationSnapshotInfoCollectionPage{ - fn: getNextPage, - scsic: cur, + if s.VnetContentShareEnabled != nil { + objectMap["vnetContentShareEnabled"] = s.VnetContentShareEnabled + } + if s.SiteConfig != nil { + objectMap["siteConfig"] = s.SiteConfig + } + if s.ScmSiteAlsoStopped != nil { + objectMap["scmSiteAlsoStopped"] = s.ScmSiteAlsoStopped + } + if s.HostingEnvironmentProfile != nil { + objectMap["hostingEnvironmentProfile"] = s.HostingEnvironmentProfile + } + if s.ClientAffinityEnabled != nil { + objectMap["clientAffinityEnabled"] = s.ClientAffinityEnabled + } + if s.ClientCertEnabled != nil { + objectMap["clientCertEnabled"] = s.ClientCertEnabled + } + if s.ClientCertMode != "" { + objectMap["clientCertMode"] = s.ClientCertMode + } + if s.ClientCertExclusionPaths != nil { + objectMap["clientCertExclusionPaths"] = s.ClientCertExclusionPaths } + if s.HostNamesDisabled != nil { + objectMap["hostNamesDisabled"] = s.HostNamesDisabled + } + if s.CustomDomainVerificationID != nil { + objectMap["customDomainVerificationId"] = s.CustomDomainVerificationID + } + if s.ContainerSize != nil { + objectMap["containerSize"] = s.ContainerSize + } + if s.DailyMemoryTimeQuota != nil { + objectMap["dailyMemoryTimeQuota"] = s.DailyMemoryTimeQuota + } + if s.CloningInfo != nil { + objectMap["cloningInfo"] = s.CloningInfo + } + if s.HTTPSOnly != nil { + objectMap["httpsOnly"] = s.HTTPSOnly + } + if s.RedundancyMode != "" { + objectMap["redundancyMode"] = s.RedundancyMode + } + if s.PublicNetworkAccess != nil { + objectMap["publicNetworkAccess"] = s.PublicNetworkAccess + } + if s.StorageAccountRequired != nil { + objectMap["storageAccountRequired"] = s.StorageAccountRequired + } + if s.KeyVaultReferenceIdentity != nil { + objectMap["keyVaultReferenceIdentity"] = s.KeyVaultReferenceIdentity + } + if s.VirtualNetworkSubnetID != nil { + objectMap["virtualNetworkSubnetId"] = s.VirtualNetworkSubnetID + } + if s.ManagedEnvironmentID != nil { + objectMap["managedEnvironmentId"] = s.ManagedEnvironmentID + } + return json.Marshal(objectMap) } -// SiteConfigurationSnapshotInfoProperties siteConfigurationSnapshotInfo resource specific properties -type SiteConfigurationSnapshotInfoProperties struct { - // Time - READ-ONLY; The time the snapshot was taken. - Time *date.Time `json:"time,omitempty"` - // SnapshotID - READ-ONLY; The id of the snapshot - SnapshotID *int32 `json:"snapshotId,omitempty"` +// SiteSeal site seal +type SiteSeal struct { + autorest.Response `json:"-"` + // HTML - HTML snippet + HTML *string `json:"html,omitempty"` } -// MarshalJSON is the custom marshaler for SiteConfigurationSnapshotInfoProperties. -func (scsi SiteConfigurationSnapshotInfoProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) +// SiteSealRequest site seal request. +type SiteSealRequest struct { + // LightTheme - If true use the light color theme for site seal; otherwise, use the default color theme. + LightTheme *bool `json:"lightTheme,omitempty"` + // Locale - Locale of site seal. + Locale *string `json:"locale,omitempty"` } -// SiteExtensionInfo site Extension Information. -type SiteExtensionInfo struct { +// SiteSourceControl source control configuration for an app. +type SiteSourceControl struct { autorest.Response `json:"-"` - // SiteExtensionInfoProperties - SiteExtensionInfo resource specific properties - *SiteExtensionInfoProperties `json:"properties,omitempty"` + // SiteSourceControlProperties - SiteSourceControl resource specific properties + *SiteSourceControlProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -23954,20 +26555,20 @@ type SiteExtensionInfo struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for SiteExtensionInfo. -func (sei SiteExtensionInfo) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for SiteSourceControl. +func (ssc SiteSourceControl) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if sei.SiteExtensionInfoProperties != nil { - objectMap["properties"] = sei.SiteExtensionInfoProperties + if ssc.SiteSourceControlProperties != nil { + objectMap["properties"] = ssc.SiteSourceControlProperties } - if sei.Kind != nil { - objectMap["kind"] = sei.Kind + if ssc.Kind != nil { + objectMap["kind"] = ssc.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for SiteExtensionInfo struct. -func (sei *SiteExtensionInfo) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for SiteSourceControl struct. +func (ssc *SiteSourceControl) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -23977,12 +26578,12 @@ func (sei *SiteExtensionInfo) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var siteExtensionInfoProperties SiteExtensionInfoProperties - err = json.Unmarshal(*v, &siteExtensionInfoProperties) + var siteSourceControlProperties SiteSourceControlProperties + err = json.Unmarshal(*v, &siteSourceControlProperties) if err != nil { return err } - sei.SiteExtensionInfoProperties = &siteExtensionInfoProperties + ssc.SiteSourceControlProperties = &siteSourceControlProperties } case "id": if v != nil { @@ -23991,7 +26592,7 @@ func (sei *SiteExtensionInfo) UnmarshalJSON(body []byte) error { if err != nil { return err } - sei.ID = &ID + ssc.ID = &ID } case "name": if v != nil { @@ -24000,7 +26601,7 @@ func (sei *SiteExtensionInfo) UnmarshalJSON(body []byte) error { if err != nil { return err } - sei.Name = &name + ssc.Name = &name } case "kind": if v != nil { @@ -24009,7 +26610,7 @@ func (sei *SiteExtensionInfo) UnmarshalJSON(body []byte) error { if err != nil { return err } - sei.Kind = &kind + ssc.Kind = &kind } case "type": if v != nil { @@ -24018,7 +26619,7 @@ func (sei *SiteExtensionInfo) UnmarshalJSON(body []byte) error { if err != nil { return err } - sei.Type = &typeVar + ssc.Type = &typeVar } } } @@ -24026,35 +26627,97 @@ func (sei *SiteExtensionInfo) UnmarshalJSON(body []byte) error { return nil } -// SiteExtensionInfoCollection collection of Kudu site extension information elements. -type SiteExtensionInfoCollection struct { +// SiteSourceControlProperties siteSourceControl resource specific properties +type SiteSourceControlProperties struct { + // RepoURL - Repository or source control URL. + RepoURL *string `json:"repoUrl,omitempty"` + // Branch - Name of branch to use for deployment. + Branch *string `json:"branch,omitempty"` + // IsManualIntegration - true to limit to manual integration; false to enable continuous integration (which configures webhooks into online repos like GitHub). + IsManualIntegration *bool `json:"isManualIntegration,omitempty"` + // IsGitHubAction - true if this is deployed via GitHub action. + IsGitHubAction *bool `json:"isGitHubAction,omitempty"` + // DeploymentRollbackEnabled - true to enable deployment rollback; otherwise, false. + DeploymentRollbackEnabled *bool `json:"deploymentRollbackEnabled,omitempty"` + // IsMercurial - true for a Mercurial repository; false for a Git repository. + IsMercurial *bool `json:"isMercurial,omitempty"` + // GitHubActionConfiguration - If GitHub Action is selected, than the associated configuration. + GitHubActionConfiguration *GitHubActionConfiguration `json:"gitHubActionConfiguration,omitempty"` +} + +// SkuCapacity description of the App Service plan scale options. +type SkuCapacity struct { + // Minimum - Minimum number of workers for this App Service plan SKU. + Minimum *int32 `json:"minimum,omitempty"` + // Maximum - Maximum number of workers for this App Service plan SKU. + Maximum *int32 `json:"maximum,omitempty"` + // ElasticMaximum - Maximum number of Elastic workers for this App Service plan SKU. + ElasticMaximum *int32 `json:"elasticMaximum,omitempty"` + // Default - Default number of workers for this App Service plan SKU. + Default *int32 `json:"default,omitempty"` + // ScaleType - Available scale configurations for an App Service plan. + ScaleType *string `json:"scaleType,omitempty"` +} + +// SkuDescription description of a SKU for a scalable resource. +type SkuDescription struct { + // Name - Name of the resource SKU. + Name *string `json:"name,omitempty"` + // Tier - Service tier of the resource SKU. + Tier *string `json:"tier,omitempty"` + // Size - Size specifier of the resource SKU. + Size *string `json:"size,omitempty"` + // Family - Family code of the resource SKU. + Family *string `json:"family,omitempty"` + // Capacity - Current number of instances assigned to the resource. + Capacity *int32 `json:"capacity,omitempty"` + // SkuCapacity - Min, max, and default scale values of the SKU. + SkuCapacity *SkuCapacity `json:"skuCapacity,omitempty"` + // Locations - Locations of the SKU. + Locations *[]string `json:"locations,omitempty"` + // Capabilities - Capabilities of the SKU, e.g., is traffic manager enabled? + Capabilities *[]Capability `json:"capabilities,omitempty"` +} + +// SkuInfo SKU discovery information. +type SkuInfo struct { + // ResourceType - Resource type that this SKU applies to. + ResourceType *string `json:"resourceType,omitempty"` + // Sku - Name and tier of the SKU. + Sku *SkuDescription `json:"sku,omitempty"` + // Capacity - Min, max, and default scale values of the SKU. + Capacity *SkuCapacity `json:"capacity,omitempty"` +} + +// SkuInfoCollection collection of SKU information. +type SkuInfoCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]SiteExtensionInfo `json:"value,omitempty"` + Value *[]SkuInfo `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for SiteExtensionInfoCollection. -func (seic SiteExtensionInfoCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for SkuInfoCollection. +func (sic SkuInfoCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if seic.Value != nil { - objectMap["value"] = seic.Value + if sic.Value != nil { + objectMap["value"] = sic.Value } return json.Marshal(objectMap) } -// SiteExtensionInfoCollectionIterator provides access to a complete listing of SiteExtensionInfo values. -type SiteExtensionInfoCollectionIterator struct { +// SkuInfoCollectionIterator provides access to a complete listing of SkuInfo values. +type SkuInfoCollectionIterator struct { i int - page SiteExtensionInfoCollectionPage + page SkuInfoCollectionPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *SiteExtensionInfoCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *SkuInfoCollectionIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SiteExtensionInfoCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/SkuInfoCollectionIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -24079,67 +26742,67 @@ func (iter *SiteExtensionInfoCollectionIterator) NextWithContext(ctx context.Con // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *SiteExtensionInfoCollectionIterator) Next() error { +func (iter *SkuInfoCollectionIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SiteExtensionInfoCollectionIterator) NotDone() bool { +func (iter SkuInfoCollectionIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter SiteExtensionInfoCollectionIterator) Response() SiteExtensionInfoCollection { +func (iter SkuInfoCollectionIterator) Response() SkuInfoCollection { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter SiteExtensionInfoCollectionIterator) Value() SiteExtensionInfo { +func (iter SkuInfoCollectionIterator) Value() SkuInfo { if !iter.page.NotDone() { - return SiteExtensionInfo{} + return SkuInfo{} } return iter.page.Values()[iter.i] } - -// Creates a new instance of the SiteExtensionInfoCollectionIterator type. -func NewSiteExtensionInfoCollectionIterator(page SiteExtensionInfoCollectionPage) SiteExtensionInfoCollectionIterator { - return SiteExtensionInfoCollectionIterator{page: page} + +// Creates a new instance of the SkuInfoCollectionIterator type. +func NewSkuInfoCollectionIterator(page SkuInfoCollectionPage) SkuInfoCollectionIterator { + return SkuInfoCollectionIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (seic SiteExtensionInfoCollection) IsEmpty() bool { - return seic.Value == nil || len(*seic.Value) == 0 +func (sic SkuInfoCollection) IsEmpty() bool { + return sic.Value == nil || len(*sic.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (seic SiteExtensionInfoCollection) hasNextLink() bool { - return seic.NextLink != nil && len(*seic.NextLink) != 0 +func (sic SkuInfoCollection) hasNextLink() bool { + return sic.NextLink != nil && len(*sic.NextLink) != 0 } -// siteExtensionInfoCollectionPreparer prepares a request to retrieve the next set of results. +// skuInfoCollectionPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (seic SiteExtensionInfoCollection) siteExtensionInfoCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !seic.hasNextLink() { +func (sic SkuInfoCollection) skuInfoCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !sic.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(seic.NextLink))) + autorest.WithBaseURL(to.String(sic.NextLink))) } -// SiteExtensionInfoCollectionPage contains a page of SiteExtensionInfo values. -type SiteExtensionInfoCollectionPage struct { - fn func(context.Context, SiteExtensionInfoCollection) (SiteExtensionInfoCollection, error) - seic SiteExtensionInfoCollection +// SkuInfoCollectionPage contains a page of SkuInfo values. +type SkuInfoCollectionPage struct { + fn func(context.Context, SkuInfoCollection) (SkuInfoCollection, error) + sic SkuInfoCollection } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *SiteExtensionInfoCollectionPage) NextWithContext(ctx context.Context) (err error) { +func (page *SkuInfoCollectionPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SiteExtensionInfoCollectionPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/SkuInfoCollectionPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -24149,11 +26812,11 @@ func (page *SiteExtensionInfoCollectionPage) NextWithContext(ctx context.Context }() } for { - next, err := page.fn(ctx, page.seic) + next, err := page.fn(ctx, page.sic) if err != nil { return err } - page.seic = next + page.sic = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -24164,220 +26827,63 @@ func (page *SiteExtensionInfoCollectionPage) NextWithContext(ctx context.Context // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *SiteExtensionInfoCollectionPage) Next() error { +func (page *SkuInfoCollectionPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SiteExtensionInfoCollectionPage) NotDone() bool { - return !page.seic.IsEmpty() +func (page SkuInfoCollectionPage) NotDone() bool { + return !page.sic.IsEmpty() } // Response returns the raw server response from the last page request. -func (page SiteExtensionInfoCollectionPage) Response() SiteExtensionInfoCollection { - return page.seic +func (page SkuInfoCollectionPage) Response() SkuInfoCollection { + return page.sic } // Values returns the slice of values for the current page or nil if there are no values. -func (page SiteExtensionInfoCollectionPage) Values() []SiteExtensionInfo { - if page.seic.IsEmpty() { +func (page SkuInfoCollectionPage) Values() []SkuInfo { + if page.sic.IsEmpty() { return nil } - return *page.seic.Value + return *page.sic.Value } -// Creates a new instance of the SiteExtensionInfoCollectionPage type. -func NewSiteExtensionInfoCollectionPage(cur SiteExtensionInfoCollection, getNextPage func(context.Context, SiteExtensionInfoCollection) (SiteExtensionInfoCollection, error)) SiteExtensionInfoCollectionPage { - return SiteExtensionInfoCollectionPage{ - fn: getNextPage, - seic: cur, +// Creates a new instance of the SkuInfoCollectionPage type. +func NewSkuInfoCollectionPage(cur SkuInfoCollection, getNextPage func(context.Context, SkuInfoCollection) (SkuInfoCollection, error)) SkuInfoCollectionPage { + return SkuInfoCollectionPage{ + fn: getNextPage, + sic: cur, } } -// SiteExtensionInfoProperties siteExtensionInfo resource specific properties -type SiteExtensionInfoProperties struct { - // ExtensionID - Site extension ID. - ExtensionID *string `json:"extension_id,omitempty"` - Title *string `json:"title,omitempty"` - // ExtensionType - Site extension type. Possible values include: 'SiteExtensionTypeGallery', 'SiteExtensionTypeWebRoot' - ExtensionType SiteExtensionType `json:"extension_type,omitempty"` - // Summary - Summary description. - Summary *string `json:"summary,omitempty"` - // Description - Detailed description. - Description *string `json:"description,omitempty"` - // Version - Version information. - Version *string `json:"version,omitempty"` - // ExtensionURL - Extension URL. - ExtensionURL *string `json:"extension_url,omitempty"` - // ProjectURL - Project URL. - ProjectURL *string `json:"project_url,omitempty"` - // IconURL - Icon URL. - IconURL *string `json:"icon_url,omitempty"` - // LicenseURL - License URL. - LicenseURL *string `json:"license_url,omitempty"` - // FeedURL - Feed URL. - FeedURL *string `json:"feed_url,omitempty"` - // Authors - List of authors. - Authors *[]string `json:"authors,omitempty"` - // InstallerCommandLineParams - Installer command line parameters. - InstallerCommandLineParams *string `json:"installer_command_line_params,omitempty"` - // PublishedDateTime - Published timestamp. - PublishedDateTime *date.Time `json:"published_date_time,omitempty"` - // DownloadCount - Count of downloads. - DownloadCount *int32 `json:"download_count,omitempty"` - // LocalIsLatestVersion - true if the local version is the latest version; false otherwise. - LocalIsLatestVersion *bool `json:"local_is_latest_version,omitempty"` - // LocalPath - Local path. - LocalPath *string `json:"local_path,omitempty"` - // InstalledDateTime - Installed timestamp. - InstalledDateTime *date.Time `json:"installed_date_time,omitempty"` - // ProvisioningState - Provisioning state. - ProvisioningState *string `json:"provisioningState,omitempty"` - // Comment - Site Extension comment. - Comment *string `json:"comment,omitempty"` -} - -// SiteInstanceStatus ... -type SiteInstanceStatus struct { +// SkuInfos collection of SKU information. +type SkuInfos struct { autorest.Response `json:"-"` - // SiteInstanceStatusProperties - WebSiteInstanceStatus resource specific properties - *SiteInstanceStatusProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for SiteInstanceStatus. -func (sis SiteInstanceStatus) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sis.SiteInstanceStatusProperties != nil { - objectMap["properties"] = sis.SiteInstanceStatusProperties - } - if sis.Kind != nil { - objectMap["kind"] = sis.Kind - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for SiteInstanceStatus struct. -func (sis *SiteInstanceStatus) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var siteInstanceStatusProperties SiteInstanceStatusProperties - err = json.Unmarshal(*v, &siteInstanceStatusProperties) - if err != nil { - return err - } - sis.SiteInstanceStatusProperties = &siteInstanceStatusProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sis.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sis.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - sis.Kind = &kind - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - sis.Type = &typeVar - } - } - } - - return nil -} - -// SiteInstanceStatusProperties webSiteInstanceStatus resource specific properties -type SiteInstanceStatusProperties struct { - // State - Possible values include: 'SiteRuntimeStateREADY', 'SiteRuntimeStateSTOPPED', 'SiteRuntimeStateUNKNOWN' - State SiteRuntimeState `json:"state,omitempty"` - // StatusURL - Link to the GetStatusApi in Kudu - StatusURL *string `json:"statusUrl,omitempty"` - // DetectorURL - Link to the Diagnose and Solve Portal - DetectorURL *string `json:"detectorUrl,omitempty"` - // ConsoleURL - Link to the console to web app instance - ConsoleURL *string `json:"consoleUrl,omitempty"` - // HealthCheckURL - Link to the console to web app instance - HealthCheckURL *string `json:"healthCheckUrl,omitempty"` - Containers map[string]*ContainerInfo `json:"containers"` -} - -// MarshalJSON is the custom marshaler for SiteInstanceStatusProperties. -func (sis SiteInstanceStatusProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sis.State != "" { - objectMap["state"] = sis.State - } - if sis.StatusURL != nil { - objectMap["statusUrl"] = sis.StatusURL - } - if sis.DetectorURL != nil { - objectMap["detectorUrl"] = sis.DetectorURL - } - if sis.ConsoleURL != nil { - objectMap["consoleUrl"] = sis.ConsoleURL - } - if sis.HealthCheckURL != nil { - objectMap["healthCheckUrl"] = sis.HealthCheckURL - } - if sis.Containers != nil { - objectMap["containers"] = sis.Containers - } - return json.Marshal(objectMap) + // ResourceType - Resource type that this SKU applies to. + ResourceType *string `json:"resourceType,omitempty"` + // Skus - List of SKUs the subscription is able to use. + Skus *[]GlobalCsmSkuDescription `json:"skus,omitempty"` } -// SiteLimits metric limits set on an app. -type SiteLimits struct { - // MaxPercentageCPU - Maximum allowed CPU usage percentage. - MaxPercentageCPU *float64 `json:"maxPercentageCpu,omitempty"` - // MaxMemoryInMb - Maximum allowed memory usage in MB. - MaxMemoryInMb *int64 `json:"maxMemoryInMb,omitempty"` - // MaxDiskSizeInMb - Maximum allowed disk size usage in MB. - MaxDiskSizeInMb *int64 `json:"maxDiskSizeInMb,omitempty"` +// SlotConfigNames names for connection strings, application settings, and external Azure storage account +// configuration +// identifiers to be marked as sticky to the deployment slot and not moved during a swap operation. +// This is valid for all deployment slots in an app. +type SlotConfigNames struct { + // ConnectionStringNames - List of connection string names. + ConnectionStringNames *[]string `json:"connectionStringNames,omitempty"` + // AppSettingNames - List of application settings names. + AppSettingNames *[]string `json:"appSettingNames,omitempty"` + // AzureStorageConfigNames - List of external Azure storage account identifiers. + AzureStorageConfigNames *[]string `json:"azureStorageConfigNames,omitempty"` } -// SiteLogsConfig configuration of App Service site logs. -type SiteLogsConfig struct { +// SlotConfigNamesResource slot Config names azure resource. +type SlotConfigNamesResource struct { autorest.Response `json:"-"` - // SiteLogsConfigProperties - SiteLogsConfig resource specific properties - *SiteLogsConfigProperties `json:"properties,omitempty"` + // SlotConfigNames - Core resource properties + *SlotConfigNames `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -24388,20 +26894,20 @@ type SiteLogsConfig struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for SiteLogsConfig. -func (slc SiteLogsConfig) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for SlotConfigNamesResource. +func (scnr SlotConfigNamesResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if slc.SiteLogsConfigProperties != nil { - objectMap["properties"] = slc.SiteLogsConfigProperties + if scnr.SlotConfigNames != nil { + objectMap["properties"] = scnr.SlotConfigNames } - if slc.Kind != nil { - objectMap["kind"] = slc.Kind + if scnr.Kind != nil { + objectMap["kind"] = scnr.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for SiteLogsConfig struct. -func (slc *SiteLogsConfig) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for SlotConfigNamesResource struct. +func (scnr *SlotConfigNamesResource) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -24411,12 +26917,12 @@ func (slc *SiteLogsConfig) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var siteLogsConfigProperties SiteLogsConfigProperties - err = json.Unmarshal(*v, &siteLogsConfigProperties) + var slotConfigNames SlotConfigNames + err = json.Unmarshal(*v, &slotConfigNames) if err != nil { return err } - slc.SiteLogsConfigProperties = &siteLogsConfigProperties + scnr.SlotConfigNames = &slotConfigNames } case "id": if v != nil { @@ -24425,7 +26931,7 @@ func (slc *SiteLogsConfig) UnmarshalJSON(body []byte) error { if err != nil { return err } - slc.ID = &ID + scnr.ID = &ID } case "name": if v != nil { @@ -24434,7 +26940,7 @@ func (slc *SiteLogsConfig) UnmarshalJSON(body []byte) error { if err != nil { return err } - slc.Name = &name + scnr.Name = &name } case "kind": if v != nil { @@ -24443,7 +26949,7 @@ func (slc *SiteLogsConfig) UnmarshalJSON(body []byte) error { if err != nil { return err } - slc.Kind = &kind + scnr.Kind = &kind } case "type": if v != nil { @@ -24452,7 +26958,7 @@ func (slc *SiteLogsConfig) UnmarshalJSON(body []byte) error { if err != nil { return err } - slc.Type = &typeVar + scnr.Type = &typeVar } } } @@ -24460,35 +26966,10 @@ func (slc *SiteLogsConfig) UnmarshalJSON(body []byte) error { return nil } -// SiteLogsConfigProperties siteLogsConfig resource specific properties -type SiteLogsConfigProperties struct { - // ApplicationLogs - Application logs configuration. - ApplicationLogs *ApplicationLogsConfig `json:"applicationLogs,omitempty"` - // HTTPLogs - HTTP logs configuration. - HTTPLogs *HTTPLogsConfig `json:"httpLogs,omitempty"` - // FailedRequestsTracing - Failed requests tracing configuration. - FailedRequestsTracing *EnabledConfig `json:"failedRequestsTracing,omitempty"` - // DetailedErrorMessages - Detailed error messages configuration. - DetailedErrorMessages *EnabledConfig `json:"detailedErrorMessages,omitempty"` -} - -// SiteMachineKey machineKey of an app. -type SiteMachineKey struct { - // Validation - MachineKey validation. - Validation *string `json:"validation,omitempty"` - // ValidationKey - Validation key. - ValidationKey *string `json:"validationKey,omitempty"` - // Decryption - Algorithm used for decryption. - Decryption *string `json:"decryption,omitempty"` - // DecryptionKey - Decryption key. - DecryptionKey *string `json:"decryptionKey,omitempty"` -} - -// SitePatchResource ARM resource for a site. -type SitePatchResource struct { - // SitePatchResourceProperties - SitePatchResource resource specific properties - *SitePatchResourceProperties `json:"properties,omitempty"` - Identity *ManagedServiceIdentity `json:"identity,omitempty"` +// SlotDifference a setting difference between two deployment slots of an app. +type SlotDifference struct { + // SlotDifferenceProperties - SlotDifference resource specific properties + *SlotDifferenceProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -24499,23 +26980,20 @@ type SitePatchResource struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for SitePatchResource. -func (spr SitePatchResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for SlotDifference. +func (sd SlotDifference) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if spr.SitePatchResourceProperties != nil { - objectMap["properties"] = spr.SitePatchResourceProperties - } - if spr.Identity != nil { - objectMap["identity"] = spr.Identity + if sd.SlotDifferenceProperties != nil { + objectMap["properties"] = sd.SlotDifferenceProperties } - if spr.Kind != nil { - objectMap["kind"] = spr.Kind + if sd.Kind != nil { + objectMap["kind"] = sd.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for SitePatchResource struct. -func (spr *SitePatchResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for SlotDifference struct. +func (sd *SlotDifference) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -24525,21 +27003,12 @@ func (spr *SitePatchResource) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var sitePatchResourceProperties SitePatchResourceProperties - err = json.Unmarshal(*v, &sitePatchResourceProperties) - if err != nil { - return err - } - spr.SitePatchResourceProperties = &sitePatchResourceProperties - } - case "identity": - if v != nil { - var identity ManagedServiceIdentity - err = json.Unmarshal(*v, &identity) + var slotDifferenceProperties SlotDifferenceProperties + err = json.Unmarshal(*v, &slotDifferenceProperties) if err != nil { return err } - spr.Identity = &identity + sd.SlotDifferenceProperties = &slotDifferenceProperties } case "id": if v != nil { @@ -24548,7 +27017,7 @@ func (spr *SitePatchResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - spr.ID = &ID + sd.ID = &ID } case "name": if v != nil { @@ -24557,7 +27026,7 @@ func (spr *SitePatchResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - spr.Name = &name + sd.Name = &name } case "kind": if v != nil { @@ -24566,7 +27035,7 @@ func (spr *SitePatchResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - spr.Kind = &kind + sd.Kind = &kind } case "type": if v != nil { @@ -24575,7 +27044,7 @@ func (spr *SitePatchResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - spr.Type = &typeVar + sd.Type = &typeVar } } } @@ -24583,180 +27052,230 @@ func (spr *SitePatchResource) UnmarshalJSON(body []byte) error { return nil } -// SitePatchResourceProperties sitePatchResource resource specific properties -type SitePatchResourceProperties struct { - // State - READ-ONLY; Current state of the app. - State *string `json:"state,omitempty"` - // HostNames - READ-ONLY; Hostnames associated with the app. - HostNames *[]string `json:"hostNames,omitempty"` - // RepositorySiteName - READ-ONLY; Name of the repository site. - RepositorySiteName *string `json:"repositorySiteName,omitempty"` - // UsageState - READ-ONLY; State indicating whether the app has exceeded its quota usage. Read-only. Possible values include: 'UsageStateNormal', 'UsageStateExceeded' - UsageState UsageState `json:"usageState,omitempty"` - // Enabled - true if the app is enabled; otherwise, false. Setting this value to false disables the app (takes the app offline). - Enabled *bool `json:"enabled,omitempty"` - // EnabledHostNames - READ-ONLY; Enabled hostnames for the app.Hostnames need to be assigned (see HostNames) AND enabled. Otherwise, - // the app is not served on those hostnames. - EnabledHostNames *[]string `json:"enabledHostNames,omitempty"` - // AvailabilityState - READ-ONLY; Management information availability state for the app. Possible values include: 'SiteAvailabilityStateNormal', 'SiteAvailabilityStateLimited', 'SiteAvailabilityStateDisasterRecoveryMode' - AvailabilityState SiteAvailabilityState `json:"availabilityState,omitempty"` - // HostNameSslStates - Hostname SSL states are used to manage the SSL bindings for app's hostnames. - HostNameSslStates *[]HostNameSslState `json:"hostNameSslStates,omitempty"` - // ServerFarmID - Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". - ServerFarmID *string `json:"serverFarmId,omitempty"` - // Reserved - true if reserved; otherwise, false. - Reserved *bool `json:"reserved,omitempty"` - // IsXenon - Obsolete: Hyper-V sandbox. - IsXenon *bool `json:"isXenon,omitempty"` - // HyperV - Hyper-V sandbox. - HyperV *bool `json:"hyperV,omitempty"` - // LastModifiedTimeUtc - READ-ONLY; Last time the app was modified, in UTC. Read-only. - LastModifiedTimeUtc *date.Time `json:"lastModifiedTimeUtc,omitempty"` - // SiteConfig - Configuration of the app. - SiteConfig *SiteConfig `json:"siteConfig,omitempty"` - // TrafficManagerHostNames - READ-ONLY; Azure Traffic Manager hostnames associated with the app. Read-only. - TrafficManagerHostNames *[]string `json:"trafficManagerHostNames,omitempty"` - // ScmSiteAlsoStopped - true to stop SCM (KUDU) site when the app is stopped; otherwise, false. The default is false. - ScmSiteAlsoStopped *bool `json:"scmSiteAlsoStopped,omitempty"` - // TargetSwapSlot - READ-ONLY; Specifies which deployment slot this app will swap into. Read-only. - TargetSwapSlot *string `json:"targetSwapSlot,omitempty"` - // HostingEnvironmentProfile - App Service Environment to use for the app. - HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` - // ClientAffinityEnabled - true to enable client affinity; false to stop sending session affinity cookies, which route client requests in the same session to the same instance. Default is true. - ClientAffinityEnabled *bool `json:"clientAffinityEnabled,omitempty"` - // ClientCertEnabled - true to enable client certificate authentication (TLS mutual authentication); otherwise, false. Default is false. - ClientCertEnabled *bool `json:"clientCertEnabled,omitempty"` - // ClientCertMode - This composes with ClientCertEnabled setting. - // - ClientCertEnabled: false means ClientCert is ignored. - // - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. - // - ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. Possible values include: 'ClientCertModeRequired', 'ClientCertModeOptional', 'ClientCertModeOptionalInteractiveUser' - ClientCertMode ClientCertMode `json:"clientCertMode,omitempty"` - // ClientCertExclusionPaths - client certificate authentication comma-separated exclusion paths - ClientCertExclusionPaths *string `json:"clientCertExclusionPaths,omitempty"` - // HostNamesDisabled - true to disable the public hostnames of the app; otherwise, false. - // If true, the app is only accessible via API management process. - HostNamesDisabled *bool `json:"hostNamesDisabled,omitempty"` - // CustomDomainVerificationID - Unique identifier that verifies the custom domains assigned to the app. Customer will add this id to a txt record for verification. - CustomDomainVerificationID *string `json:"customDomainVerificationId,omitempty"` - // OutboundIPAddresses - READ-ONLY; List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from tenants that site can be hosted with current settings. Read-only. - OutboundIPAddresses *string `json:"outboundIpAddresses,omitempty"` - // PossibleOutboundIPAddresses - READ-ONLY; List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read-only. - PossibleOutboundIPAddresses *string `json:"possibleOutboundIpAddresses,omitempty"` - // ContainerSize - Size of the function container. - ContainerSize *int32 `json:"containerSize,omitempty"` - // DailyMemoryTimeQuota - Maximum allowed daily memory-time quota (applicable on dynamic apps only). - DailyMemoryTimeQuota *int32 `json:"dailyMemoryTimeQuota,omitempty"` - // SuspendedTill - READ-ONLY; App suspended till in case memory-time quota is exceeded. - SuspendedTill *date.Time `json:"suspendedTill,omitempty"` - // MaxNumberOfWorkers - READ-ONLY; Maximum number of workers. - // This only applies to Functions container. - MaxNumberOfWorkers *int32 `json:"maxNumberOfWorkers,omitempty"` - // CloningInfo - If specified during app creation, the app is cloned from a source app. - CloningInfo *CloningInfo `json:"cloningInfo,omitempty"` - // ResourceGroup - READ-ONLY; Name of the resource group the app belongs to. Read-only. - ResourceGroup *string `json:"resourceGroup,omitempty"` - // IsDefaultContainer - READ-ONLY; true if the app is a default container; otherwise, false. - IsDefaultContainer *bool `json:"isDefaultContainer,omitempty"` - // DefaultHostName - READ-ONLY; Default hostname of the app. Read-only. - DefaultHostName *string `json:"defaultHostName,omitempty"` - // SlotSwapStatus - READ-ONLY; Status of the last deployment slot swap operation. - SlotSwapStatus *SlotSwapStatus `json:"slotSwapStatus,omitempty"` - // HTTPSOnly - HttpsOnly: configures a web site to accept only https requests. Issues redirect for - // http requests - HTTPSOnly *bool `json:"httpsOnly,omitempty"` - // RedundancyMode - Site redundancy mode. Possible values include: 'RedundancyModeNone', 'RedundancyModeManual', 'RedundancyModeFailover', 'RedundancyModeActiveActive', 'RedundancyModeGeoRedundant' - RedundancyMode RedundancyMode `json:"redundancyMode,omitempty"` - // InProgressOperationID - READ-ONLY; Specifies an operation id if this site has a pending operation. - InProgressOperationID *uuid.UUID `json:"inProgressOperationId,omitempty"` - // StorageAccountRequired - Checks if Customer provided storage account is required - StorageAccountRequired *bool `json:"storageAccountRequired,omitempty"` - // KeyVaultReferenceIdentity - Identity to use for Key Vault Reference authentication. - KeyVaultReferenceIdentity *string `json:"keyVaultReferenceIdentity,omitempty"` - // VirtualNetworkSubnetID - Azure Resource Manager ID of the Virtual network and subnet to be joined by Regional VNET Integration. - // This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} - VirtualNetworkSubnetID *string `json:"virtualNetworkSubnetId,omitempty"` +// SlotDifferenceCollection collection of slot differences. +type SlotDifferenceCollection struct { + autorest.Response `json:"-"` + // Value - Collection of resources. + Value *[]SlotDifference `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for SitePatchResourceProperties. -func (spr SitePatchResourceProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for SlotDifferenceCollection. +func (sdc SlotDifferenceCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if spr.Enabled != nil { - objectMap["enabled"] = spr.Enabled - } - if spr.HostNameSslStates != nil { - objectMap["hostNameSslStates"] = spr.HostNameSslStates - } - if spr.ServerFarmID != nil { - objectMap["serverFarmId"] = spr.ServerFarmID - } - if spr.Reserved != nil { - objectMap["reserved"] = spr.Reserved - } - if spr.IsXenon != nil { - objectMap["isXenon"] = spr.IsXenon - } - if spr.HyperV != nil { - objectMap["hyperV"] = spr.HyperV - } - if spr.SiteConfig != nil { - objectMap["siteConfig"] = spr.SiteConfig - } - if spr.ScmSiteAlsoStopped != nil { - objectMap["scmSiteAlsoStopped"] = spr.ScmSiteAlsoStopped - } - if spr.HostingEnvironmentProfile != nil { - objectMap["hostingEnvironmentProfile"] = spr.HostingEnvironmentProfile - } - if spr.ClientAffinityEnabled != nil { - objectMap["clientAffinityEnabled"] = spr.ClientAffinityEnabled - } - if spr.ClientCertEnabled != nil { - objectMap["clientCertEnabled"] = spr.ClientCertEnabled - } - if spr.ClientCertMode != "" { - objectMap["clientCertMode"] = spr.ClientCertMode - } - if spr.ClientCertExclusionPaths != nil { - objectMap["clientCertExclusionPaths"] = spr.ClientCertExclusionPaths - } - if spr.HostNamesDisabled != nil { - objectMap["hostNamesDisabled"] = spr.HostNamesDisabled + if sdc.Value != nil { + objectMap["value"] = sdc.Value } - if spr.CustomDomainVerificationID != nil { - objectMap["customDomainVerificationId"] = spr.CustomDomainVerificationID + return json.Marshal(objectMap) +} + +// SlotDifferenceCollectionIterator provides access to a complete listing of SlotDifference values. +type SlotDifferenceCollectionIterator struct { + i int + page SlotDifferenceCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *SlotDifferenceCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SlotDifferenceCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - if spr.ContainerSize != nil { - objectMap["containerSize"] = spr.ContainerSize + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil } - if spr.DailyMemoryTimeQuota != nil { - objectMap["dailyMemoryTimeQuota"] = spr.DailyMemoryTimeQuota + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err } - if spr.CloningInfo != nil { - objectMap["cloningInfo"] = spr.CloningInfo + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *SlotDifferenceCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SlotDifferenceCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter SlotDifferenceCollectionIterator) Response() SlotDifferenceCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter SlotDifferenceCollectionIterator) Value() SlotDifference { + if !iter.page.NotDone() { + return SlotDifference{} } - if spr.HTTPSOnly != nil { - objectMap["httpsOnly"] = spr.HTTPSOnly + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SlotDifferenceCollectionIterator type. +func NewSlotDifferenceCollectionIterator(page SlotDifferenceCollectionPage) SlotDifferenceCollectionIterator { + return SlotDifferenceCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (sdc SlotDifferenceCollection) IsEmpty() bool { + return sdc.Value == nil || len(*sdc.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (sdc SlotDifferenceCollection) hasNextLink() bool { + return sdc.NextLink != nil && len(*sdc.NextLink) != 0 +} + +// slotDifferenceCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (sdc SlotDifferenceCollection) slotDifferenceCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !sdc.hasNextLink() { + return nil, nil } - if spr.RedundancyMode != "" { - objectMap["redundancyMode"] = spr.RedundancyMode + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(sdc.NextLink))) +} + +// SlotDifferenceCollectionPage contains a page of SlotDifference values. +type SlotDifferenceCollectionPage struct { + fn func(context.Context, SlotDifferenceCollection) (SlotDifferenceCollection, error) + sdc SlotDifferenceCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *SlotDifferenceCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SlotDifferenceCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - if spr.StorageAccountRequired != nil { - objectMap["storageAccountRequired"] = spr.StorageAccountRequired + for { + next, err := page.fn(ctx, page.sdc) + if err != nil { + return err + } + page.sdc = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - if spr.KeyVaultReferenceIdentity != nil { - objectMap["keyVaultReferenceIdentity"] = spr.KeyVaultReferenceIdentity + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *SlotDifferenceCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SlotDifferenceCollectionPage) NotDone() bool { + return !page.sdc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SlotDifferenceCollectionPage) Response() SlotDifferenceCollection { + return page.sdc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SlotDifferenceCollectionPage) Values() []SlotDifference { + if page.sdc.IsEmpty() { + return nil } - if spr.VirtualNetworkSubnetID != nil { - objectMap["virtualNetworkSubnetId"] = spr.VirtualNetworkSubnetID + return *page.sdc.Value +} + +// Creates a new instance of the SlotDifferenceCollectionPage type. +func NewSlotDifferenceCollectionPage(cur SlotDifferenceCollection, getNextPage func(context.Context, SlotDifferenceCollection) (SlotDifferenceCollection, error)) SlotDifferenceCollectionPage { + return SlotDifferenceCollectionPage{ + fn: getNextPage, + sdc: cur, } +} + +// SlotDifferenceProperties slotDifference resource specific properties +type SlotDifferenceProperties struct { + // Level - READ-ONLY; Level of the difference: Information, Warning or Error. + Level *string `json:"level,omitempty"` + // SettingType - READ-ONLY; The type of the setting: General, AppSetting or ConnectionString. + SettingType *string `json:"settingType,omitempty"` + // DiffRule - READ-ONLY; Rule that describes how to process the setting difference during a slot swap. + DiffRule *string `json:"diffRule,omitempty"` + // SettingName - READ-ONLY; Name of the setting. + SettingName *string `json:"settingName,omitempty"` + // ValueInCurrentSlot - READ-ONLY; Value of the setting in the current slot. + ValueInCurrentSlot *string `json:"valueInCurrentSlot,omitempty"` + // ValueInTargetSlot - READ-ONLY; Value of the setting in the target slot. + ValueInTargetSlot *string `json:"valueInTargetSlot,omitempty"` + // Description - READ-ONLY; Description of the setting difference. + Description *string `json:"description,omitempty"` +} + +// MarshalJSON is the custom marshaler for SlotDifferenceProperties. +func (sd SlotDifferenceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) return json.Marshal(objectMap) } -// SitePhpErrorLogFlag used for getting PHP error logging flag. -type SitePhpErrorLogFlag struct { - autorest.Response `json:"-"` - // SitePhpErrorLogFlagProperties - SitePhpErrorLogFlag resource specific properties - *SitePhpErrorLogFlagProperties `json:"properties,omitempty"` +// SlotSwapStatus the status of the last successful slot swap operation. +type SlotSwapStatus struct { + // TimestampUtc - READ-ONLY; The time the last successful slot swap completed. + TimestampUtc *date.Time `json:"timestampUtc,omitempty"` + // SourceSlotName - READ-ONLY; The source slot of the last swap operation. + SourceSlotName *string `json:"sourceSlotName,omitempty"` + // DestinationSlotName - READ-ONLY; The destination slot of the last swap operation. + DestinationSlotName *string `json:"destinationSlotName,omitempty"` +} + +// MarshalJSON is the custom marshaler for SlotSwapStatus. +func (sss SlotSwapStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// SlowRequestsBasedTrigger trigger based on request execution time. +type SlowRequestsBasedTrigger struct { + // TimeTaken - Time taken. + TimeTaken *string `json:"timeTaken,omitempty"` + // Path - Request Path. + Path *string `json:"path,omitempty"` + // Count - Request Count. + Count *int32 `json:"count,omitempty"` + // TimeInterval - Time interval. + TimeInterval *string `json:"timeInterval,omitempty"` +} + +// Snapshot a snapshot of an app. +type Snapshot struct { + // SnapshotProperties - Snapshot resource specific properties + *SnapshotProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -24767,20 +27286,20 @@ type SitePhpErrorLogFlag struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for SitePhpErrorLogFlag. -func (spelf SitePhpErrorLogFlag) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for Snapshot. +func (s Snapshot) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if spelf.SitePhpErrorLogFlagProperties != nil { - objectMap["properties"] = spelf.SitePhpErrorLogFlagProperties + if s.SnapshotProperties != nil { + objectMap["properties"] = s.SnapshotProperties } - if spelf.Kind != nil { - objectMap["kind"] = spelf.Kind + if s.Kind != nil { + objectMap["kind"] = s.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for SitePhpErrorLogFlag struct. -func (spelf *SitePhpErrorLogFlag) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for Snapshot struct. +func (s *Snapshot) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -24790,12 +27309,12 @@ func (spelf *SitePhpErrorLogFlag) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var sitePhpErrorLogFlagProperties SitePhpErrorLogFlagProperties - err = json.Unmarshal(*v, &sitePhpErrorLogFlagProperties) + var snapshotProperties SnapshotProperties + err = json.Unmarshal(*v, &snapshotProperties) if err != nil { return err } - spelf.SitePhpErrorLogFlagProperties = &sitePhpErrorLogFlagProperties + s.SnapshotProperties = &snapshotProperties } case "id": if v != nil { @@ -24804,7 +27323,7 @@ func (spelf *SitePhpErrorLogFlag) UnmarshalJSON(body []byte) error { if err != nil { return err } - spelf.ID = &ID + s.ID = &ID } case "name": if v != nil { @@ -24813,7 +27332,7 @@ func (spelf *SitePhpErrorLogFlag) UnmarshalJSON(body []byte) error { if err != nil { return err } - spelf.Name = &name + s.Name = &name } case "kind": if v != nil { @@ -24822,7 +27341,7 @@ func (spelf *SitePhpErrorLogFlag) UnmarshalJSON(body []byte) error { if err != nil { return err } - spelf.Kind = &kind + s.Kind = &kind } case "type": if v != nil { @@ -24831,7 +27350,7 @@ func (spelf *SitePhpErrorLogFlag) UnmarshalJSON(body []byte) error { if err != nil { return err } - spelf.Type = &typeVar + s.Type = &typeVar } } } @@ -24839,207 +27358,200 @@ func (spelf *SitePhpErrorLogFlag) UnmarshalJSON(body []byte) error { return nil } -// SitePhpErrorLogFlagProperties sitePhpErrorLogFlag resource specific properties -type SitePhpErrorLogFlagProperties struct { - // LocalLogErrors - Local log_errors setting. - LocalLogErrors *string `json:"localLogErrors,omitempty"` - // MasterLogErrors - Master log_errors setting. - MasterLogErrors *string `json:"masterLogErrors,omitempty"` - // LocalLogErrorsMaxLength - Local log_errors_max_len setting. - LocalLogErrorsMaxLength *string `json:"localLogErrorsMaxLength,omitempty"` - // MasterLogErrorsMaxLength - Master log_errors_max_len setting. - MasterLogErrorsMaxLength *string `json:"masterLogErrorsMaxLength,omitempty"` -} - -// SiteProperties site resource specific properties -type SiteProperties struct { - // State - READ-ONLY; Current state of the app. - State *string `json:"state,omitempty"` - // HostNames - READ-ONLY; Hostnames associated with the app. - HostNames *[]string `json:"hostNames,omitempty"` - // RepositorySiteName - READ-ONLY; Name of the repository site. - RepositorySiteName *string `json:"repositorySiteName,omitempty"` - // UsageState - READ-ONLY; State indicating whether the app has exceeded its quota usage. Read-only. Possible values include: 'UsageStateNormal', 'UsageStateExceeded' - UsageState UsageState `json:"usageState,omitempty"` - // Enabled - true if the app is enabled; otherwise, false. Setting this value to false disables the app (takes the app offline). - Enabled *bool `json:"enabled,omitempty"` - // EnabledHostNames - READ-ONLY; Enabled hostnames for the app.Hostnames need to be assigned (see HostNames) AND enabled. Otherwise, - // the app is not served on those hostnames. - EnabledHostNames *[]string `json:"enabledHostNames,omitempty"` - // AvailabilityState - READ-ONLY; Management information availability state for the app. Possible values include: 'SiteAvailabilityStateNormal', 'SiteAvailabilityStateLimited', 'SiteAvailabilityStateDisasterRecoveryMode' - AvailabilityState SiteAvailabilityState `json:"availabilityState,omitempty"` - // HostNameSslStates - Hostname SSL states are used to manage the SSL bindings for app's hostnames. - HostNameSslStates *[]HostNameSslState `json:"hostNameSslStates,omitempty"` - // ServerFarmID - Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". - ServerFarmID *string `json:"serverFarmId,omitempty"` - // Reserved - true if reserved; otherwise, false. - Reserved *bool `json:"reserved,omitempty"` - // IsXenon - Obsolete: Hyper-V sandbox. - IsXenon *bool `json:"isXenon,omitempty"` - // HyperV - Hyper-V sandbox. - HyperV *bool `json:"hyperV,omitempty"` - // LastModifiedTimeUtc - READ-ONLY; Last time the app was modified, in UTC. Read-only. - LastModifiedTimeUtc *date.Time `json:"lastModifiedTimeUtc,omitempty"` - // SiteConfig - Configuration of the app. - SiteConfig *SiteConfig `json:"siteConfig,omitempty"` - // TrafficManagerHostNames - READ-ONLY; Azure Traffic Manager hostnames associated with the app. Read-only. - TrafficManagerHostNames *[]string `json:"trafficManagerHostNames,omitempty"` - // ScmSiteAlsoStopped - true to stop SCM (KUDU) site when the app is stopped; otherwise, false. The default is false. - ScmSiteAlsoStopped *bool `json:"scmSiteAlsoStopped,omitempty"` - // TargetSwapSlot - READ-ONLY; Specifies which deployment slot this app will swap into. Read-only. - TargetSwapSlot *string `json:"targetSwapSlot,omitempty"` - // HostingEnvironmentProfile - App Service Environment to use for the app. - HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` - // ClientAffinityEnabled - true to enable client affinity; false to stop sending session affinity cookies, which route client requests in the same session to the same instance. Default is true. - ClientAffinityEnabled *bool `json:"clientAffinityEnabled,omitempty"` - // ClientCertEnabled - true to enable client certificate authentication (TLS mutual authentication); otherwise, false. Default is false. - ClientCertEnabled *bool `json:"clientCertEnabled,omitempty"` - // ClientCertMode - This composes with ClientCertEnabled setting. - // - ClientCertEnabled: false means ClientCert is ignored. - // - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. - // - ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. Possible values include: 'ClientCertModeRequired', 'ClientCertModeOptional', 'ClientCertModeOptionalInteractiveUser' - ClientCertMode ClientCertMode `json:"clientCertMode,omitempty"` - // ClientCertExclusionPaths - client certificate authentication comma-separated exclusion paths - ClientCertExclusionPaths *string `json:"clientCertExclusionPaths,omitempty"` - // HostNamesDisabled - true to disable the public hostnames of the app; otherwise, false. - // If true, the app is only accessible via API management process. - HostNamesDisabled *bool `json:"hostNamesDisabled,omitempty"` - // CustomDomainVerificationID - Unique identifier that verifies the custom domains assigned to the app. Customer will add this id to a txt record for verification. - CustomDomainVerificationID *string `json:"customDomainVerificationId,omitempty"` - // OutboundIPAddresses - READ-ONLY; List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from tenants that site can be hosted with current settings. Read-only. - OutboundIPAddresses *string `json:"outboundIpAddresses,omitempty"` - // PossibleOutboundIPAddresses - READ-ONLY; List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read-only. - PossibleOutboundIPAddresses *string `json:"possibleOutboundIpAddresses,omitempty"` - // ContainerSize - Size of the function container. - ContainerSize *int32 `json:"containerSize,omitempty"` - // DailyMemoryTimeQuota - Maximum allowed daily memory-time quota (applicable on dynamic apps only). - DailyMemoryTimeQuota *int32 `json:"dailyMemoryTimeQuota,omitempty"` - // SuspendedTill - READ-ONLY; App suspended till in case memory-time quota is exceeded. - SuspendedTill *date.Time `json:"suspendedTill,omitempty"` - // MaxNumberOfWorkers - READ-ONLY; Maximum number of workers. - // This only applies to Functions container. - MaxNumberOfWorkers *int32 `json:"maxNumberOfWorkers,omitempty"` - // CloningInfo - If specified during app creation, the app is cloned from a source app. - CloningInfo *CloningInfo `json:"cloningInfo,omitempty"` - // ResourceGroup - READ-ONLY; Name of the resource group the app belongs to. Read-only. - ResourceGroup *string `json:"resourceGroup,omitempty"` - // IsDefaultContainer - READ-ONLY; true if the app is a default container; otherwise, false. - IsDefaultContainer *bool `json:"isDefaultContainer,omitempty"` - // DefaultHostName - READ-ONLY; Default hostname of the app. Read-only. - DefaultHostName *string `json:"defaultHostName,omitempty"` - // SlotSwapStatus - READ-ONLY; Status of the last deployment slot swap operation. - SlotSwapStatus *SlotSwapStatus `json:"slotSwapStatus,omitempty"` - // HTTPSOnly - HttpsOnly: configures a web site to accept only https requests. Issues redirect for - // http requests - HTTPSOnly *bool `json:"httpsOnly,omitempty"` - // RedundancyMode - Site redundancy mode. Possible values include: 'RedundancyModeNone', 'RedundancyModeManual', 'RedundancyModeFailover', 'RedundancyModeActiveActive', 'RedundancyModeGeoRedundant' - RedundancyMode RedundancyMode `json:"redundancyMode,omitempty"` - // InProgressOperationID - READ-ONLY; Specifies an operation id if this site has a pending operation. - InProgressOperationID *uuid.UUID `json:"inProgressOperationId,omitempty"` - // StorageAccountRequired - Checks if Customer provided storage account is required - StorageAccountRequired *bool `json:"storageAccountRequired,omitempty"` - // KeyVaultReferenceIdentity - Identity to use for Key Vault Reference authentication. - KeyVaultReferenceIdentity *string `json:"keyVaultReferenceIdentity,omitempty"` - // VirtualNetworkSubnetID - Azure Resource Manager ID of the Virtual network and subnet to be joined by Regional VNET Integration. - // This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} - VirtualNetworkSubnetID *string `json:"virtualNetworkSubnetId,omitempty"` +// SnapshotCollection collection of snapshots which can be used to revert an app to a previous time. +type SnapshotCollection struct { + autorest.Response `json:"-"` + // Value - Collection of resources. + Value *[]Snapshot `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for SiteProperties. -func (s SiteProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for SnapshotCollection. +func (sc SnapshotCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if s.Enabled != nil { - objectMap["enabled"] = s.Enabled - } - if s.HostNameSslStates != nil { - objectMap["hostNameSslStates"] = s.HostNameSslStates - } - if s.ServerFarmID != nil { - objectMap["serverFarmId"] = s.ServerFarmID - } - if s.Reserved != nil { - objectMap["reserved"] = s.Reserved - } - if s.IsXenon != nil { - objectMap["isXenon"] = s.IsXenon - } - if s.HyperV != nil { - objectMap["hyperV"] = s.HyperV - } - if s.SiteConfig != nil { - objectMap["siteConfig"] = s.SiteConfig - } - if s.ScmSiteAlsoStopped != nil { - objectMap["scmSiteAlsoStopped"] = s.ScmSiteAlsoStopped - } - if s.HostingEnvironmentProfile != nil { - objectMap["hostingEnvironmentProfile"] = s.HostingEnvironmentProfile - } - if s.ClientAffinityEnabled != nil { - objectMap["clientAffinityEnabled"] = s.ClientAffinityEnabled - } - if s.ClientCertEnabled != nil { - objectMap["clientCertEnabled"] = s.ClientCertEnabled - } - if s.ClientCertMode != "" { - objectMap["clientCertMode"] = s.ClientCertMode - } - if s.ClientCertExclusionPaths != nil { - objectMap["clientCertExclusionPaths"] = s.ClientCertExclusionPaths - } - if s.HostNamesDisabled != nil { - objectMap["hostNamesDisabled"] = s.HostNamesDisabled + if sc.Value != nil { + objectMap["value"] = sc.Value } - if s.CustomDomainVerificationID != nil { - objectMap["customDomainVerificationId"] = s.CustomDomainVerificationID + return json.Marshal(objectMap) +} + +// SnapshotCollectionIterator provides access to a complete listing of Snapshot values. +type SnapshotCollectionIterator struct { + i int + page SnapshotCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *SnapshotCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - if s.ContainerSize != nil { - objectMap["containerSize"] = s.ContainerSize + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil } - if s.DailyMemoryTimeQuota != nil { - objectMap["dailyMemoryTimeQuota"] = s.DailyMemoryTimeQuota + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err } - if s.CloningInfo != nil { - objectMap["cloningInfo"] = s.CloningInfo + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *SnapshotCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SnapshotCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter SnapshotCollectionIterator) Response() SnapshotCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter SnapshotCollectionIterator) Value() Snapshot { + if !iter.page.NotDone() { + return Snapshot{} } - if s.HTTPSOnly != nil { - objectMap["httpsOnly"] = s.HTTPSOnly + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SnapshotCollectionIterator type. +func NewSnapshotCollectionIterator(page SnapshotCollectionPage) SnapshotCollectionIterator { + return SnapshotCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (sc SnapshotCollection) IsEmpty() bool { + return sc.Value == nil || len(*sc.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (sc SnapshotCollection) hasNextLink() bool { + return sc.NextLink != nil && len(*sc.NextLink) != 0 +} + +// snapshotCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (sc SnapshotCollection) snapshotCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !sc.hasNextLink() { + return nil, nil } - if s.RedundancyMode != "" { - objectMap["redundancyMode"] = s.RedundancyMode + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(sc.NextLink))) +} + +// SnapshotCollectionPage contains a page of Snapshot values. +type SnapshotCollectionPage struct { + fn func(context.Context, SnapshotCollection) (SnapshotCollection, error) + sc SnapshotCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *SnapshotCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - if s.StorageAccountRequired != nil { - objectMap["storageAccountRequired"] = s.StorageAccountRequired + for { + next, err := page.fn(ctx, page.sc) + if err != nil { + return err + } + page.sc = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - if s.KeyVaultReferenceIdentity != nil { - objectMap["keyVaultReferenceIdentity"] = s.KeyVaultReferenceIdentity + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *SnapshotCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SnapshotCollectionPage) NotDone() bool { + return !page.sc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SnapshotCollectionPage) Response() SnapshotCollection { + return page.sc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SnapshotCollectionPage) Values() []Snapshot { + if page.sc.IsEmpty() { + return nil } - if s.VirtualNetworkSubnetID != nil { - objectMap["virtualNetworkSubnetId"] = s.VirtualNetworkSubnetID + return *page.sc.Value +} + +// Creates a new instance of the SnapshotCollectionPage type. +func NewSnapshotCollectionPage(cur SnapshotCollection, getNextPage func(context.Context, SnapshotCollection) (SnapshotCollection, error)) SnapshotCollectionPage { + return SnapshotCollectionPage{ + fn: getNextPage, + sc: cur, } - return json.Marshal(objectMap) } -// SiteSeal site seal -type SiteSeal struct { - autorest.Response `json:"-"` - // HTML - HTML snippet - HTML *string `json:"html,omitempty"` +// SnapshotProperties snapshot resource specific properties +type SnapshotProperties struct { + // Time - READ-ONLY; The time the snapshot was taken. + Time *string `json:"time,omitempty"` } -// SiteSealRequest site seal request. -type SiteSealRequest struct { - // LightTheme - If true use the light color theme for site seal; otherwise, use the default color theme. - LightTheme *bool `json:"lightTheme,omitempty"` - // Locale - Locale of site seal. - Locale *string `json:"locale,omitempty"` +// MarshalJSON is the custom marshaler for SnapshotProperties. +func (s SnapshotProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) } -// SiteSourceControl source control configuration for an app. -type SiteSourceControl struct { - autorest.Response `json:"-"` - // SiteSourceControlProperties - SiteSourceControl resource specific properties - *SiteSourceControlProperties `json:"properties,omitempty"` +// SnapshotRecoverySource specifies the web app that snapshot contents will be retrieved from. +type SnapshotRecoverySource struct { + // Location - Geographical location of the source web app, e.g. SouthEastAsia, SouthCentralUS + Location *string `json:"location,omitempty"` + // ID - ARM resource ID of the source app. + // /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} for production slots and + // /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} for other slots. + ID *string `json:"id,omitempty"` +} + +// SnapshotRestoreRequest details about app recovery operation. +type SnapshotRestoreRequest struct { + // SnapshotRestoreRequestProperties - SnapshotRestoreRequest resource specific properties + *SnapshotRestoreRequestProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -25050,20 +27562,20 @@ type SiteSourceControl struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for SiteSourceControl. -func (ssc SiteSourceControl) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for SnapshotRestoreRequest. +func (srr SnapshotRestoreRequest) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ssc.SiteSourceControlProperties != nil { - objectMap["properties"] = ssc.SiteSourceControlProperties + if srr.SnapshotRestoreRequestProperties != nil { + objectMap["properties"] = srr.SnapshotRestoreRequestProperties } - if ssc.Kind != nil { - objectMap["kind"] = ssc.Kind + if srr.Kind != nil { + objectMap["kind"] = srr.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for SiteSourceControl struct. -func (ssc *SiteSourceControl) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for SnapshotRestoreRequest struct. +func (srr *SnapshotRestoreRequest) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -25073,12 +27585,12 @@ func (ssc *SiteSourceControl) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var siteSourceControlProperties SiteSourceControlProperties - err = json.Unmarshal(*v, &siteSourceControlProperties) + var snapshotRestoreRequestProperties SnapshotRestoreRequestProperties + err = json.Unmarshal(*v, &snapshotRestoreRequestProperties) if err != nil { return err } - ssc.SiteSourceControlProperties = &siteSourceControlProperties + srr.SnapshotRestoreRequestProperties = &snapshotRestoreRequestProperties } case "id": if v != nil { @@ -25087,7 +27599,7 @@ func (ssc *SiteSourceControl) UnmarshalJSON(body []byte) error { if err != nil { return err } - ssc.ID = &ID + srr.ID = &ID } case "name": if v != nil { @@ -25096,7 +27608,7 @@ func (ssc *SiteSourceControl) UnmarshalJSON(body []byte) error { if err != nil { return err } - ssc.Name = &name + srr.Name = &name } case "kind": if v != nil { @@ -25105,7 +27617,7 @@ func (ssc *SiteSourceControl) UnmarshalJSON(body []byte) error { if err != nil { return err } - ssc.Kind = &kind + srr.Kind = &kind } case "type": if v != nil { @@ -25114,7 +27626,7 @@ func (ssc *SiteSourceControl) UnmarshalJSON(body []byte) error { if err != nil { return err } - ssc.Type = &typeVar + srr.Type = &typeVar } } } @@ -25122,97 +27634,158 @@ func (ssc *SiteSourceControl) UnmarshalJSON(body []byte) error { return nil } -// SiteSourceControlProperties siteSourceControl resource specific properties -type SiteSourceControlProperties struct { - // RepoURL - Repository or source control URL. - RepoURL *string `json:"repoUrl,omitempty"` - // Branch - Name of branch to use for deployment. - Branch *string `json:"branch,omitempty"` - // IsManualIntegration - true to limit to manual integration; false to enable continuous integration (which configures webhooks into online repos like GitHub). - IsManualIntegration *bool `json:"isManualIntegration,omitempty"` - // IsGitHubAction - true if this is deployed via GitHub action. - IsGitHubAction *bool `json:"isGitHubAction,omitempty"` - // DeploymentRollbackEnabled - true to enable deployment rollback; otherwise, false. - DeploymentRollbackEnabled *bool `json:"deploymentRollbackEnabled,omitempty"` - // IsMercurial - true for a Mercurial repository; false for a Git repository. - IsMercurial *bool `json:"isMercurial,omitempty"` - // GitHubActionConfiguration - If GitHub Action is selected, than the associated configuration. - GitHubActionConfiguration *GitHubActionConfiguration `json:"gitHubActionConfiguration,omitempty"` +// SnapshotRestoreRequestProperties snapshotRestoreRequest resource specific properties +type SnapshotRestoreRequestProperties struct { + // SnapshotTime - Point in time in which the app restore should be done, formatted as a DateTime string. + SnapshotTime *string `json:"snapshotTime,omitempty"` + // RecoverySource - Optional. Specifies the web app that snapshot contents will be retrieved from. + // If empty, the targeted web app will be used as the source. + RecoverySource *SnapshotRecoverySource `json:"recoverySource,omitempty"` + // Overwrite - If true the restore operation can overwrite source app; otherwise, false. + Overwrite *bool `json:"overwrite,omitempty"` + // RecoverConfiguration - If true, site configuration, in addition to content, will be reverted. + RecoverConfiguration *bool `json:"recoverConfiguration,omitempty"` + // IgnoreConflictingHostNames - If true, custom hostname conflicts will be ignored when recovering to a target web app. + // This setting is only necessary when RecoverConfiguration is enabled. + IgnoreConflictingHostNames *bool `json:"ignoreConflictingHostNames,omitempty"` + // UseDRSecondary - If true, the snapshot is retrieved from DRSecondary endpoint. + UseDRSecondary *bool `json:"useDRSecondary,omitempty"` } -// SkuCapacity description of the App Service plan scale options. -type SkuCapacity struct { - // Minimum - Minimum number of workers for this App Service plan SKU. - Minimum *int32 `json:"minimum,omitempty"` - // Maximum - Maximum number of workers for this App Service plan SKU. - Maximum *int32 `json:"maximum,omitempty"` - // ElasticMaximum - Maximum number of Elastic workers for this App Service plan SKU. - ElasticMaximum *int32 `json:"elasticMaximum,omitempty"` - // Default - Default number of workers for this App Service plan SKU. - Default *int32 `json:"default,omitempty"` - // ScaleType - Available scale configurations for an App Service plan. - ScaleType *string `json:"scaleType,omitempty"` +// Solution class Representing Solution for problems detected. +type Solution struct { + // ID - Solution Id. + ID *float64 `json:"id,omitempty"` + // DisplayName - Display Name of the solution + DisplayName *string `json:"displayName,omitempty"` + // Order - Order of the solution. + Order *float64 `json:"order,omitempty"` + // Description - Description of the solution + Description *string `json:"description,omitempty"` + // Type - Type of Solution. Possible values include: 'SolutionTypeQuickSolution', 'SolutionTypeDeepInvestigation', 'SolutionTypeBestPractices' + Type SolutionType `json:"type,omitempty"` + // Data - Solution Data. + Data *[][]NameValuePair `json:"data,omitempty"` + // Metadata - Solution Metadata. + Metadata *[][]NameValuePair `json:"metadata,omitempty"` } -// SkuDescription description of a SKU for a scalable resource. -type SkuDescription struct { - // Name - Name of the resource SKU. +// SourceControl the source control OAuth token. +type SourceControl struct { + autorest.Response `json:"-"` + // SourceControlProperties - SourceControl resource specific properties + *SourceControlProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. Name *string `json:"name,omitempty"` - // Tier - Service tier of the resource SKU. - Tier *string `json:"tier,omitempty"` - // Size - Size specifier of the resource SKU. - Size *string `json:"size,omitempty"` - // Family - Family code of the resource SKU. - Family *string `json:"family,omitempty"` - // Capacity - Current number of instances assigned to the resource. - Capacity *int32 `json:"capacity,omitempty"` - // SkuCapacity - Min, max, and default scale values of the SKU. - SkuCapacity *SkuCapacity `json:"skuCapacity,omitempty"` - // Locations - Locations of the SKU. - Locations *[]string `json:"locations,omitempty"` - // Capabilities - Capabilities of the SKU, e.g., is traffic manager enabled? - Capabilities *[]Capability `json:"capabilities,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` } -// SkuInfo SKU discovery information. -type SkuInfo struct { - // ResourceType - Resource type that this SKU applies to. - ResourceType *string `json:"resourceType,omitempty"` - // Sku - Name and tier of the SKU. - Sku *SkuDescription `json:"sku,omitempty"` - // Capacity - Min, max, and default scale values of the SKU. - Capacity *SkuCapacity `json:"capacity,omitempty"` +// MarshalJSON is the custom marshaler for SourceControl. +func (sc SourceControl) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sc.SourceControlProperties != nil { + objectMap["properties"] = sc.SourceControlProperties + } + if sc.Kind != nil { + objectMap["kind"] = sc.Kind + } + return json.Marshal(objectMap) } -// SkuInfoCollection collection of SKU information. -type SkuInfoCollection struct { +// UnmarshalJSON is the custom unmarshaler for SourceControl struct. +func (sc *SourceControl) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var sourceControlProperties SourceControlProperties + err = json.Unmarshal(*v, &sourceControlProperties) + if err != nil { + return err + } + sc.SourceControlProperties = &sourceControlProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sc.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + sc.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sc.Type = &typeVar + } + } + } + + return nil +} + +// SourceControlCollection collection of source controls. +type SourceControlCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]SkuInfo `json:"value,omitempty"` + Value *[]SourceControl `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for SkuInfoCollection. -func (sic SkuInfoCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for SourceControlCollection. +func (scc SourceControlCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if sic.Value != nil { - objectMap["value"] = sic.Value + if scc.Value != nil { + objectMap["value"] = scc.Value } return json.Marshal(objectMap) } -// SkuInfoCollectionIterator provides access to a complete listing of SkuInfo values. -type SkuInfoCollectionIterator struct { +// SourceControlCollectionIterator provides access to a complete listing of SourceControl values. +type SourceControlCollectionIterator struct { i int - page SkuInfoCollectionPage + page SourceControlCollectionPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *SkuInfoCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *SourceControlCollectionIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SkuInfoCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/SourceControlCollectionIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -25237,67 +27810,67 @@ func (iter *SkuInfoCollectionIterator) NextWithContext(ctx context.Context) (err // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *SkuInfoCollectionIterator) Next() error { +func (iter *SourceControlCollectionIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SkuInfoCollectionIterator) NotDone() bool { +func (iter SourceControlCollectionIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter SkuInfoCollectionIterator) Response() SkuInfoCollection { +func (iter SourceControlCollectionIterator) Response() SourceControlCollection { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter SkuInfoCollectionIterator) Value() SkuInfo { +func (iter SourceControlCollectionIterator) Value() SourceControl { if !iter.page.NotDone() { - return SkuInfo{} + return SourceControl{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the SkuInfoCollectionIterator type. -func NewSkuInfoCollectionIterator(page SkuInfoCollectionPage) SkuInfoCollectionIterator { - return SkuInfoCollectionIterator{page: page} +// Creates a new instance of the SourceControlCollectionIterator type. +func NewSourceControlCollectionIterator(page SourceControlCollectionPage) SourceControlCollectionIterator { + return SourceControlCollectionIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (sic SkuInfoCollection) IsEmpty() bool { - return sic.Value == nil || len(*sic.Value) == 0 +func (scc SourceControlCollection) IsEmpty() bool { + return scc.Value == nil || len(*scc.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (sic SkuInfoCollection) hasNextLink() bool { - return sic.NextLink != nil && len(*sic.NextLink) != 0 +func (scc SourceControlCollection) hasNextLink() bool { + return scc.NextLink != nil && len(*scc.NextLink) != 0 } -// skuInfoCollectionPreparer prepares a request to retrieve the next set of results. +// sourceControlCollectionPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (sic SkuInfoCollection) skuInfoCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !sic.hasNextLink() { +func (scc SourceControlCollection) sourceControlCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !scc.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(sic.NextLink))) + autorest.WithBaseURL(to.String(scc.NextLink))) } -// SkuInfoCollectionPage contains a page of SkuInfo values. -type SkuInfoCollectionPage struct { - fn func(context.Context, SkuInfoCollection) (SkuInfoCollection, error) - sic SkuInfoCollection +// SourceControlCollectionPage contains a page of SourceControl values. +type SourceControlCollectionPage struct { + fn func(context.Context, SourceControlCollection) (SourceControlCollection, error) + scc SourceControlCollection } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *SkuInfoCollectionPage) NextWithContext(ctx context.Context) (err error) { +func (page *SourceControlCollectionPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SkuInfoCollectionPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/SourceControlCollectionPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -25307,11 +27880,11 @@ func (page *SkuInfoCollectionPage) NextWithContext(ctx context.Context) (err err }() } for { - next, err := page.fn(ctx, page.sic) + next, err := page.fn(ctx, page.scc) if err != nil { return err } - page.sic = next + page.scc = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -25322,260 +27895,185 @@ func (page *SkuInfoCollectionPage) NextWithContext(ctx context.Context) (err err // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *SkuInfoCollectionPage) Next() error { +func (page *SourceControlCollectionPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SkuInfoCollectionPage) NotDone() bool { - return !page.sic.IsEmpty() +func (page SourceControlCollectionPage) NotDone() bool { + return !page.scc.IsEmpty() } // Response returns the raw server response from the last page request. -func (page SkuInfoCollectionPage) Response() SkuInfoCollection { - return page.sic +func (page SourceControlCollectionPage) Response() SourceControlCollection { + return page.scc } // Values returns the slice of values for the current page or nil if there are no values. -func (page SkuInfoCollectionPage) Values() []SkuInfo { - if page.sic.IsEmpty() { +func (page SourceControlCollectionPage) Values() []SourceControl { + if page.scc.IsEmpty() { return nil } - return *page.sic.Value + return *page.scc.Value } -// Creates a new instance of the SkuInfoCollectionPage type. -func NewSkuInfoCollectionPage(cur SkuInfoCollection, getNextPage func(context.Context, SkuInfoCollection) (SkuInfoCollection, error)) SkuInfoCollectionPage { - return SkuInfoCollectionPage{ +// Creates a new instance of the SourceControlCollectionPage type. +func NewSourceControlCollectionPage(cur SourceControlCollection, getNextPage func(context.Context, SourceControlCollection) (SourceControlCollection, error)) SourceControlCollectionPage { + return SourceControlCollectionPage{ fn: getNextPage, - sic: cur, - } -} - -// SkuInfos collection of SKU information. -type SkuInfos struct { - autorest.Response `json:"-"` - // ResourceType - Resource type that this SKU applies to. - ResourceType *string `json:"resourceType,omitempty"` - // Skus - List of SKUs the subscription is able to use. - Skus *[]GlobalCsmSkuDescription `json:"skus,omitempty"` -} - -// SlotConfigNames names for connection strings, application settings, and external Azure storage account -// configuration -// identifiers to be marked as sticky to the deployment slot and not moved during a swap operation. -// This is valid for all deployment slots in an app. -type SlotConfigNames struct { - // ConnectionStringNames - List of connection string names. - ConnectionStringNames *[]string `json:"connectionStringNames,omitempty"` - // AppSettingNames - List of application settings names. - AppSettingNames *[]string `json:"appSettingNames,omitempty"` - // AzureStorageConfigNames - List of external Azure storage account identifiers. - AzureStorageConfigNames *[]string `json:"azureStorageConfigNames,omitempty"` -} - -// SlotConfigNamesResource slot Config names azure resource. -type SlotConfigNamesResource struct { - autorest.Response `json:"-"` - // SlotConfigNames - Core resource properties - *SlotConfigNames `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for SlotConfigNamesResource. -func (scnr SlotConfigNamesResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if scnr.SlotConfigNames != nil { - objectMap["properties"] = scnr.SlotConfigNames - } - if scnr.Kind != nil { - objectMap["kind"] = scnr.Kind - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for SlotConfigNamesResource struct. -func (scnr *SlotConfigNamesResource) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var slotConfigNames SlotConfigNames - err = json.Unmarshal(*v, &slotConfigNames) - if err != nil { - return err - } - scnr.SlotConfigNames = &slotConfigNames - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - scnr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - scnr.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - scnr.Kind = &kind - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - scnr.Type = &typeVar - } - } + scc: cur, } - - return nil } -// SlotDifference a setting difference between two deployment slots of an app. -type SlotDifference struct { - // SlotDifferenceProperties - SlotDifference resource specific properties - *SlotDifferenceProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` +// SourceControlProperties sourceControl resource specific properties +type SourceControlProperties struct { + // Token - OAuth access token. + Token *string `json:"token,omitempty"` + // TokenSecret - OAuth access token secret. + TokenSecret *string `json:"tokenSecret,omitempty"` + // RefreshToken - OAuth refresh token. + RefreshToken *string `json:"refreshToken,omitempty"` + // ExpirationTime - OAuth token expiration. + ExpirationTime *date.Time `json:"expirationTime,omitempty"` } -// MarshalJSON is the custom marshaler for SlotDifference. -func (sd SlotDifference) MarshalJSON() ([]byte, error) { +// StackMajorVersion application stack major version. +type StackMajorVersion struct { + // DisplayVersion - Application stack major version (display only). + DisplayVersion *string `json:"displayVersion,omitempty"` + // RuntimeVersion - Application stack major version (runtime only). + RuntimeVersion *string `json:"runtimeVersion,omitempty"` + // IsDefault - true if this is the default major version; otherwise, false. + IsDefault *bool `json:"isDefault,omitempty"` + // MinorVersions - Minor versions associated with the major version. + MinorVersions *[]StackMinorVersion `json:"minorVersions,omitempty"` + // ApplicationInsights - true if this supports Application Insights; otherwise, false. + ApplicationInsights *bool `json:"applicationInsights,omitempty"` + // IsPreview - true if this stack is in Preview, otherwise false. + IsPreview *bool `json:"isPreview,omitempty"` + // IsDeprecated - true if this stack has been deprecated, otherwise false. + IsDeprecated *bool `json:"isDeprecated,omitempty"` + // IsHidden - true if this stack should be hidden for new customers on portal, otherwise false. + IsHidden *bool `json:"isHidden,omitempty"` + // AppSettingsDictionary - + // + // + // Example: All the function apps need AppSetting: "FUNCTIONS_WORKER_RUNTIME" to be set stack name + AppSettingsDictionary map[string]interface{} `json:"appSettingsDictionary"` + // SiteConfigPropertiesDictionary - + // + // + // Example: All Linux Function Apps, need Use32BitWorkerProcess to be set to 0 + SiteConfigPropertiesDictionary map[string]interface{} `json:"siteConfigPropertiesDictionary"` +} + +// MarshalJSON is the custom marshaler for StackMajorVersion. +func (smv StackMajorVersion) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if sd.SlotDifferenceProperties != nil { - objectMap["properties"] = sd.SlotDifferenceProperties + if smv.DisplayVersion != nil { + objectMap["displayVersion"] = smv.DisplayVersion } - if sd.Kind != nil { - objectMap["kind"] = sd.Kind + if smv.RuntimeVersion != nil { + objectMap["runtimeVersion"] = smv.RuntimeVersion + } + if smv.IsDefault != nil { + objectMap["isDefault"] = smv.IsDefault + } + if smv.MinorVersions != nil { + objectMap["minorVersions"] = smv.MinorVersions + } + if smv.ApplicationInsights != nil { + objectMap["applicationInsights"] = smv.ApplicationInsights + } + if smv.IsPreview != nil { + objectMap["isPreview"] = smv.IsPreview + } + if smv.IsDeprecated != nil { + objectMap["isDeprecated"] = smv.IsDeprecated + } + if smv.IsHidden != nil { + objectMap["isHidden"] = smv.IsHidden + } + if smv.AppSettingsDictionary != nil { + objectMap["appSettingsDictionary"] = smv.AppSettingsDictionary + } + if smv.SiteConfigPropertiesDictionary != nil { + objectMap["siteConfigPropertiesDictionary"] = smv.SiteConfigPropertiesDictionary } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for SlotDifference struct. -func (sd *SlotDifference) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var slotDifferenceProperties SlotDifferenceProperties - err = json.Unmarshal(*v, &slotDifferenceProperties) - if err != nil { - return err - } - sd.SlotDifferenceProperties = &slotDifferenceProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sd.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sd.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - sd.Kind = &kind - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - sd.Type = &typeVar - } - } - } +// StackMinorVersion application stack minor version. +type StackMinorVersion struct { + // DisplayVersion - Application stack minor version (display only). + DisplayVersion *string `json:"displayVersion,omitempty"` + // RuntimeVersion - Application stack minor version (runtime only). + RuntimeVersion *string `json:"runtimeVersion,omitempty"` + // IsDefault - true if this is the default minor version; otherwise, false. + IsDefault *bool `json:"isDefault,omitempty"` + // IsRemoteDebuggingEnabled - true if this supports Remote Debugging, otherwise false. + IsRemoteDebuggingEnabled *bool `json:"isRemoteDebuggingEnabled,omitempty"` +} - return nil +// StampCapacity stamp capacity information. +type StampCapacity struct { + // Name - Name of the stamp. + Name *string `json:"name,omitempty"` + // AvailableCapacity - Available capacity (# of machines, bytes of storage etc...). + AvailableCapacity *int64 `json:"availableCapacity,omitempty"` + // TotalCapacity - Total capacity (# of machines, bytes of storage etc...). + TotalCapacity *int64 `json:"totalCapacity,omitempty"` + // Unit - Name of the unit. + Unit *string `json:"unit,omitempty"` + // ComputeMode - Shared/dedicated workers. Possible values include: 'ComputeModeOptionsShared', 'ComputeModeOptionsDedicated', 'ComputeModeOptionsDynamic' + ComputeMode ComputeModeOptions `json:"computeMode,omitempty"` + // WorkerSize - Size of the machines. Possible values include: 'WorkerSizeOptionsSmall', 'WorkerSizeOptionsMedium', 'WorkerSizeOptionsLarge', 'WorkerSizeOptionsD1', 'WorkerSizeOptionsD2', 'WorkerSizeOptionsD3', 'WorkerSizeOptionsSmallV3', 'WorkerSizeOptionsMediumV3', 'WorkerSizeOptionsLargeV3', 'WorkerSizeOptionsNestedSmall', 'WorkerSizeOptionsNestedSmallLinux', 'WorkerSizeOptionsDefault' + WorkerSize WorkerSizeOptions `json:"workerSize,omitempty"` + // WorkerSizeID - Size ID of machines: + // 0 - Small + // 1 - Medium + // 2 - Large + WorkerSizeID *int32 `json:"workerSizeId,omitempty"` + // ExcludeFromCapacityAllocation - If true, it includes basic apps. + // Basic apps are not used for capacity allocation. + ExcludeFromCapacityAllocation *bool `json:"excludeFromCapacityAllocation,omitempty"` + // IsApplicableForAllComputeModes - true if capacity is applicable for all apps; otherwise, false. + IsApplicableForAllComputeModes *bool `json:"isApplicableForAllComputeModes,omitempty"` + // SiteMode - Shared or Dedicated. + SiteMode *string `json:"siteMode,omitempty"` + // IsLinux - Is this a linux stamp capacity + IsLinux *bool `json:"isLinux,omitempty"` } -// SlotDifferenceCollection collection of slot differences. -type SlotDifferenceCollection struct { +// StampCapacityCollection collection of stamp capacities. +type StampCapacityCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]SlotDifference `json:"value,omitempty"` + Value *[]StampCapacity `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for SlotDifferenceCollection. -func (sdc SlotDifferenceCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StampCapacityCollection. +func (scc StampCapacityCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if sdc.Value != nil { - objectMap["value"] = sdc.Value + if scc.Value != nil { + objectMap["value"] = scc.Value } return json.Marshal(objectMap) } -// SlotDifferenceCollectionIterator provides access to a complete listing of SlotDifference values. -type SlotDifferenceCollectionIterator struct { +// StampCapacityCollectionIterator provides access to a complete listing of StampCapacity values. +type StampCapacityCollectionIterator struct { i int - page SlotDifferenceCollectionPage + page StampCapacityCollectionPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *SlotDifferenceCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *StampCapacityCollectionIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SlotDifferenceCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/StampCapacityCollectionIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -25600,67 +28098,67 @@ func (iter *SlotDifferenceCollectionIterator) NextWithContext(ctx context.Contex // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *SlotDifferenceCollectionIterator) Next() error { +func (iter *StampCapacityCollectionIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SlotDifferenceCollectionIterator) NotDone() bool { +func (iter StampCapacityCollectionIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter SlotDifferenceCollectionIterator) Response() SlotDifferenceCollection { +func (iter StampCapacityCollectionIterator) Response() StampCapacityCollection { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter SlotDifferenceCollectionIterator) Value() SlotDifference { +func (iter StampCapacityCollectionIterator) Value() StampCapacity { if !iter.page.NotDone() { - return SlotDifference{} + return StampCapacity{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the SlotDifferenceCollectionIterator type. -func NewSlotDifferenceCollectionIterator(page SlotDifferenceCollectionPage) SlotDifferenceCollectionIterator { - return SlotDifferenceCollectionIterator{page: page} +// Creates a new instance of the StampCapacityCollectionIterator type. +func NewStampCapacityCollectionIterator(page StampCapacityCollectionPage) StampCapacityCollectionIterator { + return StampCapacityCollectionIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (sdc SlotDifferenceCollection) IsEmpty() bool { - return sdc.Value == nil || len(*sdc.Value) == 0 +func (scc StampCapacityCollection) IsEmpty() bool { + return scc.Value == nil || len(*scc.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (sdc SlotDifferenceCollection) hasNextLink() bool { - return sdc.NextLink != nil && len(*sdc.NextLink) != 0 +func (scc StampCapacityCollection) hasNextLink() bool { + return scc.NextLink != nil && len(*scc.NextLink) != 0 } -// slotDifferenceCollectionPreparer prepares a request to retrieve the next set of results. +// stampCapacityCollectionPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (sdc SlotDifferenceCollection) slotDifferenceCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !sdc.hasNextLink() { +func (scc StampCapacityCollection) stampCapacityCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !scc.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(sdc.NextLink))) + autorest.WithBaseURL(to.String(scc.NextLink))) } -// SlotDifferenceCollectionPage contains a page of SlotDifference values. -type SlotDifferenceCollectionPage struct { - fn func(context.Context, SlotDifferenceCollection) (SlotDifferenceCollection, error) - sdc SlotDifferenceCollection +// StampCapacityCollectionPage contains a page of StampCapacity values. +type StampCapacityCollectionPage struct { + fn func(context.Context, StampCapacityCollection) (StampCapacityCollection, error) + scc StampCapacityCollection } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *SlotDifferenceCollectionPage) NextWithContext(ctx context.Context) (err error) { +func (page *StampCapacityCollectionPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SlotDifferenceCollectionPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/StampCapacityCollectionPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -25670,11 +28168,11 @@ func (page *SlotDifferenceCollectionPage) NextWithContext(ctx context.Context) ( }() } for { - next, err := page.fn(ctx, page.sdc) + next, err := page.fn(ctx, page.scc) if err != nil { return err } - page.sdc = next + page.scc = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -25685,92 +28183,258 @@ func (page *SlotDifferenceCollectionPage) NextWithContext(ctx context.Context) ( // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *SlotDifferenceCollectionPage) Next() error { +func (page *StampCapacityCollectionPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SlotDifferenceCollectionPage) NotDone() bool { - return !page.sdc.IsEmpty() +func (page StampCapacityCollectionPage) NotDone() bool { + return !page.scc.IsEmpty() } // Response returns the raw server response from the last page request. -func (page SlotDifferenceCollectionPage) Response() SlotDifferenceCollection { - return page.sdc +func (page StampCapacityCollectionPage) Response() StampCapacityCollection { + return page.scc } // Values returns the slice of values for the current page or nil if there are no values. -func (page SlotDifferenceCollectionPage) Values() []SlotDifference { - if page.sdc.IsEmpty() { +func (page StampCapacityCollectionPage) Values() []StampCapacity { + if page.scc.IsEmpty() { return nil } - return *page.sdc.Value + return *page.scc.Value } -// Creates a new instance of the SlotDifferenceCollectionPage type. -func NewSlotDifferenceCollectionPage(cur SlotDifferenceCollection, getNextPage func(context.Context, SlotDifferenceCollection) (SlotDifferenceCollection, error)) SlotDifferenceCollectionPage { - return SlotDifferenceCollectionPage{ +// Creates a new instance of the StampCapacityCollectionPage type. +func NewStampCapacityCollectionPage(cur StampCapacityCollection, getNextPage func(context.Context, StampCapacityCollection) (StampCapacityCollection, error)) StampCapacityCollectionPage { + return StampCapacityCollectionPage{ fn: getNextPage, - sdc: cur, + scc: cur, } } -// SlotDifferenceProperties slotDifference resource specific properties -type SlotDifferenceProperties struct { - // Level - READ-ONLY; Level of the difference: Information, Warning or Error. - Level *string `json:"level,omitempty"` - // SettingType - READ-ONLY; The type of the setting: General, AppSetting or ConnectionString. - SettingType *string `json:"settingType,omitempty"` - // DiffRule - READ-ONLY; Rule that describes how to process the setting difference during a slot swap. - DiffRule *string `json:"diffRule,omitempty"` - // SettingName - READ-ONLY; Name of the setting. - SettingName *string `json:"settingName,omitempty"` - // ValueInCurrentSlot - READ-ONLY; Value of the setting in the current slot. - ValueInCurrentSlot *string `json:"valueInCurrentSlot,omitempty"` - // ValueInTargetSlot - READ-ONLY; Value of the setting in the target slot. - ValueInTargetSlot *string `json:"valueInTargetSlot,omitempty"` - // Description - READ-ONLY; Description of the setting difference. - Description *string `json:"description,omitempty"` +// StaticSite a static site. +type StaticSite struct { + // DefaultHostname - READ-ONLY; The default autogenerated hostname for the static site. + DefaultHostname *string `json:"defaultHostname,omitempty"` + // RepositoryURL - URL for the repository of the static site. + RepositoryURL *string `json:"repositoryUrl,omitempty"` + // Branch - The target branch in the repository. + Branch *string `json:"branch,omitempty"` + // CustomDomains - READ-ONLY; The custom domains associated with this static site. + CustomDomains *[]string `json:"customDomains,omitempty"` + // RepositoryToken - A user's github repository token. This is used to setup the Github Actions workflow file and API secrets. + RepositoryToken *string `json:"repositoryToken,omitempty"` + // BuildProperties - Build properties to configure on the repository. + BuildProperties *StaticSiteBuildProperties `json:"buildProperties,omitempty"` + // PrivateEndpointConnections - READ-ONLY; Private endpoint connections + PrivateEndpointConnections *[]ResponseMessageEnvelopeRemotePrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` + // StagingEnvironmentPolicy - State indicating whether staging environments are allowed or not allowed for a static web app. Possible values include: 'StagingEnvironmentPolicyEnabled', 'StagingEnvironmentPolicyDisabled' + StagingEnvironmentPolicy StagingEnvironmentPolicy `json:"stagingEnvironmentPolicy,omitempty"` + // AllowConfigFileUpdates - false if config file is locked for this static web app; otherwise, true. + AllowConfigFileUpdates *bool `json:"allowConfigFileUpdates,omitempty"` + // TemplateProperties - Template options for generating a new repository. + TemplateProperties *StaticSiteTemplateOptions `json:"templateProperties,omitempty"` + // ContentDistributionEndpoint - READ-ONLY; The content distribution endpoint for the static site. + ContentDistributionEndpoint *string `json:"contentDistributionEndpoint,omitempty"` + // KeyVaultReferenceIdentity - READ-ONLY; Identity to use for Key Vault Reference authentication. + KeyVaultReferenceIdentity *string `json:"keyVaultReferenceIdentity,omitempty"` + // UserProvidedFunctionApps - READ-ONLY; User provided function apps registered with the static site + UserProvidedFunctionApps *[]StaticSiteUserProvidedFunctionApp `json:"userProvidedFunctionApps,omitempty"` + // LinkedBackends - READ-ONLY; Backends linked to the static side + LinkedBackends *[]StaticSiteLinkedBackend `json:"linkedBackends,omitempty"` + // Provider - The provider that submitted the last deployment to the primary environment of the static site. + Provider *string `json:"provider,omitempty"` + // EnterpriseGradeCdnStatus - State indicating the status of the enterprise grade CDN serving traffic to the static web app. Possible values include: 'EnterpriseGradeCdnStatusEnabled', 'EnterpriseGradeCdnStatusEnabling', 'EnterpriseGradeCdnStatusDisabled', 'EnterpriseGradeCdnStatusDisabling' + EnterpriseGradeCdnStatus EnterpriseGradeCdnStatus `json:"enterpriseGradeCdnStatus,omitempty"` + // PublicNetworkAccess - 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"` + // DatabaseConnections - READ-ONLY; Database connections for the static site + DatabaseConnections *[]DatabaseConnectionOverview `json:"databaseConnections,omitempty"` } -// MarshalJSON is the custom marshaler for SlotDifferenceProperties. -func (sd SlotDifferenceProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StaticSite. +func (ss StaticSite) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if ss.RepositoryURL != nil { + objectMap["repositoryUrl"] = ss.RepositoryURL + } + if ss.Branch != nil { + objectMap["branch"] = ss.Branch + } + if ss.RepositoryToken != nil { + objectMap["repositoryToken"] = ss.RepositoryToken + } + if ss.BuildProperties != nil { + objectMap["buildProperties"] = ss.BuildProperties + } + if ss.StagingEnvironmentPolicy != "" { + objectMap["stagingEnvironmentPolicy"] = ss.StagingEnvironmentPolicy + } + if ss.AllowConfigFileUpdates != nil { + objectMap["allowConfigFileUpdates"] = ss.AllowConfigFileUpdates + } + if ss.TemplateProperties != nil { + objectMap["templateProperties"] = ss.TemplateProperties + } + if ss.Provider != nil { + objectMap["provider"] = ss.Provider + } + if ss.EnterpriseGradeCdnStatus != "" { + objectMap["enterpriseGradeCdnStatus"] = ss.EnterpriseGradeCdnStatus + } + if ss.PublicNetworkAccess != nil { + objectMap["publicNetworkAccess"] = ss.PublicNetworkAccess + } return json.Marshal(objectMap) } -// SlotSwapStatus the status of the last successful slot swap operation. -type SlotSwapStatus struct { - // TimestampUtc - READ-ONLY; The time the last successful slot swap completed. - TimestampUtc *date.Time `json:"timestampUtc,omitempty"` - // SourceSlotName - READ-ONLY; The source slot of the last swap operation. - SourceSlotName *string `json:"sourceSlotName,omitempty"` - // DestinationSlotName - READ-ONLY; The destination slot of the last swap operation. - DestinationSlotName *string `json:"destinationSlotName,omitempty"` +// StaticSiteARMResource static Site ARM resource. +type StaticSiteARMResource struct { + autorest.Response `json:"-"` + // StaticSite - Core resource properties + *StaticSite `json:"properties,omitempty"` + Sku *SkuDescription `json:"sku,omitempty"` + Identity *ManagedServiceIdentity `json:"identity,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Location - Resource Location. + Location *string `json:"location,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for SlotSwapStatus. -func (sss SlotSwapStatus) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StaticSiteARMResource. +func (ssar StaticSiteARMResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if ssar.StaticSite != nil { + objectMap["properties"] = ssar.StaticSite + } + if ssar.Sku != nil { + objectMap["sku"] = ssar.Sku + } + if ssar.Identity != nil { + objectMap["identity"] = ssar.Identity + } + if ssar.Kind != nil { + objectMap["kind"] = ssar.Kind + } + if ssar.Location != nil { + objectMap["location"] = ssar.Location + } + if ssar.Tags != nil { + objectMap["tags"] = ssar.Tags + } return json.Marshal(objectMap) } -// SlowRequestsBasedTrigger trigger based on request execution time. -type SlowRequestsBasedTrigger struct { - // TimeTaken - Time taken. - TimeTaken *string `json:"timeTaken,omitempty"` - // Path - Request Path. - Path *string `json:"path,omitempty"` - // Count - Request Count. - Count *int32 `json:"count,omitempty"` - // TimeInterval - Time interval. - TimeInterval *string `json:"timeInterval,omitempty"` +// UnmarshalJSON is the custom unmarshaler for StaticSiteARMResource struct. +func (ssar *StaticSiteARMResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var staticSite StaticSite + err = json.Unmarshal(*v, &staticSite) + if err != nil { + return err + } + ssar.StaticSite = &staticSite + } + case "sku": + if v != nil { + var sku SkuDescription + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + ssar.Sku = &sku + } + case "identity": + if v != nil { + var identity ManagedServiceIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + ssar.Identity = &identity + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ssar.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ssar.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + ssar.Kind = &kind + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ssar.Location = &location + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ssar.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ssar.Tags = tags + } + } + } + + return nil } -// Snapshot a snapshot of an app. -type Snapshot struct { - // SnapshotProperties - Snapshot resource specific properties - *SnapshotProperties `json:"properties,omitempty"` +// StaticSiteBasicAuthPropertiesARMResource static site basic auth properties ARM resource. +type StaticSiteBasicAuthPropertiesARMResource struct { + autorest.Response `json:"-"` + // StaticSiteBasicAuthPropertiesARMResourceProperties - StaticSiteBasicAuthPropertiesARMResource resource specific properties + *StaticSiteBasicAuthPropertiesARMResourceProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -25781,20 +28445,20 @@ type Snapshot struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for Snapshot. -func (s Snapshot) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StaticSiteBasicAuthPropertiesARMResource. +func (ssbapar StaticSiteBasicAuthPropertiesARMResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if s.SnapshotProperties != nil { - objectMap["properties"] = s.SnapshotProperties + if ssbapar.StaticSiteBasicAuthPropertiesARMResourceProperties != nil { + objectMap["properties"] = ssbapar.StaticSiteBasicAuthPropertiesARMResourceProperties } - if s.Kind != nil { - objectMap["kind"] = s.Kind + if ssbapar.Kind != nil { + objectMap["kind"] = ssbapar.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for Snapshot struct. -func (s *Snapshot) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for StaticSiteBasicAuthPropertiesARMResource struct. +func (ssbapar *StaticSiteBasicAuthPropertiesARMResource) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -25804,12 +28468,12 @@ func (s *Snapshot) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var snapshotProperties SnapshotProperties - err = json.Unmarshal(*v, &snapshotProperties) + var staticSiteBasicAuthPropertiesARMResourceProperties StaticSiteBasicAuthPropertiesARMResourceProperties + err = json.Unmarshal(*v, &staticSiteBasicAuthPropertiesARMResourceProperties) if err != nil { return err } - s.SnapshotProperties = &snapshotProperties + ssbapar.StaticSiteBasicAuthPropertiesARMResourceProperties = &staticSiteBasicAuthPropertiesARMResourceProperties } case "id": if v != nil { @@ -25818,7 +28482,7 @@ func (s *Snapshot) UnmarshalJSON(body []byte) error { if err != nil { return err } - s.ID = &ID + ssbapar.ID = &ID } case "name": if v != nil { @@ -25827,7 +28491,7 @@ func (s *Snapshot) UnmarshalJSON(body []byte) error { if err != nil { return err } - s.Name = &name + ssbapar.Name = &name } case "kind": if v != nil { @@ -25836,7 +28500,7 @@ func (s *Snapshot) UnmarshalJSON(body []byte) error { if err != nil { return err } - s.Kind = &kind + ssbapar.Kind = &kind } case "type": if v != nil { @@ -25845,7 +28509,7 @@ func (s *Snapshot) UnmarshalJSON(body []byte) error { if err != nil { return err } - s.Type = &typeVar + ssbapar.Type = &typeVar } } } @@ -25853,35 +28517,69 @@ func (s *Snapshot) UnmarshalJSON(body []byte) error { return nil } -// SnapshotCollection collection of snapshots which can be used to revert an app to a previous time. -type SnapshotCollection struct { +// StaticSiteBasicAuthPropertiesARMResourceProperties staticSiteBasicAuthPropertiesARMResource resource +// specific properties +type StaticSiteBasicAuthPropertiesARMResourceProperties struct { + // Password - The password for basic auth. + Password *string `json:"password,omitempty"` + // SecretURL - Url to the secret in Key Vault. + SecretURL *string `json:"secretUrl,omitempty"` + // ApplicableEnvironmentsMode - State indicating if basic auth is enabled and for what environments it is active. + ApplicableEnvironmentsMode *string `json:"applicableEnvironmentsMode,omitempty"` + // Environments - The list of enabled environments for Basic Auth if ApplicableEnvironmentsMode is set to SpecifiedEnvironments. + Environments *[]string `json:"environments,omitempty"` + // SecretState - READ-ONLY; State indicating if basic auth has a secret and what type it is. + SecretState *string `json:"secretState,omitempty"` +} + +// MarshalJSON is the custom marshaler for StaticSiteBasicAuthPropertiesARMResourceProperties. +func (ssbapar StaticSiteBasicAuthPropertiesARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ssbapar.Password != nil { + objectMap["password"] = ssbapar.Password + } + if ssbapar.SecretURL != nil { + objectMap["secretUrl"] = ssbapar.SecretURL + } + if ssbapar.ApplicableEnvironmentsMode != nil { + objectMap["applicableEnvironmentsMode"] = ssbapar.ApplicableEnvironmentsMode + } + if ssbapar.Environments != nil { + objectMap["environments"] = ssbapar.Environments + } + return json.Marshal(objectMap) +} + +// StaticSiteBasicAuthPropertiesCollection collection of static site basic auth. +type StaticSiteBasicAuthPropertiesCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]Snapshot `json:"value,omitempty"` + Value *[]StaticSiteBasicAuthPropertiesARMResource `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for SnapshotCollection. -func (sc SnapshotCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StaticSiteBasicAuthPropertiesCollection. +func (ssbapc StaticSiteBasicAuthPropertiesCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if sc.Value != nil { - objectMap["value"] = sc.Value + if ssbapc.Value != nil { + objectMap["value"] = ssbapc.Value } return json.Marshal(objectMap) } -// SnapshotCollectionIterator provides access to a complete listing of Snapshot values. -type SnapshotCollectionIterator struct { +// StaticSiteBasicAuthPropertiesCollectionIterator provides access to a complete listing of +// StaticSiteBasicAuthPropertiesARMResource values. +type StaticSiteBasicAuthPropertiesCollectionIterator struct { i int - page SnapshotCollectionPage + page StaticSiteBasicAuthPropertiesCollectionPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *SnapshotCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *StaticSiteBasicAuthPropertiesCollectionIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteBasicAuthPropertiesCollectionIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -25906,67 +28604,68 @@ func (iter *SnapshotCollectionIterator) NextWithContext(ctx context.Context) (er // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *SnapshotCollectionIterator) Next() error { +func (iter *StaticSiteBasicAuthPropertiesCollectionIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SnapshotCollectionIterator) NotDone() bool { +func (iter StaticSiteBasicAuthPropertiesCollectionIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter SnapshotCollectionIterator) Response() SnapshotCollection { +func (iter StaticSiteBasicAuthPropertiesCollectionIterator) Response() StaticSiteBasicAuthPropertiesCollection { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter SnapshotCollectionIterator) Value() Snapshot { +func (iter StaticSiteBasicAuthPropertiesCollectionIterator) Value() StaticSiteBasicAuthPropertiesARMResource { if !iter.page.NotDone() { - return Snapshot{} + return StaticSiteBasicAuthPropertiesARMResource{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the SnapshotCollectionIterator type. -func NewSnapshotCollectionIterator(page SnapshotCollectionPage) SnapshotCollectionIterator { - return SnapshotCollectionIterator{page: page} +// Creates a new instance of the StaticSiteBasicAuthPropertiesCollectionIterator type. +func NewStaticSiteBasicAuthPropertiesCollectionIterator(page StaticSiteBasicAuthPropertiesCollectionPage) StaticSiteBasicAuthPropertiesCollectionIterator { + return StaticSiteBasicAuthPropertiesCollectionIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (sc SnapshotCollection) IsEmpty() bool { - return sc.Value == nil || len(*sc.Value) == 0 +func (ssbapc StaticSiteBasicAuthPropertiesCollection) IsEmpty() bool { + return ssbapc.Value == nil || len(*ssbapc.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (sc SnapshotCollection) hasNextLink() bool { - return sc.NextLink != nil && len(*sc.NextLink) != 0 +func (ssbapc StaticSiteBasicAuthPropertiesCollection) hasNextLink() bool { + return ssbapc.NextLink != nil && len(*ssbapc.NextLink) != 0 } -// snapshotCollectionPreparer prepares a request to retrieve the next set of results. +// staticSiteBasicAuthPropertiesCollectionPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (sc SnapshotCollection) snapshotCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !sc.hasNextLink() { +func (ssbapc StaticSiteBasicAuthPropertiesCollection) staticSiteBasicAuthPropertiesCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !ssbapc.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(sc.NextLink))) + autorest.WithBaseURL(to.String(ssbapc.NextLink))) } -// SnapshotCollectionPage contains a page of Snapshot values. -type SnapshotCollectionPage struct { - fn func(context.Context, SnapshotCollection) (SnapshotCollection, error) - sc SnapshotCollection +// StaticSiteBasicAuthPropertiesCollectionPage contains a page of StaticSiteBasicAuthPropertiesARMResource +// values. +type StaticSiteBasicAuthPropertiesCollectionPage struct { + fn func(context.Context, StaticSiteBasicAuthPropertiesCollection) (StaticSiteBasicAuthPropertiesCollection, error) + ssbapc StaticSiteBasicAuthPropertiesCollection } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *SnapshotCollectionPage) NextWithContext(ctx context.Context) (err error) { +func (page *StaticSiteBasicAuthPropertiesCollectionPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotCollectionPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteBasicAuthPropertiesCollectionPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -25976,11 +28675,11 @@ func (page *SnapshotCollectionPage) NextWithContext(ctx context.Context) (err er }() } for { - next, err := page.fn(ctx, page.sc) + next, err := page.fn(ctx, page.ssbapc) if err != nil { return err } - page.sc = next + page.ssbapc = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -25991,62 +28690,41 @@ func (page *SnapshotCollectionPage) NextWithContext(ctx context.Context) (err er // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *SnapshotCollectionPage) Next() error { +func (page *StaticSiteBasicAuthPropertiesCollectionPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SnapshotCollectionPage) NotDone() bool { - return !page.sc.IsEmpty() +func (page StaticSiteBasicAuthPropertiesCollectionPage) NotDone() bool { + return !page.ssbapc.IsEmpty() } // Response returns the raw server response from the last page request. -func (page SnapshotCollectionPage) Response() SnapshotCollection { - return page.sc +func (page StaticSiteBasicAuthPropertiesCollectionPage) Response() StaticSiteBasicAuthPropertiesCollection { + return page.ssbapc } // Values returns the slice of values for the current page or nil if there are no values. -func (page SnapshotCollectionPage) Values() []Snapshot { - if page.sc.IsEmpty() { +func (page StaticSiteBasicAuthPropertiesCollectionPage) Values() []StaticSiteBasicAuthPropertiesARMResource { + if page.ssbapc.IsEmpty() { return nil } - return *page.sc.Value + return *page.ssbapc.Value } -// Creates a new instance of the SnapshotCollectionPage type. -func NewSnapshotCollectionPage(cur SnapshotCollection, getNextPage func(context.Context, SnapshotCollection) (SnapshotCollection, error)) SnapshotCollectionPage { - return SnapshotCollectionPage{ - fn: getNextPage, - sc: cur, +// Creates a new instance of the StaticSiteBasicAuthPropertiesCollectionPage type. +func NewStaticSiteBasicAuthPropertiesCollectionPage(cur StaticSiteBasicAuthPropertiesCollection, getNextPage func(context.Context, StaticSiteBasicAuthPropertiesCollection) (StaticSiteBasicAuthPropertiesCollection, error)) StaticSiteBasicAuthPropertiesCollectionPage { + return StaticSiteBasicAuthPropertiesCollectionPage{ + fn: getNextPage, + ssbapc: cur, } } -// SnapshotProperties snapshot resource specific properties -type SnapshotProperties struct { - // Time - READ-ONLY; The time the snapshot was taken. - Time *string `json:"time,omitempty"` -} - -// MarshalJSON is the custom marshaler for SnapshotProperties. -func (s SnapshotProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SnapshotRecoverySource specifies the web app that snapshot contents will be retrieved from. -type SnapshotRecoverySource struct { - // Location - Geographical location of the source web app, e.g. SouthEastAsia, SouthCentralUS - Location *string `json:"location,omitempty"` - // ID - ARM resource ID of the source app. - // /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} for production slots and - // /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} for other slots. - ID *string `json:"id,omitempty"` -} - -// SnapshotRestoreRequest details about app recovery operation. -type SnapshotRestoreRequest struct { - // SnapshotRestoreRequestProperties - SnapshotRestoreRequest resource specific properties - *SnapshotRestoreRequestProperties `json:"properties,omitempty"` +// StaticSiteBuildARMResource static Site Build ARM resource. +type StaticSiteBuildARMResource struct { + autorest.Response `json:"-"` + // StaticSiteBuildARMResourceProperties - StaticSiteBuildARMResource resource specific properties + *StaticSiteBuildARMResourceProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -26057,20 +28735,20 @@ type SnapshotRestoreRequest struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for SnapshotRestoreRequest. -func (srr SnapshotRestoreRequest) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StaticSiteBuildARMResource. +func (ssbar StaticSiteBuildARMResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if srr.SnapshotRestoreRequestProperties != nil { - objectMap["properties"] = srr.SnapshotRestoreRequestProperties + if ssbar.StaticSiteBuildARMResourceProperties != nil { + objectMap["properties"] = ssbar.StaticSiteBuildARMResourceProperties } - if srr.Kind != nil { - objectMap["kind"] = srr.Kind + if ssbar.Kind != nil { + objectMap["kind"] = ssbar.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for SnapshotRestoreRequest struct. -func (srr *SnapshotRestoreRequest) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for StaticSiteBuildARMResource struct. +func (ssbar *StaticSiteBuildARMResource) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -26080,12 +28758,12 @@ func (srr *SnapshotRestoreRequest) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var snapshotRestoreRequestProperties SnapshotRestoreRequestProperties - err = json.Unmarshal(*v, &snapshotRestoreRequestProperties) + var staticSiteBuildARMResourceProperties StaticSiteBuildARMResourceProperties + err = json.Unmarshal(*v, &staticSiteBuildARMResourceProperties) if err != nil { return err } - srr.SnapshotRestoreRequestProperties = &snapshotRestoreRequestProperties + ssbar.StaticSiteBuildARMResourceProperties = &staticSiteBuildARMResourceProperties } case "id": if v != nil { @@ -26094,7 +28772,7 @@ func (srr *SnapshotRestoreRequest) UnmarshalJSON(body []byte) error { if err != nil { return err } - srr.ID = &ID + ssbar.ID = &ID } case "name": if v != nil { @@ -26103,7 +28781,7 @@ func (srr *SnapshotRestoreRequest) UnmarshalJSON(body []byte) error { if err != nil { return err } - srr.Name = &name + ssbar.Name = &name } case "kind": if v != nil { @@ -26112,7 +28790,7 @@ func (srr *SnapshotRestoreRequest) UnmarshalJSON(body []byte) error { if err != nil { return err } - srr.Kind = &kind + ssbar.Kind = &kind } case "type": if v != nil { @@ -26121,7 +28799,7 @@ func (srr *SnapshotRestoreRequest) UnmarshalJSON(body []byte) error { if err != nil { return err } - srr.Type = &typeVar + ssbar.Type = &typeVar } } } @@ -26129,158 +28807,254 @@ func (srr *SnapshotRestoreRequest) UnmarshalJSON(body []byte) error { return nil } -// SnapshotRestoreRequestProperties snapshotRestoreRequest resource specific properties -type SnapshotRestoreRequestProperties struct { - // SnapshotTime - Point in time in which the app restore should be done, formatted as a DateTime string. - SnapshotTime *string `json:"snapshotTime,omitempty"` - // RecoverySource - Optional. Specifies the web app that snapshot contents will be retrieved from. - // If empty, the targeted web app will be used as the source. - RecoverySource *SnapshotRecoverySource `json:"recoverySource,omitempty"` - // Overwrite - If true the restore operation can overwrite source app; otherwise, false. - Overwrite *bool `json:"overwrite,omitempty"` - // RecoverConfiguration - If true, site configuration, in addition to content, will be reverted. - RecoverConfiguration *bool `json:"recoverConfiguration,omitempty"` - // IgnoreConflictingHostNames - If true, custom hostname conflicts will be ignored when recovering to a target web app. - // This setting is only necessary when RecoverConfiguration is enabled. - IgnoreConflictingHostNames *bool `json:"ignoreConflictingHostNames,omitempty"` - // UseDRSecondary - If true, the snapshot is retrieved from DRSecondary endpoint. - UseDRSecondary *bool `json:"useDRSecondary,omitempty"` +// StaticSiteBuildARMResourceProperties staticSiteBuildARMResource resource specific properties +type StaticSiteBuildARMResourceProperties struct { + // BuildID - READ-ONLY; An identifier for the static site build. + BuildID *string `json:"buildId,omitempty"` + // SourceBranch - READ-ONLY; The source branch. + SourceBranch *string `json:"sourceBranch,omitempty"` + // PullRequestTitle - READ-ONLY; The title of a pull request that a static site build is related to. + PullRequestTitle *string `json:"pullRequestTitle,omitempty"` + // Hostname - READ-ONLY; The hostname for a static site build. + Hostname *string `json:"hostname,omitempty"` + // CreatedTimeUtc - READ-ONLY; When this build was created. + CreatedTimeUtc *date.Time `json:"createdTimeUtc,omitempty"` + // LastUpdatedOn - READ-ONLY; When this build was updated. + LastUpdatedOn *date.Time `json:"lastUpdatedOn,omitempty"` + // Status - READ-ONLY; The status of the static site build. Possible values include: 'BuildStatusWaitingForDeployment', 'BuildStatusUploading', 'BuildStatusDeploying', 'BuildStatusReady', 'BuildStatusFailed', 'BuildStatusDeleting', 'BuildStatusDetached' + Status BuildStatus `json:"status,omitempty"` + // UserProvidedFunctionApps - READ-ONLY; User provided function apps registered with the static site build + UserProvidedFunctionApps *[]StaticSiteUserProvidedFunctionApp `json:"userProvidedFunctionApps,omitempty"` + // LinkedBackends - READ-ONLY; Backends linked to the static side build + LinkedBackends *[]StaticSiteLinkedBackend `json:"linkedBackends,omitempty"` + // DatabaseConnections - READ-ONLY; Database connections for the static site build + DatabaseConnections *[]DatabaseConnectionOverview `json:"databaseConnections,omitempty"` } -// Solution class Representing Solution for problems detected. -type Solution struct { - // ID - Solution Id. - ID *float64 `json:"id,omitempty"` - // DisplayName - Display Name of the solution - DisplayName *string `json:"displayName,omitempty"` - // Order - Order of the solution. - Order *float64 `json:"order,omitempty"` - // Description - Description of the solution - Description *string `json:"description,omitempty"` - // Type - Type of Solution. Possible values include: 'SolutionTypeQuickSolution', 'SolutionTypeDeepInvestigation', 'SolutionTypeBestPractices' - Type SolutionType `json:"type,omitempty"` - // Data - Solution Data. - Data *[][]NameValuePair `json:"data,omitempty"` - // Metadata - Solution Metadata. - Metadata *[][]NameValuePair `json:"metadata,omitempty"` +// MarshalJSON is the custom marshaler for StaticSiteBuildARMResourceProperties. +func (ssbar StaticSiteBuildARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) } -// SourceControl the source control OAuth token. -type SourceControl struct { +// StaticSiteBuildCollection collection of static site builds. +type StaticSiteBuildCollection struct { autorest.Response `json:"-"` - // SourceControlProperties - SourceControl resource specific properties - *SourceControlProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` + // Value - Collection of resources. + Value *[]StaticSiteBuildARMResource `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for SourceControl. -func (sc SourceControl) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StaticSiteBuildCollection. +func (ssbc StaticSiteBuildCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if sc.SourceControlProperties != nil { - objectMap["properties"] = sc.SourceControlProperties - } - if sc.Kind != nil { - objectMap["kind"] = sc.Kind + if ssbc.Value != nil { + objectMap["value"] = ssbc.Value } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for SourceControl struct. -func (sc *SourceControl) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) +// StaticSiteBuildCollectionIterator provides access to a complete listing of StaticSiteBuildARMResource +// values. +type StaticSiteBuildCollectionIterator struct { + i int + page StaticSiteBuildCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *StaticSiteBuildCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteBuildCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) if err != nil { + iter.i-- return err } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var sourceControlProperties SourceControlProperties - err = json.Unmarshal(*v, &sourceControlProperties) - if err != nil { - return err - } - sc.SourceControlProperties = &sourceControlProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sc.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sc.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - sc.Kind = &kind - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - sc.Type = &typeVar + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *StaticSiteBuildCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter StaticSiteBuildCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter StaticSiteBuildCollectionIterator) Response() StaticSiteBuildCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter StaticSiteBuildCollectionIterator) Value() StaticSiteBuildARMResource { + if !iter.page.NotDone() { + return StaticSiteBuildARMResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the StaticSiteBuildCollectionIterator type. +func NewStaticSiteBuildCollectionIterator(page StaticSiteBuildCollectionPage) StaticSiteBuildCollectionIterator { + return StaticSiteBuildCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ssbc StaticSiteBuildCollection) IsEmpty() bool { + return ssbc.Value == nil || len(*ssbc.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (ssbc StaticSiteBuildCollection) hasNextLink() bool { + return ssbc.NextLink != nil && len(*ssbc.NextLink) != 0 +} + +// staticSiteBuildCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ssbc StaticSiteBuildCollection) staticSiteBuildCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !ssbc.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ssbc.NextLink))) +} + +// StaticSiteBuildCollectionPage contains a page of StaticSiteBuildARMResource values. +type StaticSiteBuildCollectionPage struct { + fn func(context.Context, StaticSiteBuildCollection) (StaticSiteBuildCollection, error) + ssbc StaticSiteBuildCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *StaticSiteBuildCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteBuildCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.ssbc) + if err != nil { + return err + } + page.ssbc = next + if !next.hasNextLink() || !next.IsEmpty() { + break } } - return nil } -// SourceControlCollection collection of source controls. -type SourceControlCollection struct { +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *StaticSiteBuildCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page StaticSiteBuildCollectionPage) NotDone() bool { + return !page.ssbc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page StaticSiteBuildCollectionPage) Response() StaticSiteBuildCollection { + return page.ssbc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page StaticSiteBuildCollectionPage) Values() []StaticSiteBuildARMResource { + if page.ssbc.IsEmpty() { + return nil + } + return *page.ssbc.Value +} + +// Creates a new instance of the StaticSiteBuildCollectionPage type. +func NewStaticSiteBuildCollectionPage(cur StaticSiteBuildCollection, getNextPage func(context.Context, StaticSiteBuildCollection) (StaticSiteBuildCollection, error)) StaticSiteBuildCollectionPage { + return StaticSiteBuildCollectionPage{ + fn: getNextPage, + ssbc: cur, + } +} + +// StaticSiteBuildProperties build properties for the static site. +type StaticSiteBuildProperties struct { + // AppLocation - The path to the app code within the repository. + AppLocation *string `json:"appLocation,omitempty"` + // APILocation - The path to the api code within the repository. + APILocation *string `json:"apiLocation,omitempty"` + // AppArtifactLocation - Deprecated: The path of the app artifacts after building (deprecated in favor of OutputLocation) + AppArtifactLocation *string `json:"appArtifactLocation,omitempty"` + // OutputLocation - The output path of the app after building. + OutputLocation *string `json:"outputLocation,omitempty"` + // AppBuildCommand - A custom command to run during deployment of the static content application. + AppBuildCommand *string `json:"appBuildCommand,omitempty"` + // APIBuildCommand - A custom command to run during deployment of the Azure Functions API application. + APIBuildCommand *string `json:"apiBuildCommand,omitempty"` + // SkipGithubActionWorkflowGeneration - Skip Github Action workflow generation. + SkipGithubActionWorkflowGeneration *bool `json:"skipGithubActionWorkflowGeneration,omitempty"` + // GithubActionSecretNameOverride - Github Action secret name override. + GithubActionSecretNameOverride *string `json:"githubActionSecretNameOverride,omitempty"` +} + +// StaticSiteCollection collection of static sites. +type StaticSiteCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]SourceControl `json:"value,omitempty"` + Value *[]StaticSiteARMResource `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for SourceControlCollection. -func (scc SourceControlCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StaticSiteCollection. +func (ssc StaticSiteCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if scc.Value != nil { - objectMap["value"] = scc.Value + if ssc.Value != nil { + objectMap["value"] = ssc.Value } return json.Marshal(objectMap) } -// SourceControlCollectionIterator provides access to a complete listing of SourceControl values. -type SourceControlCollectionIterator struct { +// StaticSiteCollectionIterator provides access to a complete listing of StaticSiteARMResource values. +type StaticSiteCollectionIterator struct { i int - page SourceControlCollectionPage + page StaticSiteCollectionPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *SourceControlCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *StaticSiteCollectionIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SourceControlCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteCollectionIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -26305,67 +29079,67 @@ func (iter *SourceControlCollectionIterator) NextWithContext(ctx context.Context // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *SourceControlCollectionIterator) Next() error { +func (iter *StaticSiteCollectionIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SourceControlCollectionIterator) NotDone() bool { +func (iter StaticSiteCollectionIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter SourceControlCollectionIterator) Response() SourceControlCollection { +func (iter StaticSiteCollectionIterator) Response() StaticSiteCollection { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter SourceControlCollectionIterator) Value() SourceControl { +func (iter StaticSiteCollectionIterator) Value() StaticSiteARMResource { if !iter.page.NotDone() { - return SourceControl{} + return StaticSiteARMResource{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the SourceControlCollectionIterator type. -func NewSourceControlCollectionIterator(page SourceControlCollectionPage) SourceControlCollectionIterator { - return SourceControlCollectionIterator{page: page} +// Creates a new instance of the StaticSiteCollectionIterator type. +func NewStaticSiteCollectionIterator(page StaticSiteCollectionPage) StaticSiteCollectionIterator { + return StaticSiteCollectionIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (scc SourceControlCollection) IsEmpty() bool { - return scc.Value == nil || len(*scc.Value) == 0 +func (ssc StaticSiteCollection) IsEmpty() bool { + return ssc.Value == nil || len(*ssc.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (scc SourceControlCollection) hasNextLink() bool { - return scc.NextLink != nil && len(*scc.NextLink) != 0 +func (ssc StaticSiteCollection) hasNextLink() bool { + return ssc.NextLink != nil && len(*ssc.NextLink) != 0 } -// sourceControlCollectionPreparer prepares a request to retrieve the next set of results. +// staticSiteCollectionPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (scc SourceControlCollection) sourceControlCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !scc.hasNextLink() { +func (ssc StaticSiteCollection) staticSiteCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !ssc.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(scc.NextLink))) + autorest.WithBaseURL(to.String(ssc.NextLink))) } -// SourceControlCollectionPage contains a page of SourceControl values. -type SourceControlCollectionPage struct { - fn func(context.Context, SourceControlCollection) (SourceControlCollection, error) - scc SourceControlCollection +// StaticSiteCollectionPage contains a page of StaticSiteARMResource values. +type StaticSiteCollectionPage struct { + fn func(context.Context, StaticSiteCollection) (StaticSiteCollection, error) + ssc StaticSiteCollection } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *SourceControlCollectionPage) NextWithContext(ctx context.Context) (err error) { +func (page *StaticSiteCollectionPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SourceControlCollectionPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteCollectionPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -26375,11 +29149,11 @@ func (page *SourceControlCollectionPage) NextWithContext(ctx context.Context) (e }() } for { - next, err := page.fn(ctx, page.scc) + next, err := page.fn(ctx, page.ssc) if err != nil { return err } - page.scc = next + page.ssc = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -26390,185 +29164,174 @@ func (page *SourceControlCollectionPage) NextWithContext(ctx context.Context) (e // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *SourceControlCollectionPage) Next() error { +func (page *StaticSiteCollectionPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SourceControlCollectionPage) NotDone() bool { - return !page.scc.IsEmpty() +func (page StaticSiteCollectionPage) NotDone() bool { + return !page.ssc.IsEmpty() } // Response returns the raw server response from the last page request. -func (page SourceControlCollectionPage) Response() SourceControlCollection { - return page.scc +func (page StaticSiteCollectionPage) Response() StaticSiteCollection { + return page.ssc } // Values returns the slice of values for the current page or nil if there are no values. -func (page SourceControlCollectionPage) Values() []SourceControl { - if page.scc.IsEmpty() { +func (page StaticSiteCollectionPage) Values() []StaticSiteARMResource { + if page.ssc.IsEmpty() { return nil } - return *page.scc.Value + return *page.ssc.Value } -// Creates a new instance of the SourceControlCollectionPage type. -func NewSourceControlCollectionPage(cur SourceControlCollection, getNextPage func(context.Context, SourceControlCollection) (SourceControlCollection, error)) SourceControlCollectionPage { - return SourceControlCollectionPage{ +// Creates a new instance of the StaticSiteCollectionPage type. +func NewStaticSiteCollectionPage(cur StaticSiteCollection, getNextPage func(context.Context, StaticSiteCollection) (StaticSiteCollection, error)) StaticSiteCollectionPage { + return StaticSiteCollectionPage{ fn: getNextPage, - scc: cur, + ssc: cur, } } -// SourceControlProperties sourceControl resource specific properties -type SourceControlProperties struct { - // Token - OAuth access token. - Token *string `json:"token,omitempty"` - // TokenSecret - OAuth access token secret. - TokenSecret *string `json:"tokenSecret,omitempty"` - // RefreshToken - OAuth refresh token. - RefreshToken *string `json:"refreshToken,omitempty"` - // ExpirationTime - OAuth token expiration. - ExpirationTime *date.Time `json:"expirationTime,omitempty"` -} - -// StackMajorVersion application stack major version. -type StackMajorVersion struct { - // DisplayVersion - Application stack major version (display only). - DisplayVersion *string `json:"displayVersion,omitempty"` - // RuntimeVersion - Application stack major version (runtime only). - RuntimeVersion *string `json:"runtimeVersion,omitempty"` - // IsDefault - true if this is the default major version; otherwise, false. - IsDefault *bool `json:"isDefault,omitempty"` - // MinorVersions - Minor versions associated with the major version. - MinorVersions *[]StackMinorVersion `json:"minorVersions,omitempty"` - // ApplicationInsights - true if this supports Application Insights; otherwise, false. - ApplicationInsights *bool `json:"applicationInsights,omitempty"` - // IsPreview - true if this stack is in Preview, otherwise false. - IsPreview *bool `json:"isPreview,omitempty"` - // IsDeprecated - true if this stack has been deprecated, otherwise false. - IsDeprecated *bool `json:"isDeprecated,omitempty"` - // IsHidden - true if this stack should be hidden for new customers on portal, otherwise false. - IsHidden *bool `json:"isHidden,omitempty"` - // AppSettingsDictionary - - // - // - // Example: All the function apps need AppSetting: "FUNCTIONS_WORKER_RUNTIME" to be set stack name - AppSettingsDictionary map[string]interface{} `json:"appSettingsDictionary"` - // SiteConfigPropertiesDictionary - - // - // - // Example: All Linux Function Apps, need Use32BitWorkerProcess to be set to 0 - SiteConfigPropertiesDictionary map[string]interface{} `json:"siteConfigPropertiesDictionary"` +// StaticSiteCustomDomainOverviewARMResource static Site Custom Domain Overview ARM resource. +type StaticSiteCustomDomainOverviewARMResource struct { + autorest.Response `json:"-"` + // StaticSiteCustomDomainOverviewARMResourceProperties - StaticSiteCustomDomainOverviewARMResource resource specific properties + *StaticSiteCustomDomainOverviewARMResourceProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for StackMajorVersion. -func (smv StackMajorVersion) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StaticSiteCustomDomainOverviewARMResource. +func (sscdoar StaticSiteCustomDomainOverviewARMResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if smv.DisplayVersion != nil { - objectMap["displayVersion"] = smv.DisplayVersion - } - if smv.RuntimeVersion != nil { - objectMap["runtimeVersion"] = smv.RuntimeVersion - } - if smv.IsDefault != nil { - objectMap["isDefault"] = smv.IsDefault - } - if smv.MinorVersions != nil { - objectMap["minorVersions"] = smv.MinorVersions - } - if smv.ApplicationInsights != nil { - objectMap["applicationInsights"] = smv.ApplicationInsights - } - if smv.IsPreview != nil { - objectMap["isPreview"] = smv.IsPreview - } - if smv.IsDeprecated != nil { - objectMap["isDeprecated"] = smv.IsDeprecated + if sscdoar.StaticSiteCustomDomainOverviewARMResourceProperties != nil { + objectMap["properties"] = sscdoar.StaticSiteCustomDomainOverviewARMResourceProperties } - if smv.IsHidden != nil { - objectMap["isHidden"] = smv.IsHidden + if sscdoar.Kind != nil { + objectMap["kind"] = sscdoar.Kind } - if smv.AppSettingsDictionary != nil { - objectMap["appSettingsDictionary"] = smv.AppSettingsDictionary + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for StaticSiteCustomDomainOverviewARMResource struct. +func (sscdoar *StaticSiteCustomDomainOverviewARMResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err } - if smv.SiteConfigPropertiesDictionary != nil { - objectMap["siteConfigPropertiesDictionary"] = smv.SiteConfigPropertiesDictionary + for k, v := range m { + switch k { + case "properties": + if v != nil { + var staticSiteCustomDomainOverviewARMResourceProperties StaticSiteCustomDomainOverviewARMResourceProperties + err = json.Unmarshal(*v, &staticSiteCustomDomainOverviewARMResourceProperties) + if err != nil { + return err + } + sscdoar.StaticSiteCustomDomainOverviewARMResourceProperties = &staticSiteCustomDomainOverviewARMResourceProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sscdoar.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sscdoar.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + sscdoar.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sscdoar.Type = &typeVar + } + } } - return json.Marshal(objectMap) + + return nil } -// StackMinorVersion application stack minor version. -type StackMinorVersion struct { - // DisplayVersion - Application stack minor version (display only). - DisplayVersion *string `json:"displayVersion,omitempty"` - // RuntimeVersion - Application stack minor version (runtime only). - RuntimeVersion *string `json:"runtimeVersion,omitempty"` - // IsDefault - true if this is the default minor version; otherwise, false. - IsDefault *bool `json:"isDefault,omitempty"` - // IsRemoteDebuggingEnabled - true if this supports Remote Debugging, otherwise false. - IsRemoteDebuggingEnabled *bool `json:"isRemoteDebuggingEnabled,omitempty"` +// StaticSiteCustomDomainOverviewARMResourceProperties staticSiteCustomDomainOverviewARMResource resource +// specific properties +type StaticSiteCustomDomainOverviewARMResourceProperties struct { + // DomainName - READ-ONLY; The domain name for the static site custom domain. + DomainName *string `json:"domainName,omitempty"` + // CreatedOn - READ-ONLY; The date and time on which the custom domain was created for the static site. + CreatedOn *date.Time `json:"createdOn,omitempty"` + // Status - READ-ONLY; The status of the custom domain. Possible values include: 'CustomDomainStatusRetrievingValidationToken', 'CustomDomainStatusValidating', 'CustomDomainStatusAdding', 'CustomDomainStatusReady', 'CustomDomainStatusFailed', 'CustomDomainStatusDeleting', 'CustomDomainStatusUnhealthy' + Status CustomDomainStatus `json:"status,omitempty"` + // ValidationToken - READ-ONLY; The TXT record validation token + ValidationToken *string `json:"validationToken,omitempty"` + // ErrorMessage - READ-ONLY + ErrorMessage *string `json:"errorMessage,omitempty"` } -// StampCapacity stamp capacity information. -type StampCapacity struct { - // Name - Name of the stamp. - Name *string `json:"name,omitempty"` - // AvailableCapacity - Available capacity (# of machines, bytes of storage etc...). - AvailableCapacity *int64 `json:"availableCapacity,omitempty"` - // TotalCapacity - Total capacity (# of machines, bytes of storage etc...). - TotalCapacity *int64 `json:"totalCapacity,omitempty"` - // Unit - Name of the unit. - Unit *string `json:"unit,omitempty"` - // ComputeMode - Shared/dedicated workers. Possible values include: 'ComputeModeOptionsShared', 'ComputeModeOptionsDedicated', 'ComputeModeOptionsDynamic' - ComputeMode ComputeModeOptions `json:"computeMode,omitempty"` - // WorkerSize - Size of the machines. Possible values include: 'WorkerSizeOptionsSmall', 'WorkerSizeOptionsMedium', 'WorkerSizeOptionsLarge', 'WorkerSizeOptionsD1', 'WorkerSizeOptionsD2', 'WorkerSizeOptionsD3', 'WorkerSizeOptionsSmallV3', 'WorkerSizeOptionsMediumV3', 'WorkerSizeOptionsLargeV3', 'WorkerSizeOptionsNestedSmall', 'WorkerSizeOptionsNestedSmallLinux', 'WorkerSizeOptionsDefault' - WorkerSize WorkerSizeOptions `json:"workerSize,omitempty"` - // WorkerSizeID - Size ID of machines: - // 0 - Small - // 1 - Medium - // 2 - Large - WorkerSizeID *int32 `json:"workerSizeId,omitempty"` - // ExcludeFromCapacityAllocation - If true, it includes basic apps. - // Basic apps are not used for capacity allocation. - ExcludeFromCapacityAllocation *bool `json:"excludeFromCapacityAllocation,omitempty"` - // IsApplicableForAllComputeModes - true if capacity is applicable for all apps; otherwise, false. - IsApplicableForAllComputeModes *bool `json:"isApplicableForAllComputeModes,omitempty"` - // SiteMode - Shared or Dedicated. - SiteMode *string `json:"siteMode,omitempty"` - // IsLinux - Is this a linux stamp capacity - IsLinux *bool `json:"isLinux,omitempty"` +// MarshalJSON is the custom marshaler for StaticSiteCustomDomainOverviewARMResourceProperties. +func (sscdoar StaticSiteCustomDomainOverviewARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) } -// StampCapacityCollection collection of stamp capacities. -type StampCapacityCollection struct { +// StaticSiteCustomDomainOverviewCollection collection of static site custom domains. +type StaticSiteCustomDomainOverviewCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]StampCapacity `json:"value,omitempty"` + Value *[]StaticSiteCustomDomainOverviewARMResource `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for StampCapacityCollection. -func (scc StampCapacityCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StaticSiteCustomDomainOverviewCollection. +func (sscdoc StaticSiteCustomDomainOverviewCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if scc.Value != nil { - objectMap["value"] = scc.Value + if sscdoc.Value != nil { + objectMap["value"] = sscdoc.Value } return json.Marshal(objectMap) } -// StampCapacityCollectionIterator provides access to a complete listing of StampCapacity values. -type StampCapacityCollectionIterator struct { +// StaticSiteCustomDomainOverviewCollectionIterator provides access to a complete listing of +// StaticSiteCustomDomainOverviewARMResource values. +type StaticSiteCustomDomainOverviewCollectionIterator struct { i int - page StampCapacityCollectionPage + page StaticSiteCustomDomainOverviewCollectionPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *StampCapacityCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *StaticSiteCustomDomainOverviewCollectionIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StampCapacityCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteCustomDomainOverviewCollectionIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -26593,67 +29356,68 @@ func (iter *StampCapacityCollectionIterator) NextWithContext(ctx context.Context // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *StampCapacityCollectionIterator) Next() error { +func (iter *StaticSiteCustomDomainOverviewCollectionIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter StampCapacityCollectionIterator) NotDone() bool { +func (iter StaticSiteCustomDomainOverviewCollectionIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter StampCapacityCollectionIterator) Response() StampCapacityCollection { +func (iter StaticSiteCustomDomainOverviewCollectionIterator) Response() StaticSiteCustomDomainOverviewCollection { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter StampCapacityCollectionIterator) Value() StampCapacity { +func (iter StaticSiteCustomDomainOverviewCollectionIterator) Value() StaticSiteCustomDomainOverviewARMResource { if !iter.page.NotDone() { - return StampCapacity{} + return StaticSiteCustomDomainOverviewARMResource{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the StampCapacityCollectionIterator type. -func NewStampCapacityCollectionIterator(page StampCapacityCollectionPage) StampCapacityCollectionIterator { - return StampCapacityCollectionIterator{page: page} +// Creates a new instance of the StaticSiteCustomDomainOverviewCollectionIterator type. +func NewStaticSiteCustomDomainOverviewCollectionIterator(page StaticSiteCustomDomainOverviewCollectionPage) StaticSiteCustomDomainOverviewCollectionIterator { + return StaticSiteCustomDomainOverviewCollectionIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (scc StampCapacityCollection) IsEmpty() bool { - return scc.Value == nil || len(*scc.Value) == 0 +func (sscdoc StaticSiteCustomDomainOverviewCollection) IsEmpty() bool { + return sscdoc.Value == nil || len(*sscdoc.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (scc StampCapacityCollection) hasNextLink() bool { - return scc.NextLink != nil && len(*scc.NextLink) != 0 +func (sscdoc StaticSiteCustomDomainOverviewCollection) hasNextLink() bool { + return sscdoc.NextLink != nil && len(*sscdoc.NextLink) != 0 } -// stampCapacityCollectionPreparer prepares a request to retrieve the next set of results. +// staticSiteCustomDomainOverviewCollectionPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (scc StampCapacityCollection) stampCapacityCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !scc.hasNextLink() { +func (sscdoc StaticSiteCustomDomainOverviewCollection) staticSiteCustomDomainOverviewCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !sscdoc.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(scc.NextLink))) + autorest.WithBaseURL(to.String(sscdoc.NextLink))) } -// StampCapacityCollectionPage contains a page of StampCapacity values. -type StampCapacityCollectionPage struct { - fn func(context.Context, StampCapacityCollection) (StampCapacityCollection, error) - scc StampCapacityCollection +// StaticSiteCustomDomainOverviewCollectionPage contains a page of +// StaticSiteCustomDomainOverviewARMResource values. +type StaticSiteCustomDomainOverviewCollectionPage struct { + fn func(context.Context, StaticSiteCustomDomainOverviewCollection) (StaticSiteCustomDomainOverviewCollection, error) + sscdoc StaticSiteCustomDomainOverviewCollection } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *StampCapacityCollectionPage) NextWithContext(ctx context.Context) (err error) { +func (page *StaticSiteCustomDomainOverviewCollectionPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StampCapacityCollectionPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteCustomDomainOverviewCollectionPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -26663,11 +29427,11 @@ func (page *StampCapacityCollectionPage) NextWithContext(ctx context.Context) (e }() } for { - next, err := page.fn(ctx, page.scc) + next, err := page.fn(ctx, page.sscdoc) if err != nil { return err } - page.scc = next + page.sscdoc = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -26678,150 +29442,65 @@ func (page *StampCapacityCollectionPage) NextWithContext(ctx context.Context) (e // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *StampCapacityCollectionPage) Next() error { +func (page *StaticSiteCustomDomainOverviewCollectionPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page StampCapacityCollectionPage) NotDone() bool { - return !page.scc.IsEmpty() +func (page StaticSiteCustomDomainOverviewCollectionPage) NotDone() bool { + return !page.sscdoc.IsEmpty() } // Response returns the raw server response from the last page request. -func (page StampCapacityCollectionPage) Response() StampCapacityCollection { - return page.scc +func (page StaticSiteCustomDomainOverviewCollectionPage) Response() StaticSiteCustomDomainOverviewCollection { + return page.sscdoc } // Values returns the slice of values for the current page or nil if there are no values. -func (page StampCapacityCollectionPage) Values() []StampCapacity { - if page.scc.IsEmpty() { +func (page StaticSiteCustomDomainOverviewCollectionPage) Values() []StaticSiteCustomDomainOverviewARMResource { + if page.sscdoc.IsEmpty() { return nil } - return *page.scc.Value -} - -// Creates a new instance of the StampCapacityCollectionPage type. -func NewStampCapacityCollectionPage(cur StampCapacityCollection, getNextPage func(context.Context, StampCapacityCollection) (StampCapacityCollection, error)) StampCapacityCollectionPage { - return StampCapacityCollectionPage{ - fn: getNextPage, - scc: cur, - } -} - -// StaticSite a static site. -type StaticSite struct { - // DefaultHostname - READ-ONLY; The default autogenerated hostname for the static site. - DefaultHostname *string `json:"defaultHostname,omitempty"` - // RepositoryURL - URL for the repository of the static site. - RepositoryURL *string `json:"repositoryUrl,omitempty"` - // Branch - The target branch in the repository. - Branch *string `json:"branch,omitempty"` - // CustomDomains - READ-ONLY; The custom domains associated with this static site. - CustomDomains *[]string `json:"customDomains,omitempty"` - // RepositoryToken - A user's github repository token. This is used to setup the Github Actions workflow file and API secrets. - RepositoryToken *string `json:"repositoryToken,omitempty"` - // BuildProperties - Build properties to configure on the repository. - BuildProperties *StaticSiteBuildProperties `json:"buildProperties,omitempty"` - // PrivateEndpointConnections - READ-ONLY; Private endpoint connections - PrivateEndpointConnections *[]ResponseMessageEnvelopeRemotePrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - // StagingEnvironmentPolicy - State indicating whether staging environments are allowed or not allowed for a static web app. Possible values include: 'StagingEnvironmentPolicyEnabled', 'StagingEnvironmentPolicyDisabled' - StagingEnvironmentPolicy StagingEnvironmentPolicy `json:"stagingEnvironmentPolicy,omitempty"` - // AllowConfigFileUpdates - false if config file is locked for this static web app; otherwise, true. - AllowConfigFileUpdates *bool `json:"allowConfigFileUpdates,omitempty"` - // TemplateProperties - Template options for generating a new repository. - TemplateProperties *StaticSiteTemplateOptions `json:"templateProperties,omitempty"` - // ContentDistributionEndpoint - READ-ONLY; The content distribution endpoint for the static site. - ContentDistributionEndpoint *string `json:"contentDistributionEndpoint,omitempty"` - // KeyVaultReferenceIdentity - READ-ONLY; Identity to use for Key Vault Reference authentication. - KeyVaultReferenceIdentity *string `json:"keyVaultReferenceIdentity,omitempty"` - // UserProvidedFunctionApps - READ-ONLY; User provided function apps registered with the static site - UserProvidedFunctionApps *[]StaticSiteUserProvidedFunctionApp `json:"userProvidedFunctionApps,omitempty"` - // Provider - The provider that submitted the last deployment to the primary environment of the static site. - Provider *string `json:"provider,omitempty"` - // EnterpriseGradeCdnStatus - State indicating the status of the enterprise grade CDN serving traffic to the static web app. Possible values include: 'EnterpriseGradeCdnStatusEnabled', 'EnterpriseGradeCdnStatusEnabling', 'EnterpriseGradeCdnStatusDisabled', 'EnterpriseGradeCdnStatusDisabling' - EnterpriseGradeCdnStatus EnterpriseGradeCdnStatus `json:"enterpriseGradeCdnStatus,omitempty"` + return *page.sscdoc.Value } -// MarshalJSON is the custom marshaler for StaticSite. -func (ss StaticSite) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ss.RepositoryURL != nil { - objectMap["repositoryUrl"] = ss.RepositoryURL - } - if ss.Branch != nil { - objectMap["branch"] = ss.Branch - } - if ss.RepositoryToken != nil { - objectMap["repositoryToken"] = ss.RepositoryToken - } - if ss.BuildProperties != nil { - objectMap["buildProperties"] = ss.BuildProperties - } - if ss.StagingEnvironmentPolicy != "" { - objectMap["stagingEnvironmentPolicy"] = ss.StagingEnvironmentPolicy - } - if ss.AllowConfigFileUpdates != nil { - objectMap["allowConfigFileUpdates"] = ss.AllowConfigFileUpdates - } - if ss.TemplateProperties != nil { - objectMap["templateProperties"] = ss.TemplateProperties - } - if ss.Provider != nil { - objectMap["provider"] = ss.Provider - } - if ss.EnterpriseGradeCdnStatus != "" { - objectMap["enterpriseGradeCdnStatus"] = ss.EnterpriseGradeCdnStatus +// Creates a new instance of the StaticSiteCustomDomainOverviewCollectionPage type. +func NewStaticSiteCustomDomainOverviewCollectionPage(cur StaticSiteCustomDomainOverviewCollection, getNextPage func(context.Context, StaticSiteCustomDomainOverviewCollection) (StaticSiteCustomDomainOverviewCollection, error)) StaticSiteCustomDomainOverviewCollectionPage { + return StaticSiteCustomDomainOverviewCollectionPage{ + fn: getNextPage, + sscdoc: cur, } - return json.Marshal(objectMap) } -// StaticSiteARMResource static Site ARM resource. -type StaticSiteARMResource struct { - autorest.Response `json:"-"` - // StaticSite - Core resource properties - *StaticSite `json:"properties,omitempty"` - Sku *SkuDescription `json:"sku,omitempty"` - Identity *ManagedServiceIdentity `json:"identity,omitempty"` +// StaticSiteCustomDomainRequestPropertiesARMResource static Site Custom Domain Request Properties ARM +// resource. +type StaticSiteCustomDomainRequestPropertiesARMResource struct { + // StaticSiteCustomDomainRequestPropertiesARMResourceProperties - StaticSiteCustomDomainRequestPropertiesARMResource resource specific properties + *StaticSiteCustomDomainRequestPropertiesARMResourceProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. Name *string `json:"name,omitempty"` // Kind - Kind of resource. Kind *string `json:"kind,omitempty"` - // Location - Resource Location. - Location *string `json:"location,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for StaticSiteARMResource. -func (ssar StaticSiteARMResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StaticSiteCustomDomainRequestPropertiesARMResource. +func (sscdrpar StaticSiteCustomDomainRequestPropertiesARMResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ssar.StaticSite != nil { - objectMap["properties"] = ssar.StaticSite - } - if ssar.Sku != nil { - objectMap["sku"] = ssar.Sku - } - if ssar.Identity != nil { - objectMap["identity"] = ssar.Identity - } - if ssar.Kind != nil { - objectMap["kind"] = ssar.Kind - } - if ssar.Location != nil { - objectMap["location"] = ssar.Location + if sscdrpar.StaticSiteCustomDomainRequestPropertiesARMResourceProperties != nil { + objectMap["properties"] = sscdrpar.StaticSiteCustomDomainRequestPropertiesARMResourceProperties } - if ssar.Tags != nil { - objectMap["tags"] = ssar.Tags + if sscdrpar.Kind != nil { + objectMap["kind"] = sscdrpar.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for StaticSiteARMResource struct. -func (ssar *StaticSiteARMResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for StaticSiteCustomDomainRequestPropertiesARMResource struct. +func (sscdrpar *StaticSiteCustomDomainRequestPropertiesARMResource) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -26831,30 +29510,12 @@ func (ssar *StaticSiteARMResource) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var staticSite StaticSite - err = json.Unmarshal(*v, &staticSite) - if err != nil { - return err - } - ssar.StaticSite = &staticSite - } - case "sku": - if v != nil { - var sku SkuDescription - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - ssar.Sku = &sku - } - case "identity": - if v != nil { - var identity ManagedServiceIdentity - err = json.Unmarshal(*v, &identity) + var staticSiteCustomDomainRequestPropertiesARMResourceProperties StaticSiteCustomDomainRequestPropertiesARMResourceProperties + err = json.Unmarshal(*v, &staticSiteCustomDomainRequestPropertiesARMResourceProperties) if err != nil { return err } - ssar.Identity = &identity + sscdrpar.StaticSiteCustomDomainRequestPropertiesARMResourceProperties = &staticSiteCustomDomainRequestPropertiesARMResourceProperties } case "id": if v != nil { @@ -26863,7 +29524,7 @@ func (ssar *StaticSiteARMResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ssar.ID = &ID + sscdrpar.ID = &ID } case "name": if v != nil { @@ -26872,7 +29533,7 @@ func (ssar *StaticSiteARMResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ssar.Name = &name + sscdrpar.Name = &name } case "kind": if v != nil { @@ -26881,16 +29542,7 @@ func (ssar *StaticSiteARMResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ssar.Kind = &kind - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - ssar.Location = &location + sscdrpar.Kind = &kind } case "type": if v != nil { @@ -26899,16 +29551,7 @@ func (ssar *StaticSiteARMResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ssar.Type = &typeVar - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - ssar.Tags = tags + sscdrpar.Type = &typeVar } } } @@ -26916,11 +29559,33 @@ func (ssar *StaticSiteARMResource) UnmarshalJSON(body []byte) error { return nil } -// StaticSiteBuildARMResource static Site Build ARM resource. -type StaticSiteBuildARMResource struct { - autorest.Response `json:"-"` - // StaticSiteBuildARMResourceProperties - StaticSiteBuildARMResource resource specific properties - *StaticSiteBuildARMResourceProperties `json:"properties,omitempty"` +// StaticSiteCustomDomainRequestPropertiesARMResourceProperties +// staticSiteCustomDomainRequestPropertiesARMResource resource specific properties +type StaticSiteCustomDomainRequestPropertiesARMResourceProperties struct { + // ValidationMethod - Validation method for adding a custom domain + ValidationMethod *string `json:"validationMethod,omitempty"` +} + +// StaticSiteDatabaseConnectionConfigurationFileOverview a database connection configuration file +type StaticSiteDatabaseConnectionConfigurationFileOverview struct { + // FileName - READ-ONLY; The name of the configuration file. + FileName *string `json:"fileName,omitempty"` + // Contents - READ-ONLY; The Base64 encoding of the file contents. + Contents *string `json:"contents,omitempty"` + // Type - READ-ONLY; The type of configuration file. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for StaticSiteDatabaseConnectionConfigurationFileOverview. +func (ssdccfo StaticSiteDatabaseConnectionConfigurationFileOverview) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// StaticSiteFunctionOverviewARMResource static Site Function Overview ARM resource. +type StaticSiteFunctionOverviewARMResource struct { + // StaticSiteFunctionOverviewARMResourceProperties - StaticSiteFunctionOverviewARMResource resource specific properties + *StaticSiteFunctionOverviewARMResourceProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -26931,20 +29596,20 @@ type StaticSiteBuildARMResource struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for StaticSiteBuildARMResource. -func (ssbar StaticSiteBuildARMResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StaticSiteFunctionOverviewARMResource. +func (ssfoar StaticSiteFunctionOverviewARMResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ssbar.StaticSiteBuildARMResourceProperties != nil { - objectMap["properties"] = ssbar.StaticSiteBuildARMResourceProperties + if ssfoar.StaticSiteFunctionOverviewARMResourceProperties != nil { + objectMap["properties"] = ssfoar.StaticSiteFunctionOverviewARMResourceProperties } - if ssbar.Kind != nil { - objectMap["kind"] = ssbar.Kind + if ssfoar.Kind != nil { + objectMap["kind"] = ssfoar.Kind } return json.Marshal(objectMap) } - -// UnmarshalJSON is the custom unmarshaler for StaticSiteBuildARMResource struct. -func (ssbar *StaticSiteBuildARMResource) UnmarshalJSON(body []byte) error { + +// UnmarshalJSON is the custom unmarshaler for StaticSiteFunctionOverviewARMResource struct. +func (ssfoar *StaticSiteFunctionOverviewARMResource) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -26954,12 +29619,12 @@ func (ssbar *StaticSiteBuildARMResource) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var staticSiteBuildARMResourceProperties StaticSiteBuildARMResourceProperties - err = json.Unmarshal(*v, &staticSiteBuildARMResourceProperties) + var staticSiteFunctionOverviewARMResourceProperties StaticSiteFunctionOverviewARMResourceProperties + err = json.Unmarshal(*v, &staticSiteFunctionOverviewARMResourceProperties) if err != nil { return err } - ssbar.StaticSiteBuildARMResourceProperties = &staticSiteBuildARMResourceProperties + ssfoar.StaticSiteFunctionOverviewARMResourceProperties = &staticSiteFunctionOverviewARMResourceProperties } case "id": if v != nil { @@ -26968,7 +29633,7 @@ func (ssbar *StaticSiteBuildARMResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ssbar.ID = &ID + ssfoar.ID = &ID } case "name": if v != nil { @@ -26977,7 +29642,7 @@ func (ssbar *StaticSiteBuildARMResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ssbar.Name = &name + ssfoar.Name = &name } case "kind": if v != nil { @@ -26986,7 +29651,7 @@ func (ssbar *StaticSiteBuildARMResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ssbar.Kind = &kind + ssfoar.Kind = &kind } case "type": if v != nil { @@ -26995,7 +29660,7 @@ func (ssbar *StaticSiteBuildARMResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ssbar.Type = &typeVar + ssfoar.Type = &typeVar } } } @@ -27003,62 +29668,51 @@ func (ssbar *StaticSiteBuildARMResource) UnmarshalJSON(body []byte) error { return nil } -// StaticSiteBuildARMResourceProperties staticSiteBuildARMResource resource specific properties -type StaticSiteBuildARMResourceProperties struct { - // BuildID - READ-ONLY; An identifier for the static site build. - BuildID *string `json:"buildId,omitempty"` - // SourceBranch - READ-ONLY; The source branch. - SourceBranch *string `json:"sourceBranch,omitempty"` - // PullRequestTitle - READ-ONLY; The title of a pull request that a static site build is related to. - PullRequestTitle *string `json:"pullRequestTitle,omitempty"` - // Hostname - READ-ONLY; The hostname for a static site build. - Hostname *string `json:"hostname,omitempty"` - // CreatedTimeUtc - READ-ONLY; When this build was created. - CreatedTimeUtc *date.Time `json:"createdTimeUtc,omitempty"` - // LastUpdatedOn - READ-ONLY; When this build was updated. - LastUpdatedOn *date.Time `json:"lastUpdatedOn,omitempty"` - // Status - READ-ONLY; The status of the static site build. Possible values include: 'BuildStatusWaitingForDeployment', 'BuildStatusUploading', 'BuildStatusDeploying', 'BuildStatusReady', 'BuildStatusFailed', 'BuildStatusDeleting', 'BuildStatusDetached' - Status BuildStatus `json:"status,omitempty"` - // UserProvidedFunctionApps - READ-ONLY; User provided function apps registered with the static site build - UserProvidedFunctionApps *[]StaticSiteUserProvidedFunctionApp `json:"userProvidedFunctionApps,omitempty"` +// StaticSiteFunctionOverviewARMResourceProperties staticSiteFunctionOverviewARMResource resource specific +// properties +type StaticSiteFunctionOverviewARMResourceProperties struct { + // FunctionName - READ-ONLY; The name for the function + FunctionName *string `json:"functionName,omitempty"` + // TriggerType - READ-ONLY; The trigger type of the function. Possible values include: 'TriggerTypesHTTPTrigger', 'TriggerTypesUnknown' + TriggerType TriggerTypes `json:"triggerType,omitempty"` } -// MarshalJSON is the custom marshaler for StaticSiteBuildARMResourceProperties. -func (ssbar StaticSiteBuildARMResourceProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StaticSiteFunctionOverviewARMResourceProperties. +func (ssfoar StaticSiteFunctionOverviewARMResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) return json.Marshal(objectMap) } -// StaticSiteBuildCollection collection of static site builds. -type StaticSiteBuildCollection struct { +// StaticSiteFunctionOverviewCollection collection of static site functions. +type StaticSiteFunctionOverviewCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]StaticSiteBuildARMResource `json:"value,omitempty"` + Value *[]StaticSiteFunctionOverviewARMResource `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for StaticSiteBuildCollection. -func (ssbc StaticSiteBuildCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StaticSiteFunctionOverviewCollection. +func (ssfoc StaticSiteFunctionOverviewCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ssbc.Value != nil { - objectMap["value"] = ssbc.Value + if ssfoc.Value != nil { + objectMap["value"] = ssfoc.Value } return json.Marshal(objectMap) } -// StaticSiteBuildCollectionIterator provides access to a complete listing of StaticSiteBuildARMResource -// values. -type StaticSiteBuildCollectionIterator struct { +// StaticSiteFunctionOverviewCollectionIterator provides access to a complete listing of +// StaticSiteFunctionOverviewARMResource values. +type StaticSiteFunctionOverviewCollectionIterator struct { i int - page StaticSiteBuildCollectionPage + page StaticSiteFunctionOverviewCollectionPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *StaticSiteBuildCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *StaticSiteFunctionOverviewCollectionIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteBuildCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteFunctionOverviewCollectionIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -27083,67 +29737,68 @@ func (iter *StaticSiteBuildCollectionIterator) NextWithContext(ctx context.Conte // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *StaticSiteBuildCollectionIterator) Next() error { +func (iter *StaticSiteFunctionOverviewCollectionIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter StaticSiteBuildCollectionIterator) NotDone() bool { +func (iter StaticSiteFunctionOverviewCollectionIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter StaticSiteBuildCollectionIterator) Response() StaticSiteBuildCollection { +func (iter StaticSiteFunctionOverviewCollectionIterator) Response() StaticSiteFunctionOverviewCollection { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter StaticSiteBuildCollectionIterator) Value() StaticSiteBuildARMResource { +func (iter StaticSiteFunctionOverviewCollectionIterator) Value() StaticSiteFunctionOverviewARMResource { if !iter.page.NotDone() { - return StaticSiteBuildARMResource{} + return StaticSiteFunctionOverviewARMResource{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the StaticSiteBuildCollectionIterator type. -func NewStaticSiteBuildCollectionIterator(page StaticSiteBuildCollectionPage) StaticSiteBuildCollectionIterator { - return StaticSiteBuildCollectionIterator{page: page} +// Creates a new instance of the StaticSiteFunctionOverviewCollectionIterator type. +func NewStaticSiteFunctionOverviewCollectionIterator(page StaticSiteFunctionOverviewCollectionPage) StaticSiteFunctionOverviewCollectionIterator { + return StaticSiteFunctionOverviewCollectionIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (ssbc StaticSiteBuildCollection) IsEmpty() bool { - return ssbc.Value == nil || len(*ssbc.Value) == 0 +func (ssfoc StaticSiteFunctionOverviewCollection) IsEmpty() bool { + return ssfoc.Value == nil || len(*ssfoc.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (ssbc StaticSiteBuildCollection) hasNextLink() bool { - return ssbc.NextLink != nil && len(*ssbc.NextLink) != 0 +func (ssfoc StaticSiteFunctionOverviewCollection) hasNextLink() bool { + return ssfoc.NextLink != nil && len(*ssfoc.NextLink) != 0 } -// staticSiteBuildCollectionPreparer prepares a request to retrieve the next set of results. +// staticSiteFunctionOverviewCollectionPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (ssbc StaticSiteBuildCollection) staticSiteBuildCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !ssbc.hasNextLink() { +func (ssfoc StaticSiteFunctionOverviewCollection) staticSiteFunctionOverviewCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !ssfoc.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(ssbc.NextLink))) + autorest.WithBaseURL(to.String(ssfoc.NextLink))) } -// StaticSiteBuildCollectionPage contains a page of StaticSiteBuildARMResource values. -type StaticSiteBuildCollectionPage struct { - fn func(context.Context, StaticSiteBuildCollection) (StaticSiteBuildCollection, error) - ssbc StaticSiteBuildCollection +// StaticSiteFunctionOverviewCollectionPage contains a page of StaticSiteFunctionOverviewARMResource +// values. +type StaticSiteFunctionOverviewCollectionPage struct { + fn func(context.Context, StaticSiteFunctionOverviewCollection) (StaticSiteFunctionOverviewCollection, error) + ssfoc StaticSiteFunctionOverviewCollection } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *StaticSiteBuildCollectionPage) NextWithContext(ctx context.Context) (err error) { +func (page *StaticSiteFunctionOverviewCollectionPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteBuildCollectionPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteFunctionOverviewCollectionPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -27153,11 +29808,11 @@ func (page *StaticSiteBuildCollectionPage) NextWithContext(ctx context.Context) }() } for { - next, err := page.fn(ctx, page.ssbc) + next, err := page.fn(ctx, page.ssfoc) if err != nil { return err } - page.ssbc = next + page.ssfoc = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -27168,85 +29823,202 @@ func (page *StaticSiteBuildCollectionPage) NextWithContext(ctx context.Context) // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *StaticSiteBuildCollectionPage) Next() error { +func (page *StaticSiteFunctionOverviewCollectionPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page StaticSiteBuildCollectionPage) NotDone() bool { - return !page.ssbc.IsEmpty() +func (page StaticSiteFunctionOverviewCollectionPage) NotDone() bool { + return !page.ssfoc.IsEmpty() } // Response returns the raw server response from the last page request. -func (page StaticSiteBuildCollectionPage) Response() StaticSiteBuildCollection { - return page.ssbc +func (page StaticSiteFunctionOverviewCollectionPage) Response() StaticSiteFunctionOverviewCollection { + return page.ssfoc } // Values returns the slice of values for the current page or nil if there are no values. -func (page StaticSiteBuildCollectionPage) Values() []StaticSiteBuildARMResource { - if page.ssbc.IsEmpty() { +func (page StaticSiteFunctionOverviewCollectionPage) Values() []StaticSiteFunctionOverviewARMResource { + if page.ssfoc.IsEmpty() { return nil } - return *page.ssbc.Value + return *page.ssfoc.Value } -// Creates a new instance of the StaticSiteBuildCollectionPage type. -func NewStaticSiteBuildCollectionPage(cur StaticSiteBuildCollection, getNextPage func(context.Context, StaticSiteBuildCollection) (StaticSiteBuildCollection, error)) StaticSiteBuildCollectionPage { - return StaticSiteBuildCollectionPage{ - fn: getNextPage, - ssbc: cur, +// Creates a new instance of the StaticSiteFunctionOverviewCollectionPage type. +func NewStaticSiteFunctionOverviewCollectionPage(cur StaticSiteFunctionOverviewCollection, getNextPage func(context.Context, StaticSiteFunctionOverviewCollection) (StaticSiteFunctionOverviewCollection, error)) StaticSiteFunctionOverviewCollectionPage { + return StaticSiteFunctionOverviewCollectionPage{ + fn: getNextPage, + ssfoc: cur, } } -// StaticSiteBuildProperties build properties for the static site. -type StaticSiteBuildProperties struct { - // AppLocation - The path to the app code within the repository. - AppLocation *string `json:"appLocation,omitempty"` - // APILocation - The path to the api code within the repository. - APILocation *string `json:"apiLocation,omitempty"` - // AppArtifactLocation - Deprecated: The path of the app artifacts after building (deprecated in favor of OutputLocation) - AppArtifactLocation *string `json:"appArtifactLocation,omitempty"` - // OutputLocation - The output path of the app after building. - OutputLocation *string `json:"outputLocation,omitempty"` - // AppBuildCommand - A custom command to run during deployment of the static content application. - AppBuildCommand *string `json:"appBuildCommand,omitempty"` - // APIBuildCommand - A custom command to run during deployment of the Azure Functions API application. - APIBuildCommand *string `json:"apiBuildCommand,omitempty"` - // SkipGithubActionWorkflowGeneration - Skip Github Action workflow generation. - SkipGithubActionWorkflowGeneration *bool `json:"skipGithubActionWorkflowGeneration,omitempty"` - // GithubActionSecretNameOverride - Github Action secret name override. - GithubActionSecretNameOverride *string `json:"githubActionSecretNameOverride,omitempty"` +// StaticSiteLinkedBackend static Site Linked Backend ARM resource. +type StaticSiteLinkedBackend struct { + // BackendResourceID - The resource id of the backend linked to the static site + BackendResourceID *string `json:"backendResourceId,omitempty"` + // Region - The region of the backend linked to the static site + Region *string `json:"region,omitempty"` + // CreatedOn - READ-ONLY; The date and time on which the backend was linked to the static site. + CreatedOn *date.Time `json:"createdOn,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the linking process. + ProvisioningState *string `json:"provisioningState,omitempty"` } -// StaticSiteCollection collection of static sites. -type StaticSiteCollection struct { +// MarshalJSON is the custom marshaler for StaticSiteLinkedBackend. +func (sslb StaticSiteLinkedBackend) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sslb.BackendResourceID != nil { + objectMap["backendResourceId"] = sslb.BackendResourceID + } + if sslb.Region != nil { + objectMap["region"] = sslb.Region + } + return json.Marshal(objectMap) +} + +// StaticSiteLinkedBackendARMResource static Site Linked Backend ARM resource. +type StaticSiteLinkedBackendARMResource struct { + autorest.Response `json:"-"` + // StaticSiteLinkedBackendARMResourceProperties - StaticSiteLinkedBackendARMResource resource specific properties + *StaticSiteLinkedBackendARMResourceProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for StaticSiteLinkedBackendARMResource. +func (sslbar StaticSiteLinkedBackendARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sslbar.StaticSiteLinkedBackendARMResourceProperties != nil { + objectMap["properties"] = sslbar.StaticSiteLinkedBackendARMResourceProperties + } + if sslbar.Kind != nil { + objectMap["kind"] = sslbar.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for StaticSiteLinkedBackendARMResource struct. +func (sslbar *StaticSiteLinkedBackendARMResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var staticSiteLinkedBackendARMResourceProperties StaticSiteLinkedBackendARMResourceProperties + err = json.Unmarshal(*v, &staticSiteLinkedBackendARMResourceProperties) + if err != nil { + return err + } + sslbar.StaticSiteLinkedBackendARMResourceProperties = &staticSiteLinkedBackendARMResourceProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sslbar.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sslbar.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + sslbar.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sslbar.Type = &typeVar + } + } + } + + return nil +} + +// StaticSiteLinkedBackendARMResourceProperties staticSiteLinkedBackendARMResource resource specific +// properties +type StaticSiteLinkedBackendARMResourceProperties struct { + // BackendResourceID - The resource id of the backend linked to the static site + BackendResourceID *string `json:"backendResourceId,omitempty"` + // Region - The region of the backend linked to the static site + Region *string `json:"region,omitempty"` + // CreatedOn - READ-ONLY; The date and time on which the backend was linked to the static site. + CreatedOn *date.Time `json:"createdOn,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the linking process. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for StaticSiteLinkedBackendARMResourceProperties. +func (sslbar StaticSiteLinkedBackendARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sslbar.BackendResourceID != nil { + objectMap["backendResourceId"] = sslbar.BackendResourceID + } + if sslbar.Region != nil { + objectMap["region"] = sslbar.Region + } + return json.Marshal(objectMap) +} + +// StaticSiteLinkedBackendsCollection collection of static site linked backends. +type StaticSiteLinkedBackendsCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]StaticSiteARMResource `json:"value,omitempty"` + Value *[]StaticSiteLinkedBackendARMResource `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for StaticSiteCollection. -func (ssc StaticSiteCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StaticSiteLinkedBackendsCollection. +func (sslbc StaticSiteLinkedBackendsCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ssc.Value != nil { - objectMap["value"] = ssc.Value + if sslbc.Value != nil { + objectMap["value"] = sslbc.Value } return json.Marshal(objectMap) } -// StaticSiteCollectionIterator provides access to a complete listing of StaticSiteARMResource values. -type StaticSiteCollectionIterator struct { +// StaticSiteLinkedBackendsCollectionIterator provides access to a complete listing of +// StaticSiteLinkedBackendARMResource values. +type StaticSiteLinkedBackendsCollectionIterator struct { i int - page StaticSiteCollectionPage + page StaticSiteLinkedBackendsCollectionPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *StaticSiteCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *StaticSiteLinkedBackendsCollectionIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteLinkedBackendsCollectionIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -27271,67 +30043,67 @@ func (iter *StaticSiteCollectionIterator) NextWithContext(ctx context.Context) ( // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *StaticSiteCollectionIterator) Next() error { +func (iter *StaticSiteLinkedBackendsCollectionIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter StaticSiteCollectionIterator) NotDone() bool { +func (iter StaticSiteLinkedBackendsCollectionIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter StaticSiteCollectionIterator) Response() StaticSiteCollection { +func (iter StaticSiteLinkedBackendsCollectionIterator) Response() StaticSiteLinkedBackendsCollection { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter StaticSiteCollectionIterator) Value() StaticSiteARMResource { +func (iter StaticSiteLinkedBackendsCollectionIterator) Value() StaticSiteLinkedBackendARMResource { if !iter.page.NotDone() { - return StaticSiteARMResource{} + return StaticSiteLinkedBackendARMResource{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the StaticSiteCollectionIterator type. -func NewStaticSiteCollectionIterator(page StaticSiteCollectionPage) StaticSiteCollectionIterator { - return StaticSiteCollectionIterator{page: page} +// Creates a new instance of the StaticSiteLinkedBackendsCollectionIterator type. +func NewStaticSiteLinkedBackendsCollectionIterator(page StaticSiteLinkedBackendsCollectionPage) StaticSiteLinkedBackendsCollectionIterator { + return StaticSiteLinkedBackendsCollectionIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (ssc StaticSiteCollection) IsEmpty() bool { - return ssc.Value == nil || len(*ssc.Value) == 0 +func (sslbc StaticSiteLinkedBackendsCollection) IsEmpty() bool { + return sslbc.Value == nil || len(*sslbc.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (ssc StaticSiteCollection) hasNextLink() bool { - return ssc.NextLink != nil && len(*ssc.NextLink) != 0 +func (sslbc StaticSiteLinkedBackendsCollection) hasNextLink() bool { + return sslbc.NextLink != nil && len(*sslbc.NextLink) != 0 } -// staticSiteCollectionPreparer prepares a request to retrieve the next set of results. +// staticSiteLinkedBackendsCollectionPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (ssc StaticSiteCollection) staticSiteCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !ssc.hasNextLink() { +func (sslbc StaticSiteLinkedBackendsCollection) staticSiteLinkedBackendsCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !sslbc.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(ssc.NextLink))) + autorest.WithBaseURL(to.String(sslbc.NextLink))) } -// StaticSiteCollectionPage contains a page of StaticSiteARMResource values. -type StaticSiteCollectionPage struct { - fn func(context.Context, StaticSiteCollection) (StaticSiteCollection, error) - ssc StaticSiteCollection +// StaticSiteLinkedBackendsCollectionPage contains a page of StaticSiteLinkedBackendARMResource values. +type StaticSiteLinkedBackendsCollectionPage struct { + fn func(context.Context, StaticSiteLinkedBackendsCollection) (StaticSiteLinkedBackendsCollection, error) + sslbc StaticSiteLinkedBackendsCollection } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *StaticSiteCollectionPage) NextWithContext(ctx context.Context) (err error) { +func (page *StaticSiteLinkedBackendsCollectionPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteCollectionPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteLinkedBackendsCollectionPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -27341,11 +30113,11 @@ func (page *StaticSiteCollectionPage) NextWithContext(ctx context.Context) (err }() } for { - next, err := page.fn(ctx, page.ssc) + next, err := page.fn(ctx, page.sslbc) if err != nil { return err } - page.ssc = next + page.sslbc = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -27356,41 +30128,40 @@ func (page *StaticSiteCollectionPage) NextWithContext(ctx context.Context) (err // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *StaticSiteCollectionPage) Next() error { +func (page *StaticSiteLinkedBackendsCollectionPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page StaticSiteCollectionPage) NotDone() bool { - return !page.ssc.IsEmpty() +func (page StaticSiteLinkedBackendsCollectionPage) NotDone() bool { + return !page.sslbc.IsEmpty() } // Response returns the raw server response from the last page request. -func (page StaticSiteCollectionPage) Response() StaticSiteCollection { - return page.ssc +func (page StaticSiteLinkedBackendsCollectionPage) Response() StaticSiteLinkedBackendsCollection { + return page.sslbc } // Values returns the slice of values for the current page or nil if there are no values. -func (page StaticSiteCollectionPage) Values() []StaticSiteARMResource { - if page.ssc.IsEmpty() { +func (page StaticSiteLinkedBackendsCollectionPage) Values() []StaticSiteLinkedBackendARMResource { + if page.sslbc.IsEmpty() { return nil } - return *page.ssc.Value + return *page.sslbc.Value } -// Creates a new instance of the StaticSiteCollectionPage type. -func NewStaticSiteCollectionPage(cur StaticSiteCollection, getNextPage func(context.Context, StaticSiteCollection) (StaticSiteCollection, error)) StaticSiteCollectionPage { - return StaticSiteCollectionPage{ - fn: getNextPage, - ssc: cur, +// Creates a new instance of the StaticSiteLinkedBackendsCollectionPage type. +func NewStaticSiteLinkedBackendsCollectionPage(cur StaticSiteLinkedBackendsCollection, getNextPage func(context.Context, StaticSiteLinkedBackendsCollection) (StaticSiteLinkedBackendsCollection, error)) StaticSiteLinkedBackendsCollectionPage { + return StaticSiteLinkedBackendsCollectionPage{ + fn: getNextPage, + sslbc: cur, } } -// StaticSiteCustomDomainOverviewARMResource static Site Custom Domain Overview ARM resource. -type StaticSiteCustomDomainOverviewARMResource struct { - autorest.Response `json:"-"` - // StaticSiteCustomDomainOverviewARMResourceProperties - StaticSiteCustomDomainOverviewARMResource resource specific properties - *StaticSiteCustomDomainOverviewARMResourceProperties `json:"properties,omitempty"` +// StaticSitePatchResource ARM resource for a static site when patching +type StaticSitePatchResource struct { + // StaticSite - Core resource properties + *StaticSite `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -27401,20 +30172,216 @@ type StaticSiteCustomDomainOverviewARMResource struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for StaticSiteCustomDomainOverviewARMResource. -func (sscdoar StaticSiteCustomDomainOverviewARMResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StaticSitePatchResource. +func (sspr StaticSitePatchResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if sscdoar.StaticSiteCustomDomainOverviewARMResourceProperties != nil { - objectMap["properties"] = sscdoar.StaticSiteCustomDomainOverviewARMResourceProperties + if sspr.StaticSite != nil { + objectMap["properties"] = sspr.StaticSite + } + if sspr.Kind != nil { + objectMap["kind"] = sspr.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for StaticSitePatchResource struct. +func (sspr *StaticSitePatchResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var staticSite StaticSite + err = json.Unmarshal(*v, &staticSite) + if err != nil { + return err + } + sspr.StaticSite = &staticSite + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sspr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sspr.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + sspr.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sspr.Type = &typeVar + } + } + } + + return nil +} + +// StaticSiteResetPropertiesARMResource static Site Reset Properties ARM resource. +type StaticSiteResetPropertiesARMResource struct { + // StaticSiteResetPropertiesARMResourceProperties - StaticSiteResetPropertiesARMResource resource specific properties + *StaticSiteResetPropertiesARMResourceProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for StaticSiteResetPropertiesARMResource. +func (ssrpar StaticSiteResetPropertiesARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ssrpar.StaticSiteResetPropertiesARMResourceProperties != nil { + objectMap["properties"] = ssrpar.StaticSiteResetPropertiesARMResourceProperties + } + if ssrpar.Kind != nil { + objectMap["kind"] = ssrpar.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for StaticSiteResetPropertiesARMResource struct. +func (ssrpar *StaticSiteResetPropertiesARMResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var staticSiteResetPropertiesARMResourceProperties StaticSiteResetPropertiesARMResourceProperties + err = json.Unmarshal(*v, &staticSiteResetPropertiesARMResourceProperties) + if err != nil { + return err + } + ssrpar.StaticSiteResetPropertiesARMResourceProperties = &staticSiteResetPropertiesARMResourceProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ssrpar.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ssrpar.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + ssrpar.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ssrpar.Type = &typeVar + } + } + } + + return nil +} + +// StaticSiteResetPropertiesARMResourceProperties staticSiteResetPropertiesARMResource resource specific +// properties +type StaticSiteResetPropertiesARMResourceProperties struct { + // RepositoryToken - The token which proves admin privileges to the repository. + RepositoryToken *string `json:"repositoryToken,omitempty"` + // ShouldUpdateRepository - Determines whether the repository should be updated with the new properties. + ShouldUpdateRepository *bool `json:"shouldUpdateRepository,omitempty"` +} + +// StaticSiteTemplateOptions template Options for the static site. +type StaticSiteTemplateOptions struct { + // TemplateRepositoryURL - URL of the template repository. The newly generated repository will be based on this one. + TemplateRepositoryURL *string `json:"templateRepositoryUrl,omitempty"` + // Owner - Owner of the newly generated repository. + Owner *string `json:"owner,omitempty"` + // RepositoryName - Name of the newly generated repository. + RepositoryName *string `json:"repositoryName,omitempty"` + // Description - Description of the newly generated repository. + Description *string `json:"description,omitempty"` + // IsPrivate - Whether or not the newly generated repository is a private repository. Defaults to false (i.e. public). + IsPrivate *bool `json:"isPrivate,omitempty"` +} + +// StaticSiteUserARMResource static Site User ARM resource. +type StaticSiteUserARMResource struct { + autorest.Response `json:"-"` + // StaticSiteUserARMResourceProperties - StaticSiteUserARMResource resource specific properties + *StaticSiteUserARMResourceProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for StaticSiteUserARMResource. +func (ssuar StaticSiteUserARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ssuar.StaticSiteUserARMResourceProperties != nil { + objectMap["properties"] = ssuar.StaticSiteUserARMResourceProperties } - if sscdoar.Kind != nil { - objectMap["kind"] = sscdoar.Kind + if ssuar.Kind != nil { + objectMap["kind"] = ssuar.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for StaticSiteCustomDomainOverviewARMResource struct. -func (sscdoar *StaticSiteCustomDomainOverviewARMResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for StaticSiteUserARMResource struct. +func (ssuar *StaticSiteUserARMResource) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -27424,12 +30391,12 @@ func (sscdoar *StaticSiteCustomDomainOverviewARMResource) UnmarshalJSON(body []b switch k { case "properties": if v != nil { - var staticSiteCustomDomainOverviewARMResourceProperties StaticSiteCustomDomainOverviewARMResourceProperties - err = json.Unmarshal(*v, &staticSiteCustomDomainOverviewARMResourceProperties) + var staticSiteUserARMResourceProperties StaticSiteUserARMResourceProperties + err = json.Unmarshal(*v, &staticSiteUserARMResourceProperties) if err != nil { return err } - sscdoar.StaticSiteCustomDomainOverviewARMResourceProperties = &staticSiteCustomDomainOverviewARMResourceProperties + ssuar.StaticSiteUserARMResourceProperties = &staticSiteUserARMResourceProperties } case "id": if v != nil { @@ -27438,7 +30405,7 @@ func (sscdoar *StaticSiteCustomDomainOverviewARMResource) UnmarshalJSON(body []b if err != nil { return err } - sscdoar.ID = &ID + ssuar.ID = &ID } case "name": if v != nil { @@ -27447,7 +30414,7 @@ func (sscdoar *StaticSiteCustomDomainOverviewARMResource) UnmarshalJSON(body []b if err != nil { return err } - sscdoar.Name = &name + ssuar.Name = &name } case "kind": if v != nil { @@ -27456,7 +30423,7 @@ func (sscdoar *StaticSiteCustomDomainOverviewARMResource) UnmarshalJSON(body []b if err != nil { return err } - sscdoar.Kind = &kind + ssuar.Kind = &kind } case "type": if v != nil { @@ -27465,7 +30432,7 @@ func (sscdoar *StaticSiteCustomDomainOverviewARMResource) UnmarshalJSON(body []b if err != nil { return err } - sscdoar.Type = &typeVar + ssuar.Type = &typeVar } } } @@ -27473,57 +30440,57 @@ func (sscdoar *StaticSiteCustomDomainOverviewARMResource) UnmarshalJSON(body []b return nil } -// StaticSiteCustomDomainOverviewARMResourceProperties staticSiteCustomDomainOverviewARMResource resource -// specific properties -type StaticSiteCustomDomainOverviewARMResourceProperties struct { - // DomainName - READ-ONLY; The domain name for the static site custom domain. - DomainName *string `json:"domainName,omitempty"` - // CreatedOn - READ-ONLY; The date and time on which the custom domain was created for the static site. - CreatedOn *date.Time `json:"createdOn,omitempty"` - // Status - READ-ONLY; The status of the custom domain. Possible values include: 'CustomDomainStatusRetrievingValidationToken', 'CustomDomainStatusValidating', 'CustomDomainStatusAdding', 'CustomDomainStatusReady', 'CustomDomainStatusFailed', 'CustomDomainStatusDeleting' - Status CustomDomainStatus `json:"status,omitempty"` - // ValidationToken - READ-ONLY; The TXT record validation token - ValidationToken *string `json:"validationToken,omitempty"` - // ErrorMessage - READ-ONLY - ErrorMessage *string `json:"errorMessage,omitempty"` +// StaticSiteUserARMResourceProperties staticSiteUserARMResource resource specific properties +type StaticSiteUserARMResourceProperties struct { + // Provider - READ-ONLY; The identity provider for the static site user. + Provider *string `json:"provider,omitempty"` + // UserID - READ-ONLY; The user id for the static site user. + UserID *string `json:"userId,omitempty"` + // DisplayName - READ-ONLY; The display name for the static site user. + DisplayName *string `json:"displayName,omitempty"` + // Roles - The roles for the static site user, in free-form string format + Roles *string `json:"roles,omitempty"` } -// MarshalJSON is the custom marshaler for StaticSiteCustomDomainOverviewARMResourceProperties. -func (sscdoar StaticSiteCustomDomainOverviewARMResourceProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StaticSiteUserARMResourceProperties. +func (ssuar StaticSiteUserARMResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if ssuar.Roles != nil { + objectMap["roles"] = ssuar.Roles + } return json.Marshal(objectMap) } -// StaticSiteCustomDomainOverviewCollection collection of static site custom domains. -type StaticSiteCustomDomainOverviewCollection struct { +// StaticSiteUserCollection collection of static site custom users. +type StaticSiteUserCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]StaticSiteCustomDomainOverviewARMResource `json:"value,omitempty"` + Value *[]StaticSiteUserARMResource `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for StaticSiteCustomDomainOverviewCollection. -func (sscdoc StaticSiteCustomDomainOverviewCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StaticSiteUserCollection. +func (ssuc StaticSiteUserCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if sscdoc.Value != nil { - objectMap["value"] = sscdoc.Value + if ssuc.Value != nil { + objectMap["value"] = ssuc.Value } return json.Marshal(objectMap) } -// StaticSiteCustomDomainOverviewCollectionIterator provides access to a complete listing of -// StaticSiteCustomDomainOverviewARMResource values. -type StaticSiteCustomDomainOverviewCollectionIterator struct { +// StaticSiteUserCollectionIterator provides access to a complete listing of StaticSiteUserARMResource +// values. +type StaticSiteUserCollectionIterator struct { i int - page StaticSiteCustomDomainOverviewCollectionPage + page StaticSiteUserCollectionPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *StaticSiteCustomDomainOverviewCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *StaticSiteUserCollectionIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteCustomDomainOverviewCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteUserCollectionIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -27548,68 +30515,67 @@ func (iter *StaticSiteCustomDomainOverviewCollectionIterator) NextWithContext(ct // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *StaticSiteCustomDomainOverviewCollectionIterator) Next() error { +func (iter *StaticSiteUserCollectionIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter StaticSiteCustomDomainOverviewCollectionIterator) NotDone() bool { +func (iter StaticSiteUserCollectionIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter StaticSiteCustomDomainOverviewCollectionIterator) Response() StaticSiteCustomDomainOverviewCollection { +func (iter StaticSiteUserCollectionIterator) Response() StaticSiteUserCollection { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter StaticSiteCustomDomainOverviewCollectionIterator) Value() StaticSiteCustomDomainOverviewARMResource { +func (iter StaticSiteUserCollectionIterator) Value() StaticSiteUserARMResource { if !iter.page.NotDone() { - return StaticSiteCustomDomainOverviewARMResource{} + return StaticSiteUserARMResource{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the StaticSiteCustomDomainOverviewCollectionIterator type. -func NewStaticSiteCustomDomainOverviewCollectionIterator(page StaticSiteCustomDomainOverviewCollectionPage) StaticSiteCustomDomainOverviewCollectionIterator { - return StaticSiteCustomDomainOverviewCollectionIterator{page: page} +// Creates a new instance of the StaticSiteUserCollectionIterator type. +func NewStaticSiteUserCollectionIterator(page StaticSiteUserCollectionPage) StaticSiteUserCollectionIterator { + return StaticSiteUserCollectionIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (sscdoc StaticSiteCustomDomainOverviewCollection) IsEmpty() bool { - return sscdoc.Value == nil || len(*sscdoc.Value) == 0 +func (ssuc StaticSiteUserCollection) IsEmpty() bool { + return ssuc.Value == nil || len(*ssuc.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (sscdoc StaticSiteCustomDomainOverviewCollection) hasNextLink() bool { - return sscdoc.NextLink != nil && len(*sscdoc.NextLink) != 0 +func (ssuc StaticSiteUserCollection) hasNextLink() bool { + return ssuc.NextLink != nil && len(*ssuc.NextLink) != 0 } -// staticSiteCustomDomainOverviewCollectionPreparer prepares a request to retrieve the next set of results. +// staticSiteUserCollectionPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (sscdoc StaticSiteCustomDomainOverviewCollection) staticSiteCustomDomainOverviewCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !sscdoc.hasNextLink() { +func (ssuc StaticSiteUserCollection) staticSiteUserCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !ssuc.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(sscdoc.NextLink))) + autorest.WithBaseURL(to.String(ssuc.NextLink))) } -// StaticSiteCustomDomainOverviewCollectionPage contains a page of -// StaticSiteCustomDomainOverviewARMResource values. -type StaticSiteCustomDomainOverviewCollectionPage struct { - fn func(context.Context, StaticSiteCustomDomainOverviewCollection) (StaticSiteCustomDomainOverviewCollection, error) - sscdoc StaticSiteCustomDomainOverviewCollection +// StaticSiteUserCollectionPage contains a page of StaticSiteUserARMResource values. +type StaticSiteUserCollectionPage struct { + fn func(context.Context, StaticSiteUserCollection) (StaticSiteUserCollection, error) + ssuc StaticSiteUserCollection } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *StaticSiteCustomDomainOverviewCollectionPage) NextWithContext(ctx context.Context) (err error) { +func (page *StaticSiteUserCollectionPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteCustomDomainOverviewCollectionPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteUserCollectionPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -27619,11 +30585,11 @@ func (page *StaticSiteCustomDomainOverviewCollectionPage) NextWithContext(ctx co }() } for { - next, err := page.fn(ctx, page.sscdoc) + next, err := page.fn(ctx, page.ssuc) if err != nil { return err } - page.sscdoc = next + page.ssuc = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -27634,41 +30600,40 @@ func (page *StaticSiteCustomDomainOverviewCollectionPage) NextWithContext(ctx co // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *StaticSiteCustomDomainOverviewCollectionPage) Next() error { +func (page *StaticSiteUserCollectionPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page StaticSiteCustomDomainOverviewCollectionPage) NotDone() bool { - return !page.sscdoc.IsEmpty() +func (page StaticSiteUserCollectionPage) NotDone() bool { + return !page.ssuc.IsEmpty() } // Response returns the raw server response from the last page request. -func (page StaticSiteCustomDomainOverviewCollectionPage) Response() StaticSiteCustomDomainOverviewCollection { - return page.sscdoc +func (page StaticSiteUserCollectionPage) Response() StaticSiteUserCollection { + return page.ssuc } // Values returns the slice of values for the current page or nil if there are no values. -func (page StaticSiteCustomDomainOverviewCollectionPage) Values() []StaticSiteCustomDomainOverviewARMResource { - if page.sscdoc.IsEmpty() { +func (page StaticSiteUserCollectionPage) Values() []StaticSiteUserARMResource { + if page.ssuc.IsEmpty() { return nil } - return *page.sscdoc.Value + return *page.ssuc.Value } -// Creates a new instance of the StaticSiteCustomDomainOverviewCollectionPage type. -func NewStaticSiteCustomDomainOverviewCollectionPage(cur StaticSiteCustomDomainOverviewCollection, getNextPage func(context.Context, StaticSiteCustomDomainOverviewCollection) (StaticSiteCustomDomainOverviewCollection, error)) StaticSiteCustomDomainOverviewCollectionPage { - return StaticSiteCustomDomainOverviewCollectionPage{ - fn: getNextPage, - sscdoc: cur, +// Creates a new instance of the StaticSiteUserCollectionPage type. +func NewStaticSiteUserCollectionPage(cur StaticSiteUserCollection, getNextPage func(context.Context, StaticSiteUserCollection) (StaticSiteUserCollection, error)) StaticSiteUserCollectionPage { + return StaticSiteUserCollectionPage{ + fn: getNextPage, + ssuc: cur, } } -// StaticSiteCustomDomainRequestPropertiesARMResource static Site Custom Domain Request Properties ARM -// resource. -type StaticSiteCustomDomainRequestPropertiesARMResource struct { - // StaticSiteCustomDomainRequestPropertiesARMResourceProperties - StaticSiteCustomDomainRequestPropertiesARMResource resource specific properties - *StaticSiteCustomDomainRequestPropertiesARMResourceProperties `json:"properties,omitempty"` +// StaticSiteUserInvitationRequestResource static sites user roles invitation resource. +type StaticSiteUserInvitationRequestResource struct { + // StaticSiteUserInvitationRequestResourceProperties - StaticSiteUserInvitationRequestResource resource specific properties + *StaticSiteUserInvitationRequestResourceProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -27679,20 +30644,20 @@ type StaticSiteCustomDomainRequestPropertiesARMResource struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for StaticSiteCustomDomainRequestPropertiesARMResource. -func (sscdrpar StaticSiteCustomDomainRequestPropertiesARMResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StaticSiteUserInvitationRequestResource. +func (ssuirr StaticSiteUserInvitationRequestResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if sscdrpar.StaticSiteCustomDomainRequestPropertiesARMResourceProperties != nil { - objectMap["properties"] = sscdrpar.StaticSiteCustomDomainRequestPropertiesARMResourceProperties + if ssuirr.StaticSiteUserInvitationRequestResourceProperties != nil { + objectMap["properties"] = ssuirr.StaticSiteUserInvitationRequestResourceProperties } - if sscdrpar.Kind != nil { - objectMap["kind"] = sscdrpar.Kind + if ssuirr.Kind != nil { + objectMap["kind"] = ssuirr.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for StaticSiteCustomDomainRequestPropertiesARMResource struct. -func (sscdrpar *StaticSiteCustomDomainRequestPropertiesARMResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for StaticSiteUserInvitationRequestResource struct. +func (ssuirr *StaticSiteUserInvitationRequestResource) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -27702,12 +30667,12 @@ func (sscdrpar *StaticSiteCustomDomainRequestPropertiesARMResource) UnmarshalJSO switch k { case "properties": if v != nil { - var staticSiteCustomDomainRequestPropertiesARMResourceProperties StaticSiteCustomDomainRequestPropertiesARMResourceProperties - err = json.Unmarshal(*v, &staticSiteCustomDomainRequestPropertiesARMResourceProperties) + var staticSiteUserInvitationRequestResourceProperties StaticSiteUserInvitationRequestResourceProperties + err = json.Unmarshal(*v, &staticSiteUserInvitationRequestResourceProperties) if err != nil { return err } - sscdrpar.StaticSiteCustomDomainRequestPropertiesARMResourceProperties = &staticSiteCustomDomainRequestPropertiesARMResourceProperties + ssuirr.StaticSiteUserInvitationRequestResourceProperties = &staticSiteUserInvitationRequestResourceProperties } case "id": if v != nil { @@ -27716,7 +30681,7 @@ func (sscdrpar *StaticSiteCustomDomainRequestPropertiesARMResource) UnmarshalJSO if err != nil { return err } - sscdrpar.ID = &ID + ssuirr.ID = &ID } case "name": if v != nil { @@ -27725,7 +30690,7 @@ func (sscdrpar *StaticSiteCustomDomainRequestPropertiesARMResource) UnmarshalJSO if err != nil { return err } - sscdrpar.Name = &name + ssuirr.Name = &name } case "kind": if v != nil { @@ -27734,7 +30699,7 @@ func (sscdrpar *StaticSiteCustomDomainRequestPropertiesARMResource) UnmarshalJSO if err != nil { return err } - sscdrpar.Kind = &kind + ssuirr.Kind = &kind } case "type": if v != nil { @@ -27743,7 +30708,7 @@ func (sscdrpar *StaticSiteCustomDomainRequestPropertiesARMResource) UnmarshalJSO if err != nil { return err } - sscdrpar.Type = &typeVar + ssuirr.Type = &typeVar } } } @@ -27751,17 +30716,26 @@ func (sscdrpar *StaticSiteCustomDomainRequestPropertiesARMResource) UnmarshalJSO return nil } -// StaticSiteCustomDomainRequestPropertiesARMResourceProperties -// staticSiteCustomDomainRequestPropertiesARMResource resource specific properties -type StaticSiteCustomDomainRequestPropertiesARMResourceProperties struct { - // ValidationMethod - Validation method for adding a custom domain - ValidationMethod *string `json:"validationMethod,omitempty"` +// StaticSiteUserInvitationRequestResourceProperties staticSiteUserInvitationRequestResource resource +// specific properties +type StaticSiteUserInvitationRequestResourceProperties struct { + // Domain - The domain name for the static site custom domain. + Domain *string `json:"domain,omitempty"` + // Provider - The identity provider for the static site user. + Provider *string `json:"provider,omitempty"` + // UserDetails - The user id for the static site user. + UserDetails *string `json:"userDetails,omitempty"` + // Roles - The roles for the static site user, in free-form string format + Roles *string `json:"roles,omitempty"` + // NumHoursToExpiration - The number of hours the sas token stays valid + NumHoursToExpiration *int32 `json:"numHoursToExpiration,omitempty"` } -// StaticSiteFunctionOverviewARMResource static Site Function Overview ARM resource. -type StaticSiteFunctionOverviewARMResource struct { - // StaticSiteFunctionOverviewARMResourceProperties - StaticSiteFunctionOverviewARMResource resource specific properties - *StaticSiteFunctionOverviewARMResourceProperties `json:"properties,omitempty"` +// StaticSiteUserInvitationResponseResource static sites user roles invitation link resource. +type StaticSiteUserInvitationResponseResource struct { + autorest.Response `json:"-"` + // StaticSiteUserInvitationResponseResourceProperties - StaticSiteUserInvitationResponseResource resource specific properties + *StaticSiteUserInvitationResponseResourceProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -27772,20 +30746,20 @@ type StaticSiteFunctionOverviewARMResource struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for StaticSiteFunctionOverviewARMResource. -func (ssfoar StaticSiteFunctionOverviewARMResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StaticSiteUserInvitationResponseResource. +func (ssuirr StaticSiteUserInvitationResponseResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ssfoar.StaticSiteFunctionOverviewARMResourceProperties != nil { - objectMap["properties"] = ssfoar.StaticSiteFunctionOverviewARMResourceProperties + if ssuirr.StaticSiteUserInvitationResponseResourceProperties != nil { + objectMap["properties"] = ssuirr.StaticSiteUserInvitationResponseResourceProperties } - if ssfoar.Kind != nil { - objectMap["kind"] = ssfoar.Kind + if ssuirr.Kind != nil { + objectMap["kind"] = ssuirr.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for StaticSiteFunctionOverviewARMResource struct. -func (ssfoar *StaticSiteFunctionOverviewARMResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for StaticSiteUserInvitationResponseResource struct. +func (ssuirr *StaticSiteUserInvitationResponseResource) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -27795,12 +30769,12 @@ func (ssfoar *StaticSiteFunctionOverviewARMResource) UnmarshalJSON(body []byte) switch k { case "properties": if v != nil { - var staticSiteFunctionOverviewARMResourceProperties StaticSiteFunctionOverviewARMResourceProperties - err = json.Unmarshal(*v, &staticSiteFunctionOverviewARMResourceProperties) + var staticSiteUserInvitationResponseResourceProperties StaticSiteUserInvitationResponseResourceProperties + err = json.Unmarshal(*v, &staticSiteUserInvitationResponseResourceProperties) if err != nil { return err } - ssfoar.StaticSiteFunctionOverviewARMResourceProperties = &staticSiteFunctionOverviewARMResourceProperties + ssuirr.StaticSiteUserInvitationResponseResourceProperties = &staticSiteUserInvitationResponseResourceProperties } case "id": if v != nil { @@ -27809,7 +30783,7 @@ func (ssfoar *StaticSiteFunctionOverviewARMResource) UnmarshalJSON(body []byte) if err != nil { return err } - ssfoar.ID = &ID + ssuirr.ID = &ID } case "name": if v != nil { @@ -27818,7 +30792,7 @@ func (ssfoar *StaticSiteFunctionOverviewARMResource) UnmarshalJSON(body []byte) if err != nil { return err } - ssfoar.Name = &name + ssuirr.Name = &name } case "kind": if v != nil { @@ -27827,7 +30801,7 @@ func (ssfoar *StaticSiteFunctionOverviewARMResource) UnmarshalJSON(body []byte) if err != nil { return err } - ssfoar.Kind = &kind + ssuirr.Kind = &kind } case "type": if v != nil { @@ -27836,7 +30810,7 @@ func (ssfoar *StaticSiteFunctionOverviewARMResource) UnmarshalJSON(body []byte) if err != nil { return err } - ssfoar.Type = &typeVar + ssuirr.Type = &typeVar } } } @@ -27844,51 +30818,270 @@ func (ssfoar *StaticSiteFunctionOverviewARMResource) UnmarshalJSON(body []byte) return nil } -// StaticSiteFunctionOverviewARMResourceProperties staticSiteFunctionOverviewARMResource resource specific +// StaticSiteUserInvitationResponseResourceProperties staticSiteUserInvitationResponseResource resource +// specific properties +type StaticSiteUserInvitationResponseResourceProperties struct { + // ExpiresOn - READ-ONLY; The expiration time of the invitation + ExpiresOn *date.Time `json:"expiresOn,omitempty"` + // InvitationURL - READ-ONLY; The url for the invitation link + InvitationURL *string `json:"invitationUrl,omitempty"` +} + +// MarshalJSON is the custom marshaler for StaticSiteUserInvitationResponseResourceProperties. +func (ssuirr StaticSiteUserInvitationResponseResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// StaticSiteUserProvidedFunctionApp a static site user provided function. +type StaticSiteUserProvidedFunctionApp struct { + // StaticSiteUserProvidedFunctionAppProperties - StaticSiteUserProvidedFunctionApp resource specific properties + *StaticSiteUserProvidedFunctionAppProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for StaticSiteUserProvidedFunctionApp. +func (ssupfa StaticSiteUserProvidedFunctionApp) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ssupfa.StaticSiteUserProvidedFunctionAppProperties != nil { + objectMap["properties"] = ssupfa.StaticSiteUserProvidedFunctionAppProperties + } + if ssupfa.Kind != nil { + objectMap["kind"] = ssupfa.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for StaticSiteUserProvidedFunctionApp struct. +func (ssupfa *StaticSiteUserProvidedFunctionApp) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var staticSiteUserProvidedFunctionAppProperties StaticSiteUserProvidedFunctionAppProperties + err = json.Unmarshal(*v, &staticSiteUserProvidedFunctionAppProperties) + if err != nil { + return err + } + ssupfa.StaticSiteUserProvidedFunctionAppProperties = &staticSiteUserProvidedFunctionAppProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ssupfa.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ssupfa.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + ssupfa.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ssupfa.Type = &typeVar + } + } + } + + return nil +} + +// StaticSiteUserProvidedFunctionAppARMResource static Site User Provided Function App ARM resource. +type StaticSiteUserProvidedFunctionAppARMResource struct { + autorest.Response `json:"-"` + // StaticSiteUserProvidedFunctionAppARMResourceProperties - StaticSiteUserProvidedFunctionAppARMResource resource specific properties + *StaticSiteUserProvidedFunctionAppARMResourceProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for StaticSiteUserProvidedFunctionAppARMResource. +func (ssupfaar StaticSiteUserProvidedFunctionAppARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ssupfaar.StaticSiteUserProvidedFunctionAppARMResourceProperties != nil { + objectMap["properties"] = ssupfaar.StaticSiteUserProvidedFunctionAppARMResourceProperties + } + if ssupfaar.Kind != nil { + objectMap["kind"] = ssupfaar.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for StaticSiteUserProvidedFunctionAppARMResource struct. +func (ssupfaar *StaticSiteUserProvidedFunctionAppARMResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var staticSiteUserProvidedFunctionAppARMResourceProperties StaticSiteUserProvidedFunctionAppARMResourceProperties + err = json.Unmarshal(*v, &staticSiteUserProvidedFunctionAppARMResourceProperties) + if err != nil { + return err + } + ssupfaar.StaticSiteUserProvidedFunctionAppARMResourceProperties = &staticSiteUserProvidedFunctionAppARMResourceProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ssupfaar.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ssupfaar.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + ssupfaar.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ssupfaar.Type = &typeVar + } + } + } + + return nil +} + +// StaticSiteUserProvidedFunctionAppARMResourceProperties staticSiteUserProvidedFunctionAppARMResource +// resource specific properties +type StaticSiteUserProvidedFunctionAppARMResourceProperties struct { + // FunctionAppResourceID - The resource id of the function app registered with the static site + FunctionAppResourceID *string `json:"functionAppResourceId,omitempty"` + // FunctionAppRegion - The region of the function app registered with the static site + FunctionAppRegion *string `json:"functionAppRegion,omitempty"` + // CreatedOn - READ-ONLY; The date and time on which the function app was registered with the static site. + CreatedOn *date.Time `json:"createdOn,omitempty"` +} + +// MarshalJSON is the custom marshaler for StaticSiteUserProvidedFunctionAppARMResourceProperties. +func (ssupfaar StaticSiteUserProvidedFunctionAppARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ssupfaar.FunctionAppResourceID != nil { + objectMap["functionAppResourceId"] = ssupfaar.FunctionAppResourceID + } + if ssupfaar.FunctionAppRegion != nil { + objectMap["functionAppRegion"] = ssupfaar.FunctionAppRegion + } + return json.Marshal(objectMap) +} + +// StaticSiteUserProvidedFunctionAppProperties staticSiteUserProvidedFunctionApp resource specific // properties -type StaticSiteFunctionOverviewARMResourceProperties struct { - // FunctionName - READ-ONLY; The name for the function - FunctionName *string `json:"functionName,omitempty"` - // TriggerType - READ-ONLY; The trigger type of the function. Possible values include: 'TriggerTypesHTTPTrigger', 'TriggerTypesUnknown' - TriggerType TriggerTypes `json:"triggerType,omitempty"` +type StaticSiteUserProvidedFunctionAppProperties struct { + // FunctionAppResourceID - The resource id of the function app registered with the static site + FunctionAppResourceID *string `json:"functionAppResourceId,omitempty"` + // FunctionAppRegion - The region of the function app registered with the static site + FunctionAppRegion *string `json:"functionAppRegion,omitempty"` + // CreatedOn - READ-ONLY; The date and time on which the function app was registered with the static site. + CreatedOn *date.Time `json:"createdOn,omitempty"` } -// MarshalJSON is the custom marshaler for StaticSiteFunctionOverviewARMResourceProperties. -func (ssfoar StaticSiteFunctionOverviewARMResourceProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StaticSiteUserProvidedFunctionAppProperties. +func (ssupfa StaticSiteUserProvidedFunctionAppProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if ssupfa.FunctionAppResourceID != nil { + objectMap["functionAppResourceId"] = ssupfa.FunctionAppResourceID + } + if ssupfa.FunctionAppRegion != nil { + objectMap["functionAppRegion"] = ssupfa.FunctionAppRegion + } return json.Marshal(objectMap) } -// StaticSiteFunctionOverviewCollection collection of static site functions. -type StaticSiteFunctionOverviewCollection struct { +// StaticSiteUserProvidedFunctionAppsCollection collection of static site user provided function apps. +type StaticSiteUserProvidedFunctionAppsCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]StaticSiteFunctionOverviewARMResource `json:"value,omitempty"` + Value *[]StaticSiteUserProvidedFunctionAppARMResource `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for StaticSiteFunctionOverviewCollection. -func (ssfoc StaticSiteFunctionOverviewCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StaticSiteUserProvidedFunctionAppsCollection. +func (ssupfac StaticSiteUserProvidedFunctionAppsCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ssfoc.Value != nil { - objectMap["value"] = ssfoc.Value + if ssupfac.Value != nil { + objectMap["value"] = ssupfac.Value } return json.Marshal(objectMap) } -// StaticSiteFunctionOverviewCollectionIterator provides access to a complete listing of -// StaticSiteFunctionOverviewARMResource values. -type StaticSiteFunctionOverviewCollectionIterator struct { +// StaticSiteUserProvidedFunctionAppsCollectionIterator provides access to a complete listing of +// StaticSiteUserProvidedFunctionAppARMResource values. +type StaticSiteUserProvidedFunctionAppsCollectionIterator struct { i int - page StaticSiteFunctionOverviewCollectionPage + page StaticSiteUserProvidedFunctionAppsCollectionPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *StaticSiteFunctionOverviewCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *StaticSiteUserProvidedFunctionAppsCollectionIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteFunctionOverviewCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteUserProvidedFunctionAppsCollectionIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -27913,68 +31106,68 @@ func (iter *StaticSiteFunctionOverviewCollectionIterator) NextWithContext(ctx co // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *StaticSiteFunctionOverviewCollectionIterator) Next() error { +func (iter *StaticSiteUserProvidedFunctionAppsCollectionIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter StaticSiteFunctionOverviewCollectionIterator) NotDone() bool { +func (iter StaticSiteUserProvidedFunctionAppsCollectionIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter StaticSiteFunctionOverviewCollectionIterator) Response() StaticSiteFunctionOverviewCollection { +func (iter StaticSiteUserProvidedFunctionAppsCollectionIterator) Response() StaticSiteUserProvidedFunctionAppsCollection { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter StaticSiteFunctionOverviewCollectionIterator) Value() StaticSiteFunctionOverviewARMResource { +func (iter StaticSiteUserProvidedFunctionAppsCollectionIterator) Value() StaticSiteUserProvidedFunctionAppARMResource { if !iter.page.NotDone() { - return StaticSiteFunctionOverviewARMResource{} + return StaticSiteUserProvidedFunctionAppARMResource{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the StaticSiteFunctionOverviewCollectionIterator type. -func NewStaticSiteFunctionOverviewCollectionIterator(page StaticSiteFunctionOverviewCollectionPage) StaticSiteFunctionOverviewCollectionIterator { - return StaticSiteFunctionOverviewCollectionIterator{page: page} +// Creates a new instance of the StaticSiteUserProvidedFunctionAppsCollectionIterator type. +func NewStaticSiteUserProvidedFunctionAppsCollectionIterator(page StaticSiteUserProvidedFunctionAppsCollectionPage) StaticSiteUserProvidedFunctionAppsCollectionIterator { + return StaticSiteUserProvidedFunctionAppsCollectionIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (ssfoc StaticSiteFunctionOverviewCollection) IsEmpty() bool { - return ssfoc.Value == nil || len(*ssfoc.Value) == 0 +func (ssupfac StaticSiteUserProvidedFunctionAppsCollection) IsEmpty() bool { + return ssupfac.Value == nil || len(*ssupfac.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (ssfoc StaticSiteFunctionOverviewCollection) hasNextLink() bool { - return ssfoc.NextLink != nil && len(*ssfoc.NextLink) != 0 +func (ssupfac StaticSiteUserProvidedFunctionAppsCollection) hasNextLink() bool { + return ssupfac.NextLink != nil && len(*ssupfac.NextLink) != 0 } -// staticSiteFunctionOverviewCollectionPreparer prepares a request to retrieve the next set of results. +// staticSiteUserProvidedFunctionAppsCollectionPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (ssfoc StaticSiteFunctionOverviewCollection) staticSiteFunctionOverviewCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !ssfoc.hasNextLink() { +func (ssupfac StaticSiteUserProvidedFunctionAppsCollection) staticSiteUserProvidedFunctionAppsCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !ssupfac.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(ssfoc.NextLink))) + autorest.WithBaseURL(to.String(ssupfac.NextLink))) } -// StaticSiteFunctionOverviewCollectionPage contains a page of StaticSiteFunctionOverviewARMResource -// values. -type StaticSiteFunctionOverviewCollectionPage struct { - fn func(context.Context, StaticSiteFunctionOverviewCollection) (StaticSiteFunctionOverviewCollection, error) - ssfoc StaticSiteFunctionOverviewCollection +// StaticSiteUserProvidedFunctionAppsCollectionPage contains a page of +// StaticSiteUserProvidedFunctionAppARMResource values. +type StaticSiteUserProvidedFunctionAppsCollectionPage struct { + fn func(context.Context, StaticSiteUserProvidedFunctionAppsCollection) (StaticSiteUserProvidedFunctionAppsCollection, error) + ssupfac StaticSiteUserProvidedFunctionAppsCollection } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *StaticSiteFunctionOverviewCollectionPage) NextWithContext(ctx context.Context) (err error) { +func (page *StaticSiteUserProvidedFunctionAppsCollectionPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteFunctionOverviewCollectionPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteUserProvidedFunctionAppsCollectionPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -27984,11 +31177,11 @@ func (page *StaticSiteFunctionOverviewCollectionPage) NextWithContext(ctx contex }() } for { - next, err := page.fn(ctx, page.ssfoc) + next, err := page.fn(ctx, page.ssupfac) if err != nil { return err } - page.ssfoc = next + page.ssupfac = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -27999,126 +31192,54 @@ func (page *StaticSiteFunctionOverviewCollectionPage) NextWithContext(ctx contex // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *StaticSiteFunctionOverviewCollectionPage) Next() error { +func (page *StaticSiteUserProvidedFunctionAppsCollectionPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page StaticSiteFunctionOverviewCollectionPage) NotDone() bool { - return !page.ssfoc.IsEmpty() +func (page StaticSiteUserProvidedFunctionAppsCollectionPage) NotDone() bool { + return !page.ssupfac.IsEmpty() } // Response returns the raw server response from the last page request. -func (page StaticSiteFunctionOverviewCollectionPage) Response() StaticSiteFunctionOverviewCollection { - return page.ssfoc +func (page StaticSiteUserProvidedFunctionAppsCollectionPage) Response() StaticSiteUserProvidedFunctionAppsCollection { + return page.ssupfac } // Values returns the slice of values for the current page or nil if there are no values. -func (page StaticSiteFunctionOverviewCollectionPage) Values() []StaticSiteFunctionOverviewARMResource { - if page.ssfoc.IsEmpty() { +func (page StaticSiteUserProvidedFunctionAppsCollectionPage) Values() []StaticSiteUserProvidedFunctionAppARMResource { + if page.ssupfac.IsEmpty() { return nil } - return *page.ssfoc.Value -} - -// Creates a new instance of the StaticSiteFunctionOverviewCollectionPage type. -func NewStaticSiteFunctionOverviewCollectionPage(cur StaticSiteFunctionOverviewCollection, getNextPage func(context.Context, StaticSiteFunctionOverviewCollection) (StaticSiteFunctionOverviewCollection, error)) StaticSiteFunctionOverviewCollectionPage { - return StaticSiteFunctionOverviewCollectionPage{ - fn: getNextPage, - ssfoc: cur, - } -} - -// StaticSitePatchResource ARM resource for a static site when patching -type StaticSitePatchResource struct { - // StaticSite - Core resource properties - *StaticSite `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` + return *page.ssupfac.Value } -// MarshalJSON is the custom marshaler for StaticSitePatchResource. -func (sspr StaticSitePatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sspr.StaticSite != nil { - objectMap["properties"] = sspr.StaticSite - } - if sspr.Kind != nil { - objectMap["kind"] = sspr.Kind +// Creates a new instance of the StaticSiteUserProvidedFunctionAppsCollectionPage type. +func NewStaticSiteUserProvidedFunctionAppsCollectionPage(cur StaticSiteUserProvidedFunctionAppsCollection, getNextPage func(context.Context, StaticSiteUserProvidedFunctionAppsCollection) (StaticSiteUserProvidedFunctionAppsCollection, error)) StaticSiteUserProvidedFunctionAppsCollectionPage { + return StaticSiteUserProvidedFunctionAppsCollectionPage{ + fn: getNextPage, + ssupfac: cur, } - return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for StaticSitePatchResource struct. -func (sspr *StaticSitePatchResource) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var staticSite StaticSite - err = json.Unmarshal(*v, &staticSite) - if err != nil { - return err - } - sspr.StaticSite = &staticSite - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sspr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sspr.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - sspr.Kind = &kind - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - sspr.Type = &typeVar - } - } - } - - return nil +// StaticSiteZipDeployment a static site zip deployment. +type StaticSiteZipDeployment struct { + // AppZipURL - URL for the zipped app content + AppZipURL *string `json:"appZipUrl,omitempty"` + // APIZipURL - URL for the zipped api content + APIZipURL *string `json:"apiZipUrl,omitempty"` + // DeploymentTitle - A title to label the deployment + DeploymentTitle *string `json:"deploymentTitle,omitempty"` + // Provider - The provider submitting this deployment + Provider *string `json:"provider,omitempty"` + // FunctionLanguage - The language of the api content, if it exists + FunctionLanguage *string `json:"functionLanguage,omitempty"` } -// StaticSiteResetPropertiesARMResource static Site Reset Properties ARM resource. -type StaticSiteResetPropertiesARMResource struct { - // StaticSiteResetPropertiesARMResourceProperties - StaticSiteResetPropertiesARMResource resource specific properties - *StaticSiteResetPropertiesARMResourceProperties `json:"properties,omitempty"` +// StaticSiteZipDeploymentARMResource static site zip deployment ARM resource. +type StaticSiteZipDeploymentARMResource struct { + // StaticSiteZipDeployment - Core resource properties + *StaticSiteZipDeployment `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -28129,20 +31250,20 @@ type StaticSiteResetPropertiesARMResource struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for StaticSiteResetPropertiesARMResource. -func (ssrpar StaticSiteResetPropertiesARMResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StaticSiteZipDeploymentARMResource. +func (sszdar StaticSiteZipDeploymentARMResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ssrpar.StaticSiteResetPropertiesARMResourceProperties != nil { - objectMap["properties"] = ssrpar.StaticSiteResetPropertiesARMResourceProperties + if sszdar.StaticSiteZipDeployment != nil { + objectMap["properties"] = sszdar.StaticSiteZipDeployment } - if ssrpar.Kind != nil { - objectMap["kind"] = ssrpar.Kind + if sszdar.Kind != nil { + objectMap["kind"] = sszdar.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for StaticSiteResetPropertiesARMResource struct. -func (ssrpar *StaticSiteResetPropertiesARMResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for StaticSiteZipDeploymentARMResource struct. +func (sszdar *StaticSiteZipDeploymentARMResource) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -28152,12 +31273,12 @@ func (ssrpar *StaticSiteResetPropertiesARMResource) UnmarshalJSON(body []byte) e switch k { case "properties": if v != nil { - var staticSiteResetPropertiesARMResourceProperties StaticSiteResetPropertiesARMResourceProperties - err = json.Unmarshal(*v, &staticSiteResetPropertiesARMResourceProperties) + var staticSiteZipDeployment StaticSiteZipDeployment + err = json.Unmarshal(*v, &staticSiteZipDeployment) if err != nil { return err } - ssrpar.StaticSiteResetPropertiesARMResourceProperties = &staticSiteResetPropertiesARMResourceProperties + sszdar.StaticSiteZipDeployment = &staticSiteZipDeployment } case "id": if v != nil { @@ -28166,7 +31287,7 @@ func (ssrpar *StaticSiteResetPropertiesARMResource) UnmarshalJSON(body []byte) e if err != nil { return err } - ssrpar.ID = &ID + sszdar.ID = &ID } case "name": if v != nil { @@ -28175,7 +31296,7 @@ func (ssrpar *StaticSiteResetPropertiesARMResource) UnmarshalJSON(body []byte) e if err != nil { return err } - ssrpar.Name = &name + sszdar.Name = &name } case "kind": if v != nil { @@ -28184,7 +31305,7 @@ func (ssrpar *StaticSiteResetPropertiesARMResource) UnmarshalJSON(body []byte) e if err != nil { return err } - ssrpar.Kind = &kind + sszdar.Kind = &kind } case "type": if v != nil { @@ -28193,7 +31314,7 @@ func (ssrpar *StaticSiteResetPropertiesARMResource) UnmarshalJSON(body []byte) e if err != nil { return err } - ssrpar.Type = &typeVar + sszdar.Type = &typeVar } } } @@ -28201,15 +31322,6 @@ func (ssrpar *StaticSiteResetPropertiesARMResource) UnmarshalJSON(body []byte) e return nil } -// StaticSiteResetPropertiesARMResourceProperties staticSiteResetPropertiesARMResource resource specific -// properties -type StaticSiteResetPropertiesARMResourceProperties struct { - // RepositoryToken - The token which proves admin privileges to the repository. - RepositoryToken *string `json:"repositoryToken,omitempty"` - // ShouldUpdateRepository - Determines whether the repository should be updated with the new properties. - ShouldUpdateRepository *bool `json:"shouldUpdateRepository,omitempty"` -} - // StaticSitesApproveOrRejectPrivateEndpointConnectionFuture an abstraction for monitoring and retrieving // the results of a long-running operation. type StaticSitesApproveOrRejectPrivateEndpointConnectionFuture struct { @@ -28604,6 +31716,92 @@ func (future *StaticSitesDetachStaticSiteFuture) result(client StaticSitesClient return } +// StaticSitesLinkBackendFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type StaticSitesLinkBackendFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(StaticSitesClient) (StaticSiteLinkedBackendARMResource, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *StaticSitesLinkBackendFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for StaticSitesLinkBackendFuture.Result. +func (future *StaticSitesLinkBackendFuture) result(client StaticSitesClient) (sslbar StaticSiteLinkedBackendARMResource, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesLinkBackendFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + sslbar.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.StaticSitesLinkBackendFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if sslbar.Response.Response, err = future.GetResult(sender); err == nil && sslbar.Response.Response.StatusCode != http.StatusNoContent { + sslbar, err = client.LinkBackendResponder(sslbar.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesLinkBackendFuture", "Result", sslbar.Response.Response, "Failure responding to request") + } + } + return +} + +// StaticSitesLinkBackendToBuildFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type StaticSitesLinkBackendToBuildFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(StaticSitesClient) (StaticSiteLinkedBackendARMResource, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *StaticSitesLinkBackendToBuildFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for StaticSitesLinkBackendToBuildFuture.Result. +func (future *StaticSitesLinkBackendToBuildFuture) result(client StaticSitesClient) (sslbar StaticSiteLinkedBackendARMResource, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesLinkBackendToBuildFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + sslbar.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.StaticSitesLinkBackendToBuildFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if sslbar.Response.Response, err = future.GetResult(sender); err == nil && sslbar.Response.Response.StatusCode != http.StatusNoContent { + sslbar, err = client.LinkBackendToBuildResponder(sslbar.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesLinkBackendToBuildFuture", "Result", sslbar.Response.Response, "Failure responding to request") + } + } + return +} + // StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildFuture an abstraction for monitoring and // retrieving the results of a long-running operation. type StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildFuture struct { @@ -28653,11 +31851,91 @@ type StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. - Result func(StaticSitesClient) (StaticSiteUserProvidedFunctionAppARMResource, error) + Result func(StaticSitesClient) (StaticSiteUserProvidedFunctionAppARMResource, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteFuture.Result. +func (future *StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteFuture) result(client StaticSitesClient) (ssupfaar StaticSiteUserProvidedFunctionAppARMResource, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ssupfaar.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ssupfaar.Response.Response, err = future.GetResult(sender); err == nil && ssupfaar.Response.Response.StatusCode != http.StatusNoContent { + ssupfaar, err = client.RegisterUserProvidedFunctionAppWithStaticSiteResponder(ssupfaar.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteFuture", "Result", ssupfaar.Response.Response, "Failure responding to request") + } + } + return +} + +// StaticSitesValidateBackendForBuildFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type StaticSitesValidateBackendForBuildFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(StaticSitesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *StaticSitesValidateBackendForBuildFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for StaticSitesValidateBackendForBuildFuture.Result. +func (future *StaticSitesValidateBackendForBuildFuture) result(client StaticSitesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesValidateBackendForBuildFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.StaticSitesValidateBackendForBuildFuture") + return + } + ar.Response = future.Response() + return +} + +// StaticSitesValidateBackendFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type StaticSitesValidateBackendFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(StaticSitesClient) (autorest.Response, error) } // UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteFuture) UnmarshalJSON(body []byte) error { +func (future *StaticSitesValidateBackendFuture) UnmarshalJSON(body []byte) error { var azFuture azure.Future if err := json.Unmarshal(body, &azFuture); err != nil { return err @@ -28667,26 +31945,20 @@ func (future *StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteFuture) Un return nil } -// result is the default implementation for StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteFuture.Result. -func (future *StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteFuture) result(client StaticSitesClient) (ssupfaar StaticSiteUserProvidedFunctionAppARMResource, err error) { +// result is the default implementation for StaticSitesValidateBackendFuture.Result. +func (future *StaticSitesValidateBackendFuture) result(client StaticSitesClient) (ar autorest.Response, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "web.StaticSitesValidateBackendFuture", "Result", future.Response(), "Polling failure") return } if !done { - ssupfaar.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("web.StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteFuture") + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.StaticSitesValidateBackendFuture") return } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ssupfaar.Response.Response, err = future.GetResult(sender); err == nil && ssupfaar.Response.Response.StatusCode != http.StatusNoContent { - ssupfaar, err = client.RegisterUserProvidedFunctionAppWithStaticSiteResponder(ssupfaar.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteFuture", "Result", ssupfaar.Response.Response, "Failure responding to request") - } - } + ar.Response = future.Response() return } @@ -28727,11 +31999,528 @@ func (future *StaticSitesValidateCustomDomainCanBeAddedToStaticSiteFuture) resul return } -// StaticSitesWorkflowPreview preview for the Static Site Workflow to be generated -type StaticSitesWorkflowPreview struct { +// StaticSitesWorkflowPreview preview for the Static Site Workflow to be generated +type StaticSitesWorkflowPreview struct { + autorest.Response `json:"-"` + // StaticSitesWorkflowPreviewProperties - StaticSitesWorkflowPreview resource specific properties + *StaticSitesWorkflowPreviewProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for StaticSitesWorkflowPreview. +func (sswp StaticSitesWorkflowPreview) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sswp.StaticSitesWorkflowPreviewProperties != nil { + objectMap["properties"] = sswp.StaticSitesWorkflowPreviewProperties + } + if sswp.Kind != nil { + objectMap["kind"] = sswp.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for StaticSitesWorkflowPreview struct. +func (sswp *StaticSitesWorkflowPreview) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var staticSitesWorkflowPreviewProperties StaticSitesWorkflowPreviewProperties + err = json.Unmarshal(*v, &staticSitesWorkflowPreviewProperties) + if err != nil { + return err + } + sswp.StaticSitesWorkflowPreviewProperties = &staticSitesWorkflowPreviewProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sswp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sswp.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + sswp.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sswp.Type = &typeVar + } + } + } + + return nil +} + +// StaticSitesWorkflowPreviewProperties staticSitesWorkflowPreview resource specific properties +type StaticSitesWorkflowPreviewProperties struct { + // Path - READ-ONLY; The path for the workflow file to be generated + Path *string `json:"path,omitempty"` + // Contents - READ-ONLY; The contents for the workflow file to be generated + Contents *string `json:"contents,omitempty"` +} + +// MarshalJSON is the custom marshaler for StaticSitesWorkflowPreviewProperties. +func (sswp StaticSitesWorkflowPreviewProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// StaticSitesWorkflowPreviewRequest request entity for previewing the Static Site workflow +type StaticSitesWorkflowPreviewRequest struct { + // StaticSitesWorkflowPreviewRequestProperties - StaticSitesWorkflowPreviewRequest resource specific properties + *StaticSitesWorkflowPreviewRequestProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for StaticSitesWorkflowPreviewRequest. +func (sswpr StaticSitesWorkflowPreviewRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sswpr.StaticSitesWorkflowPreviewRequestProperties != nil { + objectMap["properties"] = sswpr.StaticSitesWorkflowPreviewRequestProperties + } + if sswpr.Kind != nil { + objectMap["kind"] = sswpr.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for StaticSitesWorkflowPreviewRequest struct. +func (sswpr *StaticSitesWorkflowPreviewRequest) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var staticSitesWorkflowPreviewRequestProperties StaticSitesWorkflowPreviewRequestProperties + err = json.Unmarshal(*v, &staticSitesWorkflowPreviewRequestProperties) + if err != nil { + return err + } + sswpr.StaticSitesWorkflowPreviewRequestProperties = &staticSitesWorkflowPreviewRequestProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sswpr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sswpr.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + sswpr.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sswpr.Type = &typeVar + } + } + } + + return nil +} + +// StaticSitesWorkflowPreviewRequestProperties staticSitesWorkflowPreviewRequest resource specific +// properties +type StaticSitesWorkflowPreviewRequestProperties struct { + // RepositoryURL - URL for the repository of the static site. + RepositoryURL *string `json:"repositoryUrl,omitempty"` + // Branch - The target branch in the repository. + Branch *string `json:"branch,omitempty"` + // BuildProperties - Build properties to configure on the repository. + BuildProperties *StaticSiteBuildProperties `json:"buildProperties,omitempty"` +} + +// Status identify the status of the most severe insight generated by the detector. +type Status struct { + // Message - Descriptive message. + Message *string `json:"message,omitempty"` + // StatusID - Level of the most severe insight generated by the detector. Possible values include: 'InsightStatusCritical', 'InsightStatusWarning', 'InsightStatusInfo', 'InsightStatusSuccess', 'InsightStatusNone' + StatusID InsightStatus `json:"statusId,omitempty"` +} + +// StatusCodesBasedTrigger trigger based on status code. +type StatusCodesBasedTrigger struct { + // Status - HTTP status code. + Status *int32 `json:"status,omitempty"` + // SubStatus - Request Sub Status. + SubStatus *int32 `json:"subStatus,omitempty"` + // Win32Status - Win32 error code. + Win32Status *int32 `json:"win32Status,omitempty"` + // Count - Request Count. + Count *int32 `json:"count,omitempty"` + // TimeInterval - Time interval. + TimeInterval *string `json:"timeInterval,omitempty"` + // Path - Request Path + Path *string `json:"path,omitempty"` +} + +// StatusCodesRangeBasedTrigger trigger based on range of status codes. +type StatusCodesRangeBasedTrigger struct { + // StatusCodes - HTTP status code. + StatusCodes *string `json:"statusCodes,omitempty"` + Path *string `json:"path,omitempty"` + // Count - Request Count. + Count *int32 `json:"count,omitempty"` + // TimeInterval - Time interval. + TimeInterval *string `json:"timeInterval,omitempty"` +} + +// StorageMigrationOptions options for app content migration. +type StorageMigrationOptions struct { + // StorageMigrationOptionsProperties - StorageMigrationOptions resource specific properties + *StorageMigrationOptionsProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for StorageMigrationOptions. +func (smo StorageMigrationOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if smo.StorageMigrationOptionsProperties != nil { + objectMap["properties"] = smo.StorageMigrationOptionsProperties + } + if smo.Kind != nil { + objectMap["kind"] = smo.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for StorageMigrationOptions struct. +func (smo *StorageMigrationOptions) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var storageMigrationOptionsProperties StorageMigrationOptionsProperties + err = json.Unmarshal(*v, &storageMigrationOptionsProperties) + if err != nil { + return err + } + smo.StorageMigrationOptionsProperties = &storageMigrationOptionsProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + smo.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + smo.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + smo.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + smo.Type = &typeVar + } + } + } + + return nil +} + +// StorageMigrationOptionsProperties storageMigrationOptions resource specific properties +type StorageMigrationOptionsProperties struct { + // AzurefilesConnectionString - AzureFiles connection string. + AzurefilesConnectionString *string `json:"azurefilesConnectionString,omitempty"` + // AzurefilesShare - AzureFiles share. + AzurefilesShare *string `json:"azurefilesShare,omitempty"` + // SwitchSiteAfterMigration - trueif the app should be switched over; otherwise, false. + SwitchSiteAfterMigration *bool `json:"switchSiteAfterMigration,omitempty"` + // BlockWriteAccessToSite - true if the app should be read only during copy operation; otherwise, false. + BlockWriteAccessToSite *bool `json:"blockWriteAccessToSite,omitempty"` +} + +// StorageMigrationResponse response for a migration of app content request. +type StorageMigrationResponse struct { + autorest.Response `json:"-"` + // StorageMigrationResponseProperties - StorageMigrationResponse resource specific properties + *StorageMigrationResponseProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for StorageMigrationResponse. +func (smr StorageMigrationResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if smr.StorageMigrationResponseProperties != nil { + objectMap["properties"] = smr.StorageMigrationResponseProperties + } + if smr.Kind != nil { + objectMap["kind"] = smr.Kind + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for StorageMigrationResponse struct. +func (smr *StorageMigrationResponse) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var storageMigrationResponseProperties StorageMigrationResponseProperties + err = json.Unmarshal(*v, &storageMigrationResponseProperties) + if err != nil { + return err + } + smr.StorageMigrationResponseProperties = &storageMigrationResponseProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + smr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + smr.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + smr.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + smr.Type = &typeVar + } + } + } + + return nil +} + +// StorageMigrationResponseProperties storageMigrationResponse resource specific properties +type StorageMigrationResponseProperties struct { + // OperationID - READ-ONLY; When server starts the migration process, it will return an operation ID identifying that particular migration operation. + OperationID *string `json:"operationId,omitempty"` +} + +// MarshalJSON is the custom marshaler for StorageMigrationResponseProperties. +func (smr StorageMigrationResponseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// String ... +type String struct { + autorest.Response `json:"-"` + Value *string `json:"value,omitempty"` +} + +// StringDictionary string dictionary resource. +type StringDictionary struct { + autorest.Response `json:"-"` + // Properties - Settings. + Properties map[string]*string `json:"properties"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for StringDictionary. +func (sd StringDictionary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sd.Properties != nil { + objectMap["properties"] = sd.Properties + } + if sd.Kind != nil { + objectMap["kind"] = sd.Kind + } + return json.Marshal(objectMap) +} + +// StringList string list resource. +type StringList struct { + autorest.Response `json:"-"` + // Properties - List of string resources. + Properties *[]string `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for StringList. +func (sl StringList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sl.Properties != nil { + objectMap["properties"] = sl.Properties + } + if sl.Kind != nil { + objectMap["kind"] = sl.Kind + } + return json.Marshal(objectMap) +} + +// SubResource the sub resource type. +type SubResource struct { + // ID - READ-ONLY; The resource id. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for SubResource. +func (sr SubResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// SupportTopic defines a unique Support Topic +type SupportTopic struct { + // ID - READ-ONLY; Support Topic Id + ID *string `json:"id,omitempty"` + // PesID - READ-ONLY; Unique resource Id + PesID *string `json:"pesId,omitempty"` +} + +// MarshalJSON is the custom marshaler for SupportTopic. +func (st SupportTopic) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// SwiftVirtualNetwork swift Virtual Network Contract. This is used to enable the new Swift way of doing +// virtual network integration. +type SwiftVirtualNetwork struct { autorest.Response `json:"-"` - // StaticSitesWorkflowPreviewProperties - StaticSitesWorkflowPreview resource specific properties - *StaticSitesWorkflowPreviewProperties `json:"properties,omitempty"` + // SwiftVirtualNetworkProperties - SwiftVirtualNetwork resource specific properties + *SwiftVirtualNetworkProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -28742,20 +32531,20 @@ type StaticSitesWorkflowPreview struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for StaticSitesWorkflowPreview. -func (sswp StaticSitesWorkflowPreview) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for SwiftVirtualNetwork. +func (svn SwiftVirtualNetwork) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if sswp.StaticSitesWorkflowPreviewProperties != nil { - objectMap["properties"] = sswp.StaticSitesWorkflowPreviewProperties + if svn.SwiftVirtualNetworkProperties != nil { + objectMap["properties"] = svn.SwiftVirtualNetworkProperties } - if sswp.Kind != nil { - objectMap["kind"] = sswp.Kind + if svn.Kind != nil { + objectMap["kind"] = svn.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for StaticSitesWorkflowPreview struct. -func (sswp *StaticSitesWorkflowPreview) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for SwiftVirtualNetwork struct. +func (svn *SwiftVirtualNetwork) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -28765,12 +32554,12 @@ func (sswp *StaticSitesWorkflowPreview) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var staticSitesWorkflowPreviewProperties StaticSitesWorkflowPreviewProperties - err = json.Unmarshal(*v, &staticSitesWorkflowPreviewProperties) + var swiftVirtualNetworkProperties SwiftVirtualNetworkProperties + err = json.Unmarshal(*v, &swiftVirtualNetworkProperties) if err != nil { return err } - sswp.StaticSitesWorkflowPreviewProperties = &staticSitesWorkflowPreviewProperties + svn.SwiftVirtualNetworkProperties = &swiftVirtualNetworkProperties } case "id": if v != nil { @@ -28779,7 +32568,7 @@ func (sswp *StaticSitesWorkflowPreview) UnmarshalJSON(body []byte) error { if err != nil { return err } - sswp.ID = &ID + svn.ID = &ID } case "name": if v != nil { @@ -28788,7 +32577,7 @@ func (sswp *StaticSitesWorkflowPreview) UnmarshalJSON(body []byte) error { if err != nil { return err } - sswp.Name = &name + svn.Name = &name } case "kind": if v != nil { @@ -28797,7 +32586,7 @@ func (sswp *StaticSitesWorkflowPreview) UnmarshalJSON(body []byte) error { if err != nil { return err } - sswp.Kind = &kind + svn.Kind = &kind } case "type": if v != nil { @@ -28806,7 +32595,7 @@ func (sswp *StaticSitesWorkflowPreview) UnmarshalJSON(body []byte) error { if err != nil { return err } - sswp.Type = &typeVar + svn.Type = &typeVar } } } @@ -28814,24 +32603,227 @@ func (sswp *StaticSitesWorkflowPreview) UnmarshalJSON(body []byte) error { return nil } -// StaticSitesWorkflowPreviewProperties staticSitesWorkflowPreview resource specific properties -type StaticSitesWorkflowPreviewProperties struct { - // Path - READ-ONLY; The path for the workflow file to be generated - Path *string `json:"path,omitempty"` - // Contents - READ-ONLY; The contents for the workflow file to be generated - Contents *string `json:"contents,omitempty"` +// SwiftVirtualNetworkProperties swiftVirtualNetwork resource specific properties +type SwiftVirtualNetworkProperties struct { + // SubnetResourceID - The Virtual Network subnet's resource ID. This is the subnet that this Web App will join. This subnet must have a delegation to Microsoft.Web/serverFarms defined first. + SubnetResourceID *string `json:"subnetResourceId,omitempty"` + // SwiftSupported - A flag that specifies if the scale unit this Web App is on supports Swift integration. + SwiftSupported *bool `json:"swiftSupported,omitempty"` } -// MarshalJSON is the custom marshaler for StaticSitesWorkflowPreviewProperties. -func (sswp StaticSitesWorkflowPreviewProperties) MarshalJSON() ([]byte, error) { +// Template container App versioned application definition. +// Defines the desired state of an immutable revision. +// Any changes to this section Will result in a new revision being created +type Template struct { + // RevisionSuffix - User friendly suffix that is appended to the revision name + RevisionSuffix *string `json:"revisionSuffix,omitempty"` + // Containers - List of container definitions for the Container App. + Containers *[]Container `json:"containers,omitempty"` + // Scale - Scaling properties for the Container App. + Scale *Scale `json:"scale,omitempty"` + // Dapr - Dapr configuration for the Container App. + Dapr *Dapr `json:"dapr,omitempty"` +} + +// TldLegalAgreement legal agreement for a top level domain. +type TldLegalAgreement struct { + // AgreementKey - Unique identifier for the agreement. + AgreementKey *string `json:"agreementKey,omitempty"` + // Title - Agreement title. + Title *string `json:"title,omitempty"` + // Content - Agreement details. + Content *string `json:"content,omitempty"` + // URL - URL where a copy of the agreement details is hosted. + URL *string `json:"url,omitempty"` +} + +// TldLegalAgreementCollection collection of top-level domain legal agreements. +type TldLegalAgreementCollection struct { + autorest.Response `json:"-"` + // Value - Collection of resources. + Value *[]TldLegalAgreement `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for TldLegalAgreementCollection. +func (tlac TldLegalAgreementCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if tlac.Value != nil { + objectMap["value"] = tlac.Value + } return json.Marshal(objectMap) } -// StaticSitesWorkflowPreviewRequest request entity for previewing the Static Site workflow -type StaticSitesWorkflowPreviewRequest struct { - // StaticSitesWorkflowPreviewRequestProperties - StaticSitesWorkflowPreviewRequest resource specific properties - *StaticSitesWorkflowPreviewRequestProperties `json:"properties,omitempty"` +// TldLegalAgreementCollectionIterator provides access to a complete listing of TldLegalAgreement values. +type TldLegalAgreementCollectionIterator struct { + i int + page TldLegalAgreementCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *TldLegalAgreementCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TldLegalAgreementCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *TldLegalAgreementCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter TldLegalAgreementCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter TldLegalAgreementCollectionIterator) Response() TldLegalAgreementCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter TldLegalAgreementCollectionIterator) Value() TldLegalAgreement { + if !iter.page.NotDone() { + return TldLegalAgreement{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the TldLegalAgreementCollectionIterator type. +func NewTldLegalAgreementCollectionIterator(page TldLegalAgreementCollectionPage) TldLegalAgreementCollectionIterator { + return TldLegalAgreementCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (tlac TldLegalAgreementCollection) IsEmpty() bool { + return tlac.Value == nil || len(*tlac.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (tlac TldLegalAgreementCollection) hasNextLink() bool { + return tlac.NextLink != nil && len(*tlac.NextLink) != 0 +} + +// tldLegalAgreementCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (tlac TldLegalAgreementCollection) tldLegalAgreementCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !tlac.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(tlac.NextLink))) +} + +// TldLegalAgreementCollectionPage contains a page of TldLegalAgreement values. +type TldLegalAgreementCollectionPage struct { + fn func(context.Context, TldLegalAgreementCollection) (TldLegalAgreementCollection, error) + tlac TldLegalAgreementCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *TldLegalAgreementCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TldLegalAgreementCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.tlac) + if err != nil { + return err + } + page.tlac = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *TldLegalAgreementCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page TldLegalAgreementCollectionPage) NotDone() bool { + return !page.tlac.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page TldLegalAgreementCollectionPage) Response() TldLegalAgreementCollection { + return page.tlac +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page TldLegalAgreementCollectionPage) Values() []TldLegalAgreement { + if page.tlac.IsEmpty() { + return nil + } + return *page.tlac.Value +} + +// Creates a new instance of the TldLegalAgreementCollectionPage type. +func NewTldLegalAgreementCollectionPage(cur TldLegalAgreementCollection, getNextPage func(context.Context, TldLegalAgreementCollection) (TldLegalAgreementCollection, error)) TldLegalAgreementCollectionPage { + return TldLegalAgreementCollectionPage{ + fn: getNextPage, + tlac: cur, + } +} + +// TokenStore the configuration settings of the token store. +type TokenStore struct { + // Enabled - true to durably store platform-specific security tokens that are obtained during login flows; otherwise, false. + // The default is false. + Enabled *bool `json:"enabled,omitempty"` + // TokenRefreshExtensionHours - The number of hours after session token expiration that a session token can be used to + // call the token refresh API. The default is 72 hours. + TokenRefreshExtensionHours *float64 `json:"tokenRefreshExtensionHours,omitempty"` + // FileSystem - The configuration settings of the storage of the tokens if a file system is used. + FileSystem *FileSystemTokenStore `json:"fileSystem,omitempty"` + // AzureBlobStorage - The configuration settings of the storage of the tokens if blob storage is used. + AzureBlobStorage *BlobStorageTokenStore `json:"azureBlobStorage,omitempty"` +} + +// TopLevelDomain a top level domain object. +type TopLevelDomain struct { + autorest.Response `json:"-"` + // TopLevelDomainProperties - TopLevelDomain resource specific properties + *TopLevelDomainProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -28842,20 +32834,20 @@ type StaticSitesWorkflowPreviewRequest struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for StaticSitesWorkflowPreviewRequest. -func (sswpr StaticSitesWorkflowPreviewRequest) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for TopLevelDomain. +func (tld TopLevelDomain) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if sswpr.StaticSitesWorkflowPreviewRequestProperties != nil { - objectMap["properties"] = sswpr.StaticSitesWorkflowPreviewRequestProperties + if tld.TopLevelDomainProperties != nil { + objectMap["properties"] = tld.TopLevelDomainProperties } - if sswpr.Kind != nil { - objectMap["kind"] = sswpr.Kind + if tld.Kind != nil { + objectMap["kind"] = tld.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for StaticSitesWorkflowPreviewRequest struct. -func (sswpr *StaticSitesWorkflowPreviewRequest) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for TopLevelDomain struct. +func (tld *TopLevelDomain) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -28865,12 +32857,12 @@ func (sswpr *StaticSitesWorkflowPreviewRequest) UnmarshalJSON(body []byte) error switch k { case "properties": if v != nil { - var staticSitesWorkflowPreviewRequestProperties StaticSitesWorkflowPreviewRequestProperties - err = json.Unmarshal(*v, &staticSitesWorkflowPreviewRequestProperties) + var topLevelDomainProperties TopLevelDomainProperties + err = json.Unmarshal(*v, &topLevelDomainProperties) if err != nil { return err } - sswpr.StaticSitesWorkflowPreviewRequestProperties = &staticSitesWorkflowPreviewRequestProperties + tld.TopLevelDomainProperties = &topLevelDomainProperties } case "id": if v != nil { @@ -28879,7 +32871,7 @@ func (sswpr *StaticSitesWorkflowPreviewRequest) UnmarshalJSON(body []byte) error if err != nil { return err } - sswpr.ID = &ID + tld.ID = &ID } case "name": if v != nil { @@ -28888,7 +32880,7 @@ func (sswpr *StaticSitesWorkflowPreviewRequest) UnmarshalJSON(body []byte) error if err != nil { return err } - sswpr.Name = &name + tld.Name = &name } case "kind": if v != nil { @@ -28897,7 +32889,7 @@ func (sswpr *StaticSitesWorkflowPreviewRequest) UnmarshalJSON(body []byte) error if err != nil { return err } - sswpr.Kind = &kind + tld.Kind = &kind } case "type": if v != nil { @@ -28906,7 +32898,7 @@ func (sswpr *StaticSitesWorkflowPreviewRequest) UnmarshalJSON(body []byte) error if err != nil { return err } - sswpr.Type = &typeVar + tld.Type = &typeVar } } } @@ -28914,36 +32906,203 @@ func (sswpr *StaticSitesWorkflowPreviewRequest) UnmarshalJSON(body []byte) error return nil } -// StaticSitesWorkflowPreviewRequestProperties staticSitesWorkflowPreviewRequest resource specific -// properties -type StaticSitesWorkflowPreviewRequestProperties struct { - // RepositoryURL - URL for the repository of the static site. - RepositoryURL *string `json:"repositoryUrl,omitempty"` - // Branch - The target branch in the repository. - Branch *string `json:"branch,omitempty"` - // BuildProperties - Build properties to configure on the repository. - BuildProperties *StaticSiteBuildProperties `json:"buildProperties,omitempty"` +// TopLevelDomainAgreementOption options for retrieving the list of top level domain legal agreements. +type TopLevelDomainAgreementOption struct { + // IncludePrivacy - If true, then the list of agreements will include agreements for domain privacy as well; otherwise, false. + IncludePrivacy *bool `json:"includePrivacy,omitempty"` + // ForTransfer - If true, then the list of agreements will include agreements for domain transfer as well; otherwise, false. + ForTransfer *bool `json:"forTransfer,omitempty"` } -// StaticSiteTemplateOptions template Options for the static site. -type StaticSiteTemplateOptions struct { - // TemplateRepositoryURL - URL of the template repository. The newly generated repository will be based on this one. - TemplateRepositoryURL *string `json:"templateRepositoryUrl,omitempty"` - // Owner - Owner of the newly generated repository. - Owner *string `json:"owner,omitempty"` - // RepositoryName - Name of the newly generated repository. - RepositoryName *string `json:"repositoryName,omitempty"` - // Description - Description of the newly generated repository. - Description *string `json:"description,omitempty"` - // IsPrivate - Whether or not the newly generated repository is a private repository. Defaults to false (i.e. public). - IsPrivate *bool `json:"isPrivate,omitempty"` +// TopLevelDomainCollection collection of Top-level domains. +type TopLevelDomainCollection struct { + autorest.Response `json:"-"` + // Value - Collection of resources. + Value *[]TopLevelDomain `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for TopLevelDomainCollection. +func (tldc TopLevelDomainCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tldc.Value != nil { + objectMap["value"] = tldc.Value + } + return json.Marshal(objectMap) +} + +// TopLevelDomainCollectionIterator provides access to a complete listing of TopLevelDomain values. +type TopLevelDomainCollectionIterator struct { + i int + page TopLevelDomainCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *TopLevelDomainCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TopLevelDomainCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *TopLevelDomainCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter TopLevelDomainCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter TopLevelDomainCollectionIterator) Response() TopLevelDomainCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter TopLevelDomainCollectionIterator) Value() TopLevelDomain { + if !iter.page.NotDone() { + return TopLevelDomain{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the TopLevelDomainCollectionIterator type. +func NewTopLevelDomainCollectionIterator(page TopLevelDomainCollectionPage) TopLevelDomainCollectionIterator { + return TopLevelDomainCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (tldc TopLevelDomainCollection) IsEmpty() bool { + return tldc.Value == nil || len(*tldc.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (tldc TopLevelDomainCollection) hasNextLink() bool { + return tldc.NextLink != nil && len(*tldc.NextLink) != 0 +} + +// topLevelDomainCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (tldc TopLevelDomainCollection) topLevelDomainCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !tldc.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(tldc.NextLink))) +} + +// TopLevelDomainCollectionPage contains a page of TopLevelDomain values. +type TopLevelDomainCollectionPage struct { + fn func(context.Context, TopLevelDomainCollection) (TopLevelDomainCollection, error) + tldc TopLevelDomainCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *TopLevelDomainCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TopLevelDomainCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.tldc) + if err != nil { + return err + } + page.tldc = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *TopLevelDomainCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page TopLevelDomainCollectionPage) NotDone() bool { + return !page.tldc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page TopLevelDomainCollectionPage) Response() TopLevelDomainCollection { + return page.tldc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page TopLevelDomainCollectionPage) Values() []TopLevelDomain { + if page.tldc.IsEmpty() { + return nil + } + return *page.tldc.Value +} + +// Creates a new instance of the TopLevelDomainCollectionPage type. +func NewTopLevelDomainCollectionPage(cur TopLevelDomainCollection, getNextPage func(context.Context, TopLevelDomainCollection) (TopLevelDomainCollection, error)) TopLevelDomainCollectionPage { + return TopLevelDomainCollectionPage{ + fn: getNextPage, + tldc: cur, + } +} + +// TopLevelDomainProperties topLevelDomain resource specific properties +type TopLevelDomainProperties struct { + // Privacy - If true, then the top level domain supports domain privacy; otherwise, false. + Privacy *bool `json:"privacy,omitempty"` +} + +// TrafficWeight traffic weight assigned to a revision +type TrafficWeight struct { + // RevisionName - Name of a revision + RevisionName *string `json:"revisionName,omitempty"` + // Weight - Traffic weight assigned to a revision + Weight *int32 `json:"weight,omitempty"` + // LatestRevision - Indicates that the traffic weight belongs to a latest stable revision + LatestRevision *bool `json:"latestRevision,omitempty"` } -// StaticSiteUserARMResource static Site User ARM resource. -type StaticSiteUserARMResource struct { +// TriggeredJobHistory triggered Web Job History. List of Triggered Web Job Run Information elements. +type TriggeredJobHistory struct { autorest.Response `json:"-"` - // StaticSiteUserARMResourceProperties - StaticSiteUserARMResource resource specific properties - *StaticSiteUserARMResourceProperties `json:"properties,omitempty"` + // TriggeredJobHistoryProperties - TriggeredJobHistory resource specific properties + *TriggeredJobHistoryProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -28954,20 +33113,20 @@ type StaticSiteUserARMResource struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for StaticSiteUserARMResource. -func (ssuar StaticSiteUserARMResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for TriggeredJobHistory. +func (tjh TriggeredJobHistory) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ssuar.StaticSiteUserARMResourceProperties != nil { - objectMap["properties"] = ssuar.StaticSiteUserARMResourceProperties + if tjh.TriggeredJobHistoryProperties != nil { + objectMap["properties"] = tjh.TriggeredJobHistoryProperties } - if ssuar.Kind != nil { - objectMap["kind"] = ssuar.Kind + if tjh.Kind != nil { + objectMap["kind"] = tjh.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for StaticSiteUserARMResource struct. -func (ssuar *StaticSiteUserARMResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for TriggeredJobHistory struct. +func (tjh *TriggeredJobHistory) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -28977,12 +33136,12 @@ func (ssuar *StaticSiteUserARMResource) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var staticSiteUserARMResourceProperties StaticSiteUserARMResourceProperties - err = json.Unmarshal(*v, &staticSiteUserARMResourceProperties) + var triggeredJobHistoryProperties TriggeredJobHistoryProperties + err = json.Unmarshal(*v, &triggeredJobHistoryProperties) if err != nil { return err } - ssuar.StaticSiteUserARMResourceProperties = &staticSiteUserARMResourceProperties + tjh.TriggeredJobHistoryProperties = &triggeredJobHistoryProperties } case "id": if v != nil { @@ -28991,7 +33150,7 @@ func (ssuar *StaticSiteUserARMResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ssuar.ID = &ID + tjh.ID = &ID } case "name": if v != nil { @@ -29000,7 +33159,7 @@ func (ssuar *StaticSiteUserARMResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ssuar.Name = &name + tjh.Name = &name } case "kind": if v != nil { @@ -29009,7 +33168,7 @@ func (ssuar *StaticSiteUserARMResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ssuar.Kind = &kind + tjh.Kind = &kind } case "type": if v != nil { @@ -29018,7 +33177,7 @@ func (ssuar *StaticSiteUserARMResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ssuar.Type = &typeVar + tjh.Type = &typeVar } } } @@ -29026,57 +33185,36 @@ func (ssuar *StaticSiteUserARMResource) UnmarshalJSON(body []byte) error { return nil } -// StaticSiteUserARMResourceProperties staticSiteUserARMResource resource specific properties -type StaticSiteUserARMResourceProperties struct { - // Provider - READ-ONLY; The identity provider for the static site user. - Provider *string `json:"provider,omitempty"` - // UserID - READ-ONLY; The user id for the static site user. - UserID *string `json:"userId,omitempty"` - // DisplayName - READ-ONLY; The display name for the static site user. - DisplayName *string `json:"displayName,omitempty"` - // Roles - The roles for the static site user, in free-form string format - Roles *string `json:"roles,omitempty"` -} - -// MarshalJSON is the custom marshaler for StaticSiteUserARMResourceProperties. -func (ssuar StaticSiteUserARMResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ssuar.Roles != nil { - objectMap["roles"] = ssuar.Roles - } - return json.Marshal(objectMap) -} - -// StaticSiteUserCollection collection of static site custom users. -type StaticSiteUserCollection struct { +// TriggeredJobHistoryCollection collection of Kudu continuous web job information elements. +type TriggeredJobHistoryCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]StaticSiteUserARMResource `json:"value,omitempty"` + Value *[]TriggeredJobHistory `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for StaticSiteUserCollection. -func (ssuc StaticSiteUserCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for TriggeredJobHistoryCollection. +func (tjhc TriggeredJobHistoryCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ssuc.Value != nil { - objectMap["value"] = ssuc.Value + if tjhc.Value != nil { + objectMap["value"] = tjhc.Value } return json.Marshal(objectMap) } -// StaticSiteUserCollectionIterator provides access to a complete listing of StaticSiteUserARMResource +// TriggeredJobHistoryCollectionIterator provides access to a complete listing of TriggeredJobHistory // values. -type StaticSiteUserCollectionIterator struct { +type TriggeredJobHistoryCollectionIterator struct { i int - page StaticSiteUserCollectionPage + page TriggeredJobHistoryCollectionPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *StaticSiteUserCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *TriggeredJobHistoryCollectionIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteUserCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/TriggeredJobHistoryCollectionIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -29101,67 +33239,67 @@ func (iter *StaticSiteUserCollectionIterator) NextWithContext(ctx context.Contex // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *StaticSiteUserCollectionIterator) Next() error { +func (iter *TriggeredJobHistoryCollectionIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter StaticSiteUserCollectionIterator) NotDone() bool { +func (iter TriggeredJobHistoryCollectionIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter StaticSiteUserCollectionIterator) Response() StaticSiteUserCollection { +func (iter TriggeredJobHistoryCollectionIterator) Response() TriggeredJobHistoryCollection { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter StaticSiteUserCollectionIterator) Value() StaticSiteUserARMResource { +func (iter TriggeredJobHistoryCollectionIterator) Value() TriggeredJobHistory { if !iter.page.NotDone() { - return StaticSiteUserARMResource{} + return TriggeredJobHistory{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the StaticSiteUserCollectionIterator type. -func NewStaticSiteUserCollectionIterator(page StaticSiteUserCollectionPage) StaticSiteUserCollectionIterator { - return StaticSiteUserCollectionIterator{page: page} +// Creates a new instance of the TriggeredJobHistoryCollectionIterator type. +func NewTriggeredJobHistoryCollectionIterator(page TriggeredJobHistoryCollectionPage) TriggeredJobHistoryCollectionIterator { + return TriggeredJobHistoryCollectionIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (ssuc StaticSiteUserCollection) IsEmpty() bool { - return ssuc.Value == nil || len(*ssuc.Value) == 0 +func (tjhc TriggeredJobHistoryCollection) IsEmpty() bool { + return tjhc.Value == nil || len(*tjhc.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (ssuc StaticSiteUserCollection) hasNextLink() bool { - return ssuc.NextLink != nil && len(*ssuc.NextLink) != 0 +func (tjhc TriggeredJobHistoryCollection) hasNextLink() bool { + return tjhc.NextLink != nil && len(*tjhc.NextLink) != 0 } -// staticSiteUserCollectionPreparer prepares a request to retrieve the next set of results. +// triggeredJobHistoryCollectionPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (ssuc StaticSiteUserCollection) staticSiteUserCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !ssuc.hasNextLink() { +func (tjhc TriggeredJobHistoryCollection) triggeredJobHistoryCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !tjhc.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(ssuc.NextLink))) + autorest.WithBaseURL(to.String(tjhc.NextLink))) } -// StaticSiteUserCollectionPage contains a page of StaticSiteUserARMResource values. -type StaticSiteUserCollectionPage struct { - fn func(context.Context, StaticSiteUserCollection) (StaticSiteUserCollection, error) - ssuc StaticSiteUserCollection +// TriggeredJobHistoryCollectionPage contains a page of TriggeredJobHistory values. +type TriggeredJobHistoryCollectionPage struct { + fn func(context.Context, TriggeredJobHistoryCollection) (TriggeredJobHistoryCollection, error) + tjhc TriggeredJobHistoryCollection } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *StaticSiteUserCollectionPage) NextWithContext(ctx context.Context) (err error) { +func (page *TriggeredJobHistoryCollectionPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteUserCollectionPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/TriggeredJobHistoryCollectionPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -29171,11 +33309,11 @@ func (page *StaticSiteUserCollectionPage) NextWithContext(ctx context.Context) ( }() } for { - next, err := page.fn(ctx, page.ssuc) + next, err := page.fn(ctx, page.tjhc) if err != nil { return err } - page.ssuc = next + page.tjhc = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -29186,40 +33324,73 @@ func (page *StaticSiteUserCollectionPage) NextWithContext(ctx context.Context) ( // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *StaticSiteUserCollectionPage) Next() error { +func (page *TriggeredJobHistoryCollectionPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page StaticSiteUserCollectionPage) NotDone() bool { - return !page.ssuc.IsEmpty() +func (page TriggeredJobHistoryCollectionPage) NotDone() bool { + return !page.tjhc.IsEmpty() } // Response returns the raw server response from the last page request. -func (page StaticSiteUserCollectionPage) Response() StaticSiteUserCollection { - return page.ssuc +func (page TriggeredJobHistoryCollectionPage) Response() TriggeredJobHistoryCollection { + return page.tjhc } // Values returns the slice of values for the current page or nil if there are no values. -func (page StaticSiteUserCollectionPage) Values() []StaticSiteUserARMResource { - if page.ssuc.IsEmpty() { +func (page TriggeredJobHistoryCollectionPage) Values() []TriggeredJobHistory { + if page.tjhc.IsEmpty() { return nil } - return *page.ssuc.Value + return *page.tjhc.Value } -// Creates a new instance of the StaticSiteUserCollectionPage type. -func NewStaticSiteUserCollectionPage(cur StaticSiteUserCollection, getNextPage func(context.Context, StaticSiteUserCollection) (StaticSiteUserCollection, error)) StaticSiteUserCollectionPage { - return StaticSiteUserCollectionPage{ +// Creates a new instance of the TriggeredJobHistoryCollectionPage type. +func NewTriggeredJobHistoryCollectionPage(cur TriggeredJobHistoryCollection, getNextPage func(context.Context, TriggeredJobHistoryCollection) (TriggeredJobHistoryCollection, error)) TriggeredJobHistoryCollectionPage { + return TriggeredJobHistoryCollectionPage{ fn: getNextPage, - ssuc: cur, + tjhc: cur, } } -// StaticSiteUserInvitationRequestResource static sites user roles invitation resource. -type StaticSiteUserInvitationRequestResource struct { - // StaticSiteUserInvitationRequestResourceProperties - StaticSiteUserInvitationRequestResource resource specific properties - *StaticSiteUserInvitationRequestResourceProperties `json:"properties,omitempty"` +// TriggeredJobHistoryProperties triggeredJobHistory resource specific properties +type TriggeredJobHistoryProperties struct { + // Runs - List of triggered web job runs. + Runs *[]TriggeredJobRun `json:"runs,omitempty"` +} + +// TriggeredJobRun triggered Web Job Run Information. +type TriggeredJobRun struct { + // WebJobID - Job ID. + WebJobID *string `json:"web_job_id,omitempty"` + // WebJobName - Job name. + WebJobName *string `json:"web_job_name,omitempty"` + // Status - Job status. Possible values include: 'TriggeredWebJobStatusSuccess', 'TriggeredWebJobStatusFailed', 'TriggeredWebJobStatusError' + Status TriggeredWebJobStatus `json:"status,omitempty"` + // StartTime - Start time. + StartTime *date.Time `json:"start_time,omitempty"` + // EndTime - End time. + EndTime *date.Time `json:"end_time,omitempty"` + // Duration - Job duration. + Duration *string `json:"duration,omitempty"` + // OutputURL - Output URL. + OutputURL *string `json:"output_url,omitempty"` + // ErrorURL - Error URL. + ErrorURL *string `json:"error_url,omitempty"` + // URL - Job URL. + URL *string `json:"url,omitempty"` + // JobName - Job name. + JobName *string `json:"job_name,omitempty"` + // Trigger - Job trigger. + Trigger *string `json:"trigger,omitempty"` +} + +// TriggeredWebJob triggered Web Job Information. +type TriggeredWebJob struct { + autorest.Response `json:"-"` + // TriggeredWebJobProperties - TriggeredWebJob resource specific properties + *TriggeredWebJobProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -29230,20 +33401,20 @@ type StaticSiteUserInvitationRequestResource struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for StaticSiteUserInvitationRequestResource. -func (ssuirr StaticSiteUserInvitationRequestResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for TriggeredWebJob. +func (twj TriggeredWebJob) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ssuirr.StaticSiteUserInvitationRequestResourceProperties != nil { - objectMap["properties"] = ssuirr.StaticSiteUserInvitationRequestResourceProperties + if twj.TriggeredWebJobProperties != nil { + objectMap["properties"] = twj.TriggeredWebJobProperties } - if ssuirr.Kind != nil { - objectMap["kind"] = ssuirr.Kind + if twj.Kind != nil { + objectMap["kind"] = twj.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for StaticSiteUserInvitationRequestResource struct. -func (ssuirr *StaticSiteUserInvitationRequestResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for TriggeredWebJob struct. +func (twj *TriggeredWebJob) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -29253,12 +33424,12 @@ func (ssuirr *StaticSiteUserInvitationRequestResource) UnmarshalJSON(body []byte switch k { case "properties": if v != nil { - var staticSiteUserInvitationRequestResourceProperties StaticSiteUserInvitationRequestResourceProperties - err = json.Unmarshal(*v, &staticSiteUserInvitationRequestResourceProperties) + var triggeredWebJobProperties TriggeredWebJobProperties + err = json.Unmarshal(*v, &triggeredWebJobProperties) if err != nil { return err } - ssuirr.StaticSiteUserInvitationRequestResourceProperties = &staticSiteUserInvitationRequestResourceProperties + twj.TriggeredWebJobProperties = &triggeredWebJobProperties } case "id": if v != nil { @@ -29267,7 +33438,7 @@ func (ssuirr *StaticSiteUserInvitationRequestResource) UnmarshalJSON(body []byte if err != nil { return err } - ssuirr.ID = &ID + twj.ID = &ID } case "name": if v != nil { @@ -29276,7 +33447,7 @@ func (ssuirr *StaticSiteUserInvitationRequestResource) UnmarshalJSON(body []byte if err != nil { return err } - ssuirr.Name = &name + twj.Name = &name } case "kind": if v != nil { @@ -29285,7 +33456,7 @@ func (ssuirr *StaticSiteUserInvitationRequestResource) UnmarshalJSON(body []byte if err != nil { return err } - ssuirr.Kind = &kind + twj.Kind = &kind } case "type": if v != nil { @@ -29294,7 +33465,7 @@ func (ssuirr *StaticSiteUserInvitationRequestResource) UnmarshalJSON(body []byte if err != nil { return err } - ssuirr.Type = &typeVar + twj.Type = &typeVar } } } @@ -29302,214 +33473,267 @@ func (ssuirr *StaticSiteUserInvitationRequestResource) UnmarshalJSON(body []byte return nil } -// StaticSiteUserInvitationRequestResourceProperties staticSiteUserInvitationRequestResource resource -// specific properties -type StaticSiteUserInvitationRequestResourceProperties struct { - // Domain - The domain name for the static site custom domain. - Domain *string `json:"domain,omitempty"` - // Provider - The identity provider for the static site user. - Provider *string `json:"provider,omitempty"` - // UserDetails - The user id for the static site user. - UserDetails *string `json:"userDetails,omitempty"` - // Roles - The roles for the static site user, in free-form string format - Roles *string `json:"roles,omitempty"` - // NumHoursToExpiration - The number of hours the sas token stays valid - NumHoursToExpiration *int32 `json:"numHoursToExpiration,omitempty"` -} - -// StaticSiteUserInvitationResponseResource static sites user roles invitation link resource. -type StaticSiteUserInvitationResponseResource struct { +// TriggeredWebJobCollection collection of Kudu continuous web job information elements. +type TriggeredWebJobCollection struct { autorest.Response `json:"-"` - // StaticSiteUserInvitationResponseResourceProperties - StaticSiteUserInvitationResponseResource resource specific properties - *StaticSiteUserInvitationResponseResourceProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` + // Value - Collection of resources. + Value *[]TriggeredWebJob `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to next page of resources. + NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for StaticSiteUserInvitationResponseResource. -func (ssuirr StaticSiteUserInvitationResponseResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for TriggeredWebJobCollection. +func (twjc TriggeredWebJobCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ssuirr.StaticSiteUserInvitationResponseResourceProperties != nil { - objectMap["properties"] = ssuirr.StaticSiteUserInvitationResponseResourceProperties - } - if ssuirr.Kind != nil { - objectMap["kind"] = ssuirr.Kind + if twjc.Value != nil { + objectMap["value"] = twjc.Value } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for StaticSiteUserInvitationResponseResource struct. -func (ssuirr *StaticSiteUserInvitationResponseResource) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) +// TriggeredWebJobCollectionIterator provides access to a complete listing of TriggeredWebJob values. +type TriggeredWebJobCollectionIterator struct { + i int + page TriggeredWebJobCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *TriggeredWebJobCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TriggeredWebJobCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) if err != nil { + iter.i-- return err } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var staticSiteUserInvitationResponseResourceProperties StaticSiteUserInvitationResponseResourceProperties - err = json.Unmarshal(*v, &staticSiteUserInvitationResponseResourceProperties) - if err != nil { - return err - } - ssuirr.StaticSiteUserInvitationResponseResourceProperties = &staticSiteUserInvitationResponseResourceProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ssuirr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ssuirr.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - ssuirr.Kind = &kind - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ssuirr.Type = &typeVar + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *TriggeredWebJobCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter TriggeredWebJobCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter TriggeredWebJobCollectionIterator) Response() TriggeredWebJobCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter TriggeredWebJobCollectionIterator) Value() TriggeredWebJob { + if !iter.page.NotDone() { + return TriggeredWebJob{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the TriggeredWebJobCollectionIterator type. +func NewTriggeredWebJobCollectionIterator(page TriggeredWebJobCollectionPage) TriggeredWebJobCollectionIterator { + return TriggeredWebJobCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (twjc TriggeredWebJobCollection) IsEmpty() bool { + return twjc.Value == nil || len(*twjc.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (twjc TriggeredWebJobCollection) hasNextLink() bool { + return twjc.NextLink != nil && len(*twjc.NextLink) != 0 +} + +// triggeredWebJobCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (twjc TriggeredWebJobCollection) triggeredWebJobCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !twjc.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(twjc.NextLink))) +} + +// TriggeredWebJobCollectionPage contains a page of TriggeredWebJob values. +type TriggeredWebJobCollectionPage struct { + fn func(context.Context, TriggeredWebJobCollection) (TriggeredWebJobCollection, error) + twjc TriggeredWebJobCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *TriggeredWebJobCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TriggeredWebJobCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.twjc) + if err != nil { + return err + } + page.twjc = next + if !next.hasNextLink() || !next.IsEmpty() { + break } } - return nil } -// StaticSiteUserInvitationResponseResourceProperties staticSiteUserInvitationResponseResource resource -// specific properties -type StaticSiteUserInvitationResponseResourceProperties struct { - // ExpiresOn - READ-ONLY; The expiration time of the invitation - ExpiresOn *date.Time `json:"expiresOn,omitempty"` - // InvitationURL - READ-ONLY; The url for the invitation link - InvitationURL *string `json:"invitationUrl,omitempty"` +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *TriggeredWebJobCollectionPage) Next() error { + return page.NextWithContext(context.Background()) } -// MarshalJSON is the custom marshaler for StaticSiteUserInvitationResponseResourceProperties. -func (ssuirr StaticSiteUserInvitationResponseResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page TriggeredWebJobCollectionPage) NotDone() bool { + return !page.twjc.IsEmpty() } -// StaticSiteUserProvidedFunctionApp a static site user provided function. -type StaticSiteUserProvidedFunctionApp struct { - // StaticSiteUserProvidedFunctionAppProperties - StaticSiteUserProvidedFunctionApp resource specific properties - *StaticSiteUserProvidedFunctionAppProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` +// Response returns the raw server response from the last page request. +func (page TriggeredWebJobCollectionPage) Response() TriggeredWebJobCollection { + return page.twjc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page TriggeredWebJobCollectionPage) Values() []TriggeredWebJob { + if page.twjc.IsEmpty() { + return nil + } + return *page.twjc.Value +} + +// Creates a new instance of the TriggeredWebJobCollectionPage type. +func NewTriggeredWebJobCollectionPage(cur TriggeredWebJobCollection, getNextPage func(context.Context, TriggeredWebJobCollection) (TriggeredWebJobCollection, error)) TriggeredWebJobCollectionPage { + return TriggeredWebJobCollectionPage{ + fn: getNextPage, + twjc: cur, + } +} + +// TriggeredWebJobProperties triggeredWebJob resource specific properties +type TriggeredWebJobProperties struct { + // LatestRun - Latest job run information. + LatestRun *TriggeredJobRun `json:"latest_run,omitempty"` + // HistoryURL - History URL. + HistoryURL *string `json:"history_url,omitempty"` + // SchedulerLogsURL - Scheduler Logs URL. + SchedulerLogsURL *string `json:"scheduler_logs_url,omitempty"` + // RunCommand - Run command. + RunCommand *string `json:"run_command,omitempty"` + // URL - Job URL. + URL *string `json:"url,omitempty"` + // ExtraInfoURL - Extra Info URL. + ExtraInfoURL *string `json:"extra_info_url,omitempty"` + // WebJobType - Job type. Possible values include: 'JobTypeContinuous', 'JobTypeTriggered' + WebJobType JobType `json:"web_job_type,omitempty"` + // Error - Error information. + Error *string `json:"error,omitempty"` + // UsingSdk - Using SDK? + UsingSdk *bool `json:"using_sdk,omitempty"` + // PublicNetworkAccess - Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string. + PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` + // StorageAccountRequired - Checks if Customer provided storage account is required + StorageAccountRequired *bool `json:"storageAccountRequired,omitempty"` + // Settings - Job settings. + Settings map[string]interface{} `json:"settings"` } -// MarshalJSON is the custom marshaler for StaticSiteUserProvidedFunctionApp. -func (ssupfa StaticSiteUserProvidedFunctionApp) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for TriggeredWebJobProperties. +func (twj TriggeredWebJobProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ssupfa.StaticSiteUserProvidedFunctionAppProperties != nil { - objectMap["properties"] = ssupfa.StaticSiteUserProvidedFunctionAppProperties + if twj.LatestRun != nil { + objectMap["latest_run"] = twj.LatestRun } - if ssupfa.Kind != nil { - objectMap["kind"] = ssupfa.Kind + if twj.HistoryURL != nil { + objectMap["history_url"] = twj.HistoryURL + } + if twj.SchedulerLogsURL != nil { + objectMap["scheduler_logs_url"] = twj.SchedulerLogsURL + } + if twj.RunCommand != nil { + objectMap["run_command"] = twj.RunCommand + } + if twj.URL != nil { + objectMap["url"] = twj.URL + } + if twj.ExtraInfoURL != nil { + objectMap["extra_info_url"] = twj.ExtraInfoURL + } + if twj.WebJobType != "" { + objectMap["web_job_type"] = twj.WebJobType + } + if twj.Error != nil { + objectMap["error"] = twj.Error + } + if twj.UsingSdk != nil { + objectMap["using_sdk"] = twj.UsingSdk + } + if twj.PublicNetworkAccess != nil { + objectMap["publicNetworkAccess"] = twj.PublicNetworkAccess + } + if twj.StorageAccountRequired != nil { + objectMap["storageAccountRequired"] = twj.StorageAccountRequired + } + if twj.Settings != nil { + objectMap["settings"] = twj.Settings } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for StaticSiteUserProvidedFunctionApp struct. -func (ssupfa *StaticSiteUserProvidedFunctionApp) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var staticSiteUserProvidedFunctionAppProperties StaticSiteUserProvidedFunctionAppProperties - err = json.Unmarshal(*v, &staticSiteUserProvidedFunctionAppProperties) - if err != nil { - return err - } - ssupfa.StaticSiteUserProvidedFunctionAppProperties = &staticSiteUserProvidedFunctionAppProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ssupfa.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ssupfa.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - ssupfa.Kind = &kind - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ssupfa.Type = &typeVar - } - } - } +// Twitter the configuration settings of the Twitter provider. +type Twitter struct { + // Enabled - false if the Twitter provider should not be enabled despite the set registration; otherwise, true. + Enabled *bool `json:"enabled,omitempty"` + // Registration - The configuration settings of the app registration for the Twitter provider. + Registration *TwitterRegistration `json:"registration,omitempty"` +} - return nil +// TwitterRegistration the configuration settings of the app registration for the Twitter provider. +type TwitterRegistration struct { + // ConsumerKey - The OAuth 1.0a consumer key of the Twitter application used for sign-in. + // This setting is required for enabling Twitter Sign-In. + // Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in + ConsumerKey *string `json:"consumerKey,omitempty"` + // ConsumerSecretSettingName - The app setting name that contains the OAuth 1.0a consumer secret of the Twitter + // application used for sign-in. + ConsumerSecretSettingName *string `json:"consumerSecretSettingName,omitempty"` } -// StaticSiteUserProvidedFunctionAppARMResource static Site User Provided Function App ARM resource. -type StaticSiteUserProvidedFunctionAppARMResource struct { - autorest.Response `json:"-"` - // StaticSiteUserProvidedFunctionAppARMResourceProperties - StaticSiteUserProvidedFunctionAppARMResource resource specific properties - *StaticSiteUserProvidedFunctionAppARMResourceProperties `json:"properties,omitempty"` +// Usage usage of the quota resource. +type Usage struct { + // UsageProperties - Usage resource specific properties + *UsageProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -29520,20 +33744,20 @@ type StaticSiteUserProvidedFunctionAppARMResource struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for StaticSiteUserProvidedFunctionAppARMResource. -func (ssupfaar StaticSiteUserProvidedFunctionAppARMResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for Usage. +func (u Usage) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ssupfaar.StaticSiteUserProvidedFunctionAppARMResourceProperties != nil { - objectMap["properties"] = ssupfaar.StaticSiteUserProvidedFunctionAppARMResourceProperties + if u.UsageProperties != nil { + objectMap["properties"] = u.UsageProperties } - if ssupfaar.Kind != nil { - objectMap["kind"] = ssupfaar.Kind + if u.Kind != nil { + objectMap["kind"] = u.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for StaticSiteUserProvidedFunctionAppARMResource struct. -func (ssupfaar *StaticSiteUserProvidedFunctionAppARMResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for Usage struct. +func (u *Usage) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -29543,12 +33767,12 @@ func (ssupfaar *StaticSiteUserProvidedFunctionAppARMResource) UnmarshalJSON(body switch k { case "properties": if v != nil { - var staticSiteUserProvidedFunctionAppARMResourceProperties StaticSiteUserProvidedFunctionAppARMResourceProperties - err = json.Unmarshal(*v, &staticSiteUserProvidedFunctionAppARMResourceProperties) + var usageProperties UsageProperties + err = json.Unmarshal(*v, &usageProperties) if err != nil { return err } - ssupfaar.StaticSiteUserProvidedFunctionAppARMResourceProperties = &staticSiteUserProvidedFunctionAppARMResourceProperties + u.UsageProperties = &usageProperties } case "id": if v != nil { @@ -29557,7 +33781,7 @@ func (ssupfaar *StaticSiteUserProvidedFunctionAppARMResource) UnmarshalJSON(body if err != nil { return err } - ssupfaar.ID = &ID + u.ID = &ID } case "name": if v != nil { @@ -29566,7 +33790,7 @@ func (ssupfaar *StaticSiteUserProvidedFunctionAppARMResource) UnmarshalJSON(body if err != nil { return err } - ssupfaar.Name = &name + u.Name = &name } case "kind": if v != nil { @@ -29575,7 +33799,7 @@ func (ssupfaar *StaticSiteUserProvidedFunctionAppARMResource) UnmarshalJSON(body if err != nil { return err } - ssupfaar.Kind = &kind + u.Kind = &kind } case "type": if v != nil { @@ -29584,7 +33808,7 @@ func (ssupfaar *StaticSiteUserProvidedFunctionAppARMResource) UnmarshalJSON(body if err != nil { return err } - ssupfaar.Type = &typeVar + u.Type = &typeVar } } } @@ -29592,82 +33816,35 @@ func (ssupfaar *StaticSiteUserProvidedFunctionAppARMResource) UnmarshalJSON(body return nil } -// StaticSiteUserProvidedFunctionAppARMResourceProperties staticSiteUserProvidedFunctionAppARMResource -// resource specific properties -type StaticSiteUserProvidedFunctionAppARMResourceProperties struct { - // FunctionAppResourceID - The resource id of the function app registered with the static site - FunctionAppResourceID *string `json:"functionAppResourceId,omitempty"` - // FunctionAppRegion - The region of the function app registered with the static site - FunctionAppRegion *string `json:"functionAppRegion,omitempty"` - // CreatedOn - READ-ONLY; The date and time on which the function app was registered with the static site. - CreatedOn *date.Time `json:"createdOn,omitempty"` -} - -// MarshalJSON is the custom marshaler for StaticSiteUserProvidedFunctionAppARMResourceProperties. -func (ssupfaar StaticSiteUserProvidedFunctionAppARMResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ssupfaar.FunctionAppResourceID != nil { - objectMap["functionAppResourceId"] = ssupfaar.FunctionAppResourceID - } - if ssupfaar.FunctionAppRegion != nil { - objectMap["functionAppRegion"] = ssupfaar.FunctionAppRegion - } - return json.Marshal(objectMap) -} - -// StaticSiteUserProvidedFunctionAppProperties staticSiteUserProvidedFunctionApp resource specific -// properties -type StaticSiteUserProvidedFunctionAppProperties struct { - // FunctionAppResourceID - The resource id of the function app registered with the static site - FunctionAppResourceID *string `json:"functionAppResourceId,omitempty"` - // FunctionAppRegion - The region of the function app registered with the static site - FunctionAppRegion *string `json:"functionAppRegion,omitempty"` - // CreatedOn - READ-ONLY; The date and time on which the function app was registered with the static site. - CreatedOn *date.Time `json:"createdOn,omitempty"` -} - -// MarshalJSON is the custom marshaler for StaticSiteUserProvidedFunctionAppProperties. -func (ssupfa StaticSiteUserProvidedFunctionAppProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ssupfa.FunctionAppResourceID != nil { - objectMap["functionAppResourceId"] = ssupfa.FunctionAppResourceID - } - if ssupfa.FunctionAppRegion != nil { - objectMap["functionAppRegion"] = ssupfa.FunctionAppRegion - } - return json.Marshal(objectMap) -} - -// StaticSiteUserProvidedFunctionAppsCollection collection of static site user provided function apps. -type StaticSiteUserProvidedFunctionAppsCollection struct { +// UsageCollection collection of usages. +type UsageCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]StaticSiteUserProvidedFunctionAppARMResource `json:"value,omitempty"` + Value *[]Usage `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for StaticSiteUserProvidedFunctionAppsCollection. -func (ssupfac StaticSiteUserProvidedFunctionAppsCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for UsageCollection. +func (uc UsageCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ssupfac.Value != nil { - objectMap["value"] = ssupfac.Value + if uc.Value != nil { + objectMap["value"] = uc.Value } return json.Marshal(objectMap) } -// StaticSiteUserProvidedFunctionAppsCollectionIterator provides access to a complete listing of -// StaticSiteUserProvidedFunctionAppARMResource values. -type StaticSiteUserProvidedFunctionAppsCollectionIterator struct { +// UsageCollectionIterator provides access to a complete listing of Usage values. +type UsageCollectionIterator struct { i int - page StaticSiteUserProvidedFunctionAppsCollectionPage + page UsageCollectionPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *StaticSiteUserProvidedFunctionAppsCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *UsageCollectionIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteUserProvidedFunctionAppsCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/UsageCollectionIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -29692,68 +33869,67 @@ func (iter *StaticSiteUserProvidedFunctionAppsCollectionIterator) NextWithContex // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *StaticSiteUserProvidedFunctionAppsCollectionIterator) Next() error { +func (iter *UsageCollectionIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter StaticSiteUserProvidedFunctionAppsCollectionIterator) NotDone() bool { +func (iter UsageCollectionIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter StaticSiteUserProvidedFunctionAppsCollectionIterator) Response() StaticSiteUserProvidedFunctionAppsCollection { +func (iter UsageCollectionIterator) Response() UsageCollection { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter StaticSiteUserProvidedFunctionAppsCollectionIterator) Value() StaticSiteUserProvidedFunctionAppARMResource { +func (iter UsageCollectionIterator) Value() Usage { if !iter.page.NotDone() { - return StaticSiteUserProvidedFunctionAppARMResource{} + return Usage{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the StaticSiteUserProvidedFunctionAppsCollectionIterator type. -func NewStaticSiteUserProvidedFunctionAppsCollectionIterator(page StaticSiteUserProvidedFunctionAppsCollectionPage) StaticSiteUserProvidedFunctionAppsCollectionIterator { - return StaticSiteUserProvidedFunctionAppsCollectionIterator{page: page} +// Creates a new instance of the UsageCollectionIterator type. +func NewUsageCollectionIterator(page UsageCollectionPage) UsageCollectionIterator { + return UsageCollectionIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (ssupfac StaticSiteUserProvidedFunctionAppsCollection) IsEmpty() bool { - return ssupfac.Value == nil || len(*ssupfac.Value) == 0 +func (uc UsageCollection) IsEmpty() bool { + return uc.Value == nil || len(*uc.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (ssupfac StaticSiteUserProvidedFunctionAppsCollection) hasNextLink() bool { - return ssupfac.NextLink != nil && len(*ssupfac.NextLink) != 0 +func (uc UsageCollection) hasNextLink() bool { + return uc.NextLink != nil && len(*uc.NextLink) != 0 } -// staticSiteUserProvidedFunctionAppsCollectionPreparer prepares a request to retrieve the next set of results. +// usageCollectionPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (ssupfac StaticSiteUserProvidedFunctionAppsCollection) staticSiteUserProvidedFunctionAppsCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !ssupfac.hasNextLink() { +func (uc UsageCollection) usageCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !uc.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(ssupfac.NextLink))) + autorest.WithBaseURL(to.String(uc.NextLink))) } -// StaticSiteUserProvidedFunctionAppsCollectionPage contains a page of -// StaticSiteUserProvidedFunctionAppARMResource values. -type StaticSiteUserProvidedFunctionAppsCollectionPage struct { - fn func(context.Context, StaticSiteUserProvidedFunctionAppsCollection) (StaticSiteUserProvidedFunctionAppsCollection, error) - ssupfac StaticSiteUserProvidedFunctionAppsCollection +// UsageCollectionPage contains a page of Usage values. +type UsageCollectionPage struct { + fn func(context.Context, UsageCollection) (UsageCollection, error) + uc UsageCollection } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *StaticSiteUserProvidedFunctionAppsCollectionPage) NextWithContext(ctx context.Context) (err error) { +func (page *UsageCollectionPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSiteUserProvidedFunctionAppsCollectionPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/UsageCollectionPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -29763,11 +33939,11 @@ func (page *StaticSiteUserProvidedFunctionAppsCollectionPage) NextWithContext(ct }() } for { - next, err := page.fn(ctx, page.ssupfac) + next, err := page.fn(ctx, page.uc) if err != nil { return err } - page.ssupfac = next + page.uc = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -29778,54 +33954,67 @@ func (page *StaticSiteUserProvidedFunctionAppsCollectionPage) NextWithContext(ct // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *StaticSiteUserProvidedFunctionAppsCollectionPage) Next() error { +func (page *UsageCollectionPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page StaticSiteUserProvidedFunctionAppsCollectionPage) NotDone() bool { - return !page.ssupfac.IsEmpty() +func (page UsageCollectionPage) NotDone() bool { + return !page.uc.IsEmpty() } // Response returns the raw server response from the last page request. -func (page StaticSiteUserProvidedFunctionAppsCollectionPage) Response() StaticSiteUserProvidedFunctionAppsCollection { - return page.ssupfac +func (page UsageCollectionPage) Response() UsageCollection { + return page.uc } // Values returns the slice of values for the current page or nil if there are no values. -func (page StaticSiteUserProvidedFunctionAppsCollectionPage) Values() []StaticSiteUserProvidedFunctionAppARMResource { - if page.ssupfac.IsEmpty() { +func (page UsageCollectionPage) Values() []Usage { + if page.uc.IsEmpty() { return nil } - return *page.ssupfac.Value + return *page.uc.Value } -// Creates a new instance of the StaticSiteUserProvidedFunctionAppsCollectionPage type. -func NewStaticSiteUserProvidedFunctionAppsCollectionPage(cur StaticSiteUserProvidedFunctionAppsCollection, getNextPage func(context.Context, StaticSiteUserProvidedFunctionAppsCollection) (StaticSiteUserProvidedFunctionAppsCollection, error)) StaticSiteUserProvidedFunctionAppsCollectionPage { - return StaticSiteUserProvidedFunctionAppsCollectionPage{ - fn: getNextPage, - ssupfac: cur, +// Creates a new instance of the UsageCollectionPage type. +func NewUsageCollectionPage(cur UsageCollection, getNextPage func(context.Context, UsageCollection) (UsageCollection, error)) UsageCollectionPage { + return UsageCollectionPage{ + fn: getNextPage, + uc: cur, } } -// StaticSiteZipDeployment a static site zip deployment. -type StaticSiteZipDeployment struct { - // AppZipURL - URL for the zipped app content - AppZipURL *string `json:"appZipUrl,omitempty"` - // APIZipURL - URL for the zipped api content - APIZipURL *string `json:"apiZipUrl,omitempty"` - // DeploymentTitle - A title to label the deployment - DeploymentTitle *string `json:"deploymentTitle,omitempty"` - // Provider - The provider submitting this deployment - Provider *string `json:"provider,omitempty"` - // FunctionLanguage - The language of the api content, if it exists - FunctionLanguage *string `json:"functionLanguage,omitempty"` +// UsageProperties usage resource specific properties +type UsageProperties struct { + // DisplayName - READ-ONLY; Friendly name shown in the UI. + DisplayName *string `json:"displayName,omitempty"` + // ResourceName - READ-ONLY; Name of the quota resource. + ResourceName *string `json:"resourceName,omitempty"` + // Unit - READ-ONLY; Units of measurement for the quota resource. + Unit *string `json:"unit,omitempty"` + // CurrentValue - READ-ONLY; The current value of the resource counter. + CurrentValue *int64 `json:"currentValue,omitempty"` + // Limit - READ-ONLY; The resource limit. + Limit *int64 `json:"limit,omitempty"` + // NextResetTime - READ-ONLY; Next reset time for the resource counter. + NextResetTime *date.Time `json:"nextResetTime,omitempty"` + // ComputeMode - READ-ONLY; Compute mode used for this usage. Possible values include: 'ComputeModeOptionsShared', 'ComputeModeOptionsDedicated', 'ComputeModeOptionsDynamic' + ComputeMode ComputeModeOptions `json:"computeMode,omitempty"` + // SiteMode - READ-ONLY; Site mode used for this usage. + SiteMode *string `json:"siteMode,omitempty"` } -// StaticSiteZipDeploymentARMResource static site zip deployment ARM resource. -type StaticSiteZipDeploymentARMResource struct { - // StaticSiteZipDeployment - Core resource properties - *StaticSiteZipDeployment `json:"properties,omitempty"` +// MarshalJSON is the custom marshaler for UsageProperties. +func (u UsageProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// User user credentials used for publishing activity. +type User struct { + autorest.Response `json:"-"` + // UserProperties - User resource specific properties + *UserProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -29836,20 +34025,20 @@ type StaticSiteZipDeploymentARMResource struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for StaticSiteZipDeploymentARMResource. -func (sszdar StaticSiteZipDeploymentARMResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for User. +func (u User) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if sszdar.StaticSiteZipDeployment != nil { - objectMap["properties"] = sszdar.StaticSiteZipDeployment + if u.UserProperties != nil { + objectMap["properties"] = u.UserProperties } - if sszdar.Kind != nil { - objectMap["kind"] = sszdar.Kind + if u.Kind != nil { + objectMap["kind"] = u.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for StaticSiteZipDeploymentARMResource struct. -func (sszdar *StaticSiteZipDeploymentARMResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for User struct. +func (u *User) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -29859,12 +34048,12 @@ func (sszdar *StaticSiteZipDeploymentARMResource) UnmarshalJSON(body []byte) err switch k { case "properties": if v != nil { - var staticSiteZipDeployment StaticSiteZipDeployment - err = json.Unmarshal(*v, &staticSiteZipDeployment) + var userProperties UserProperties + err = json.Unmarshal(*v, &userProperties) if err != nil { return err } - sszdar.StaticSiteZipDeployment = &staticSiteZipDeployment + u.UserProperties = &userProperties } case "id": if v != nil { @@ -29873,7 +34062,7 @@ func (sszdar *StaticSiteZipDeploymentARMResource) UnmarshalJSON(body []byte) err if err != nil { return err } - sszdar.ID = &ID + u.ID = &ID } case "name": if v != nil { @@ -29882,7 +34071,7 @@ func (sszdar *StaticSiteZipDeploymentARMResource) UnmarshalJSON(body []byte) err if err != nil { return err } - sszdar.Name = &name + u.Name = &name } case "kind": if v != nil { @@ -29891,7 +34080,7 @@ func (sszdar *StaticSiteZipDeploymentARMResource) UnmarshalJSON(body []byte) err if err != nil { return err } - sszdar.Kind = &kind + u.Kind = &kind } case "type": if v != nil { @@ -29900,7 +34089,7 @@ func (sszdar *StaticSiteZipDeploymentARMResource) UnmarshalJSON(body []byte) err if err != nil { return err } - sszdar.Type = &typeVar + u.Type = &typeVar } } } @@ -29908,69 +34097,98 @@ func (sszdar *StaticSiteZipDeploymentARMResource) UnmarshalJSON(body []byte) err return nil } -// Status identify the status of the most severe insight generated by the detector. -type Status struct { - // Message - Descriptive message. - Message *string `json:"message,omitempty"` - // StatusID - Level of the most severe insight generated by the detector. Possible values include: 'InsightStatusCritical', 'InsightStatusWarning', 'InsightStatusInfo', 'InsightStatusSuccess', 'InsightStatusNone' - StatusID InsightStatus `json:"statusId,omitempty"` +// UserAssignedIdentity user Assigned identity. +type UserAssignedIdentity struct { + // PrincipalID - READ-ONLY; Principal Id of user assigned identity + PrincipalID *string `json:"principalId,omitempty"` + // ClientID - READ-ONLY; Client Id of user assigned identity + ClientID *string `json:"clientId,omitempty"` } -// StatusCodesBasedTrigger trigger based on status code. -type StatusCodesBasedTrigger struct { - // Status - HTTP status code. - Status *int32 `json:"status,omitempty"` - // SubStatus - Request Sub Status. - SubStatus *int32 `json:"subStatus,omitempty"` - // Win32Status - Win32 error code. - Win32Status *int32 `json:"win32Status,omitempty"` - // Count - Request Count. - Count *int32 `json:"count,omitempty"` - // TimeInterval - Time interval. - TimeInterval *string `json:"timeInterval,omitempty"` - // Path - Request Path - Path *string `json:"path,omitempty"` +// MarshalJSON is the custom marshaler for UserAssignedIdentity. +func (uai UserAssignedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) } -// StatusCodesRangeBasedTrigger trigger based on range of status codes. -type StatusCodesRangeBasedTrigger struct { - // StatusCodes - HTTP status code. - StatusCodes *string `json:"statusCodes,omitempty"` - Path *string `json:"path,omitempty"` - // Count - Request Count. - Count *int32 `json:"count,omitempty"` - // TimeInterval - Time interval. - TimeInterval *string `json:"timeInterval,omitempty"` +// UserProperties user resource specific properties +type UserProperties struct { + // PublishingUserName - Username used for publishing. + PublishingUserName *string `json:"publishingUserName,omitempty"` + // PublishingPassword - Password used for publishing. + PublishingPassword *string `json:"publishingPassword,omitempty"` + // PublishingPasswordHash - Password hash used for publishing. + PublishingPasswordHash *string `json:"publishingPasswordHash,omitempty"` + // PublishingPasswordHashSalt - Password hash salt used for publishing. + PublishingPasswordHashSalt *string `json:"publishingPasswordHashSalt,omitempty"` + // ScmURI - Url of SCM site. + ScmURI *string `json:"scmUri,omitempty"` } -// StorageMigrationOptions options for app content migration. -type StorageMigrationOptions struct { - // StorageMigrationOptionsProperties - StorageMigrationOptions resource specific properties - *StorageMigrationOptionsProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. +// ValidateProperties app properties used for validation. +type ValidateProperties struct { + // ServerFarmID - ARM resource ID of an App Service plan that would host the app. + ServerFarmID *string `json:"serverFarmId,omitempty"` + // SkuName - Name of the target SKU for the App Service plan. + SkuName *string `json:"skuName,omitempty"` + // NeedLinuxWorkers - true if App Service plan is for Linux workers; otherwise, false. + NeedLinuxWorkers *bool `json:"needLinuxWorkers,omitempty"` + // IsSpot - true if App Service plan is for Spot instances; otherwise, false. + IsSpot *bool `json:"isSpot,omitempty"` + // Capacity - Target capacity of the App Service plan (number of VMs). + Capacity *int32 `json:"capacity,omitempty"` + // HostingEnvironment - Name of App Service Environment where app or App Service plan should be created. + HostingEnvironment *string `json:"hostingEnvironment,omitempty"` + // IsXenon - true if App Service plan is running as a windows container + IsXenon *bool `json:"isXenon,omitempty"` + // ContainerRegistryBaseURL - Base URL of the container registry + ContainerRegistryBaseURL *string `json:"containerRegistryBaseUrl,omitempty"` + // ContainerRegistryUsername - Username for to access the container registry + ContainerRegistryUsername *string `json:"containerRegistryUsername,omitempty"` + // ContainerRegistryPassword - Password for to access the container registry + ContainerRegistryPassword *string `json:"containerRegistryPassword,omitempty"` + // ContainerImageRepository - Repository name (image name) + ContainerImageRepository *string `json:"containerImageRepository,omitempty"` + // ContainerImageTag - Image tag + ContainerImageTag *string `json:"containerImageTag,omitempty"` + // ContainerImagePlatform - Platform (windows or linux) + ContainerImagePlatform *string `json:"containerImagePlatform,omitempty"` + // AppServiceEnvironment - App Service Environment Properties + AppServiceEnvironment *AppServiceEnvironment `json:"appServiceEnvironment,omitempty"` +} + +// ValidateRequest resource validation request content. +type ValidateRequest struct { + // Name - Resource name to verify. Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` + // Type - Resource type used for verification. Possible values include: 'ValidateResourceTypesServerFarm', 'ValidateResourceTypesSite', 'ValidateResourceTypesMicrosoftWebhostingEnvironments' + Type ValidateResourceTypes `json:"type,omitempty"` + // Location - Expected location of the resource. + Location *string `json:"location,omitempty"` + // ValidateProperties - Properties of the resource to validate. + *ValidateProperties `json:"properties,omitempty"` } -// MarshalJSON is the custom marshaler for StorageMigrationOptions. -func (smo StorageMigrationOptions) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for ValidateRequest. +func (vr ValidateRequest) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if smo.StorageMigrationOptionsProperties != nil { - objectMap["properties"] = smo.StorageMigrationOptionsProperties + if vr.Name != nil { + objectMap["name"] = vr.Name } - if smo.Kind != nil { - objectMap["kind"] = smo.Kind + if vr.Type != "" { + objectMap["type"] = vr.Type + } + if vr.Location != nil { + objectMap["location"] = vr.Location + } + if vr.ValidateProperties != nil { + objectMap["properties"] = vr.ValidateProperties } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for StorageMigrationOptions struct. -func (smo *StorageMigrationOptions) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for ValidateRequest struct. +func (vr *ValidateRequest) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -29978,50 +34196,41 @@ func (smo *StorageMigrationOptions) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { - case "properties": - if v != nil { - var storageMigrationOptionsProperties StorageMigrationOptionsProperties - err = json.Unmarshal(*v, &storageMigrationOptionsProperties) - if err != nil { - return err - } - smo.StorageMigrationOptionsProperties = &storageMigrationOptionsProperties - } - case "id": + case "name": if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + var name string + err = json.Unmarshal(*v, &name) if err != nil { return err } - smo.ID = &ID + vr.Name = &name } - case "name": + case "type": if v != nil { - var name string - err = json.Unmarshal(*v, &name) + var typeVar ValidateResourceTypes + err = json.Unmarshal(*v, &typeVar) if err != nil { return err } - smo.Name = &name + vr.Type = typeVar } - case "kind": + case "location": if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) + var location string + err = json.Unmarshal(*v, &location) if err != nil { return err } - smo.Kind = &kind + vr.Location = &location } - case "type": + case "properties": if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) + var validateProperties ValidateProperties + err = json.Unmarshal(*v, &validateProperties) if err != nil { return err } - smo.Type = &typeVar + vr.ValidateProperties = &validateProperties } } } @@ -30029,23 +34238,87 @@ func (smo *StorageMigrationOptions) UnmarshalJSON(body []byte) error { return nil } -// StorageMigrationOptionsProperties storageMigrationOptions resource specific properties -type StorageMigrationOptionsProperties struct { - // AzurefilesConnectionString - AzureFiles connection string. - AzurefilesConnectionString *string `json:"azurefilesConnectionString,omitempty"` - // AzurefilesShare - AzureFiles share. - AzurefilesShare *string `json:"azurefilesShare,omitempty"` - // SwitchSiteAfterMigration - trueif the app should be switched over; otherwise, false. - SwitchSiteAfterMigration *bool `json:"switchSiteAfterMigration,omitempty"` - // BlockWriteAccessToSite - true if the app should be read only during copy operation; otherwise, false. - BlockWriteAccessToSite *bool `json:"blockWriteAccessToSite,omitempty"` +// ValidateResponse describes the result of resource validation. +type ValidateResponse struct { + autorest.Response `json:"-"` + // Status - Result of validation. + Status *string `json:"status,omitempty"` + // Error - Error details for the case when validation fails. + Error *ValidateResponseError `json:"error,omitempty"` } -// StorageMigrationResponse response for a migration of app content request. -type StorageMigrationResponse struct { +// ValidateResponseError error details for when validation fails. +type ValidateResponseError struct { + // Code - Validation error code. + Code *string `json:"code,omitempty"` + // Message - Validation error message. + Message *string `json:"message,omitempty"` +} + +// VirtualApplication virtual application in an app. +type VirtualApplication struct { + // VirtualPath - Virtual path. + VirtualPath *string `json:"virtualPath,omitempty"` + // PhysicalPath - Physical path. + PhysicalPath *string `json:"physicalPath,omitempty"` + // PreloadEnabled - true if preloading is enabled; otherwise, false. + PreloadEnabled *bool `json:"preloadEnabled,omitempty"` + // VirtualDirectories - Virtual directories for virtual application. + VirtualDirectories *[]VirtualDirectory `json:"virtualDirectories,omitempty"` +} + +// VirtualDirectory directory for virtual application. +type VirtualDirectory struct { + // VirtualPath - Path to virtual application. + VirtualPath *string `json:"virtualPath,omitempty"` + // PhysicalPath - Physical path. + PhysicalPath *string `json:"physicalPath,omitempty"` +} + +// VirtualIPMapping virtual IP mapping. +type VirtualIPMapping struct { + // VirtualIP - Virtual IP address. + VirtualIP *string `json:"virtualIP,omitempty"` + // InternalHTTPPort - Internal HTTP port. + InternalHTTPPort *int32 `json:"internalHttpPort,omitempty"` + // InternalHTTPSPort - Internal HTTPS port. + InternalHTTPSPort *int32 `json:"internalHttpsPort,omitempty"` + // InUse - Is virtual IP mapping in use. + InUse *bool `json:"inUse,omitempty"` + // ServiceName - name of the service that virtual IP is assigned to + ServiceName *string `json:"serviceName,omitempty"` +} + +// VirtualNetworkProfile specification for using a Virtual Network. +type VirtualNetworkProfile struct { + // ID - Resource id of the Virtual Network. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Name of the Virtual Network (read-only). + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type of the Virtual Network (read-only). + Type *string `json:"type,omitempty"` + // Subnet - Subnet within the Virtual Network. + Subnet *string `json:"subnet,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkProfile. +func (vnp VirtualNetworkProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vnp.ID != nil { + objectMap["id"] = vnp.ID + } + if vnp.Subnet != nil { + objectMap["subnet"] = vnp.Subnet + } + return json.Marshal(objectMap) +} + +// VnetGateway the Virtual Network gateway contract. This is used to give the Virtual Network gateway +// access to the VPN package. +type VnetGateway struct { autorest.Response `json:"-"` - // StorageMigrationResponseProperties - StorageMigrationResponse resource specific properties - *StorageMigrationResponseProperties `json:"properties,omitempty"` + // VnetGatewayProperties - VnetGateway resource specific properties + *VnetGatewayProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -30056,20 +34329,20 @@ type StorageMigrationResponse struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for StorageMigrationResponse. -func (smr StorageMigrationResponse) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for VnetGateway. +func (vg VnetGateway) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if smr.StorageMigrationResponseProperties != nil { - objectMap["properties"] = smr.StorageMigrationResponseProperties + if vg.VnetGatewayProperties != nil { + objectMap["properties"] = vg.VnetGatewayProperties } - if smr.Kind != nil { - objectMap["kind"] = smr.Kind + if vg.Kind != nil { + objectMap["kind"] = vg.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for StorageMigrationResponse struct. -func (smr *StorageMigrationResponse) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for VnetGateway struct. +func (vg *VnetGateway) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -30079,12 +34352,12 @@ func (smr *StorageMigrationResponse) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var storageMigrationResponseProperties StorageMigrationResponseProperties - err = json.Unmarshal(*v, &storageMigrationResponseProperties) + var vnetGatewayProperties VnetGatewayProperties + err = json.Unmarshal(*v, &vnetGatewayProperties) if err != nil { return err } - smr.StorageMigrationResponseProperties = &storageMigrationResponseProperties + vg.VnetGatewayProperties = &vnetGatewayProperties } case "id": if v != nil { @@ -30093,7 +34366,7 @@ func (smr *StorageMigrationResponse) UnmarshalJSON(body []byte) error { if err != nil { return err } - smr.ID = &ID + vg.ID = &ID } case "name": if v != nil { @@ -30102,7 +34375,7 @@ func (smr *StorageMigrationResponse) UnmarshalJSON(body []byte) error { if err != nil { return err } - smr.Name = &name + vg.Name = &name } case "kind": if v != nil { @@ -30111,7 +34384,7 @@ func (smr *StorageMigrationResponse) UnmarshalJSON(body []byte) error { if err != nil { return err } - smr.Kind = &kind + vg.Kind = &kind } case "type": if v != nil { @@ -30120,7 +34393,7 @@ func (smr *StorageMigrationResponse) UnmarshalJSON(body []byte) error { if err != nil { return err } - smr.Type = &typeVar + vg.Type = &typeVar } } } @@ -30128,98 +34401,56 @@ func (smr *StorageMigrationResponse) UnmarshalJSON(body []byte) error { return nil } -// StorageMigrationResponseProperties storageMigrationResponse resource specific properties -type StorageMigrationResponseProperties struct { - // OperationID - READ-ONLY; When server starts the migration process, it will return an operation ID identifying that particular migration operation. - OperationID *string `json:"operationId,omitempty"` -} - -// MarshalJSON is the custom marshaler for StorageMigrationResponseProperties. -func (smr StorageMigrationResponseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// String ... -type String struct { - autorest.Response `json:"-"` - Value *string `json:"value,omitempty"` +// VnetGatewayProperties vnetGateway resource specific properties +type VnetGatewayProperties struct { + // VnetName - The Virtual Network name. + VnetName *string `json:"vnetName,omitempty"` + // VpnPackageURI - The URI where the VPN package can be downloaded. + VpnPackageURI *string `json:"vpnPackageUri,omitempty"` } -// StringDictionary string dictionary resource. -type StringDictionary struct { - autorest.Response `json:"-"` - // Properties - Settings. - Properties map[string]*string `json:"properties"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` +// VnetInfo virtual Network information contract. +type VnetInfo struct { + // VnetResourceID - The Virtual Network's resource ID. + VnetResourceID *string `json:"vnetResourceId,omitempty"` + // CertThumbprint - READ-ONLY; The client certificate thumbprint. + CertThumbprint *string `json:"certThumbprint,omitempty"` + // CertBlob - A certificate file (.cer) blob containing the public key of the private key used to authenticate a + // Point-To-Site VPN connection. + CertBlob *string `json:"certBlob,omitempty"` + // Routes - READ-ONLY; The routes that this Virtual Network connection uses. + Routes *[]VnetRoute `json:"routes,omitempty"` + // ResyncRequired - READ-ONLY; true if a resync is required; otherwise, false. + ResyncRequired *bool `json:"resyncRequired,omitempty"` + // DNSServers - DNS servers to be used by this Virtual Network. This should be a comma-separated list of IP addresses. + DNSServers *string `json:"dnsServers,omitempty"` + // IsSwift - Flag that is used to denote if this is VNET injection + IsSwift *bool `json:"isSwift,omitempty"` } -// MarshalJSON is the custom marshaler for StringDictionary. -func (sd StringDictionary) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for VnetInfo. +func (vi VnetInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if sd.Properties != nil { - objectMap["properties"] = sd.Properties + if vi.VnetResourceID != nil { + objectMap["vnetResourceId"] = vi.VnetResourceID } - if sd.Kind != nil { - objectMap["kind"] = sd.Kind + if vi.CertBlob != nil { + objectMap["certBlob"] = vi.CertBlob } - return json.Marshal(objectMap) -} - -// StringList string list resource. -type StringList struct { - autorest.Response `json:"-"` - // Properties - List of string resources. - Properties *[]string `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for StringList. -func (sl StringList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sl.Properties != nil { - objectMap["properties"] = sl.Properties + if vi.DNSServers != nil { + objectMap["dnsServers"] = vi.DNSServers } - if sl.Kind != nil { - objectMap["kind"] = sl.Kind + if vi.IsSwift != nil { + objectMap["isSwift"] = vi.IsSwift } return json.Marshal(objectMap) } -// SupportTopic defines a unique Support Topic -type SupportTopic struct { - // ID - READ-ONLY; Support Topic Id - ID *string `json:"id,omitempty"` - // PesID - READ-ONLY; Unique resource Id - PesID *string `json:"pesId,omitempty"` -} - -// MarshalJSON is the custom marshaler for SupportTopic. -func (st SupportTopic) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SwiftVirtualNetwork swift Virtual Network Contract. This is used to enable the new Swift way of doing -// virtual network integration. -type SwiftVirtualNetwork struct { +// VnetInfoResource virtual Network information ARM resource. +type VnetInfoResource struct { autorest.Response `json:"-"` - // SwiftVirtualNetworkProperties - SwiftVirtualNetwork resource specific properties - *SwiftVirtualNetworkProperties `json:"properties,omitempty"` + // VnetInfo - Core resource properties + *VnetInfo `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -30230,20 +34461,20 @@ type SwiftVirtualNetwork struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for SwiftVirtualNetwork. -func (svn SwiftVirtualNetwork) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for VnetInfoResource. +func (vir VnetInfoResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if svn.SwiftVirtualNetworkProperties != nil { - objectMap["properties"] = svn.SwiftVirtualNetworkProperties + if vir.VnetInfo != nil { + objectMap["properties"] = vir.VnetInfo } - if svn.Kind != nil { - objectMap["kind"] = svn.Kind + if vir.Kind != nil { + objectMap["kind"] = vir.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for SwiftVirtualNetwork struct. -func (svn *SwiftVirtualNetwork) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for VnetInfoResource struct. +func (vir *VnetInfoResource) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -30253,12 +34484,12 @@ func (svn *SwiftVirtualNetwork) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var swiftVirtualNetworkProperties SwiftVirtualNetworkProperties - err = json.Unmarshal(*v, &swiftVirtualNetworkProperties) + var vnetInfo VnetInfo + err = json.Unmarshal(*v, &vnetInfo) if err != nil { return err } - svn.SwiftVirtualNetworkProperties = &swiftVirtualNetworkProperties + vir.VnetInfo = &vnetInfo } case "id": if v != nil { @@ -30267,7 +34498,7 @@ func (svn *SwiftVirtualNetwork) UnmarshalJSON(body []byte) error { if err != nil { return err } - svn.ID = &ID + vir.ID = &ID } case "name": if v != nil { @@ -30276,7 +34507,7 @@ func (svn *SwiftVirtualNetwork) UnmarshalJSON(body []byte) error { if err != nil { return err } - svn.Name = &name + vir.Name = &name } case "kind": if v != nil { @@ -30285,7 +34516,7 @@ func (svn *SwiftVirtualNetwork) UnmarshalJSON(body []byte) error { if err != nil { return err } - svn.Kind = &kind + vir.Kind = &kind } case "type": if v != nil { @@ -30294,7 +34525,7 @@ func (svn *SwiftVirtualNetwork) UnmarshalJSON(body []byte) error { if err != nil { return err } - svn.Type = &typeVar + vir.Type = &typeVar } } } @@ -30302,227 +34533,10 @@ func (svn *SwiftVirtualNetwork) UnmarshalJSON(body []byte) error { return nil } -// SwiftVirtualNetworkProperties swiftVirtualNetwork resource specific properties -type SwiftVirtualNetworkProperties struct { - // SubnetResourceID - The Virtual Network subnet's resource ID. This is the subnet that this Web App will join. This subnet must have a delegation to Microsoft.Web/serverFarms defined first. - SubnetResourceID *string `json:"subnetResourceId,omitempty"` - // SwiftSupported - A flag that specifies if the scale unit this Web App is on supports Swift integration. - SwiftSupported *bool `json:"swiftSupported,omitempty"` -} - -// Template container App versioned application definition. -// Defines the desired state of an immutable revision. -// Any changes to this section Will result in a new revision being created -type Template struct { - // RevisionSuffix - User friendly suffix that is appended to the revision name - RevisionSuffix *string `json:"revisionSuffix,omitempty"` - // Containers - List of container definitions for the Container App. - Containers *[]Container `json:"containers,omitempty"` - // Scale - Scaling properties for the Container App. - Scale *Scale `json:"scale,omitempty"` - // Dapr - Dapr configuration for the Container App. - Dapr *Dapr `json:"dapr,omitempty"` -} - -// TldLegalAgreement legal agreement for a top level domain. -type TldLegalAgreement struct { - // AgreementKey - Unique identifier for the agreement. - AgreementKey *string `json:"agreementKey,omitempty"` - // Title - Agreement title. - Title *string `json:"title,omitempty"` - // Content - Agreement details. - Content *string `json:"content,omitempty"` - // URL - URL where a copy of the agreement details is hosted. - URL *string `json:"url,omitempty"` -} - -// TldLegalAgreementCollection collection of top-level domain legal agreements. -type TldLegalAgreementCollection struct { - autorest.Response `json:"-"` - // Value - Collection of resources. - Value *[]TldLegalAgreement `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for TldLegalAgreementCollection. -func (tlac TldLegalAgreementCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if tlac.Value != nil { - objectMap["value"] = tlac.Value - } - return json.Marshal(objectMap) -} - -// TldLegalAgreementCollectionIterator provides access to a complete listing of TldLegalAgreement values. -type TldLegalAgreementCollectionIterator struct { - i int - page TldLegalAgreementCollectionPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *TldLegalAgreementCollectionIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TldLegalAgreementCollectionIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *TldLegalAgreementCollectionIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter TldLegalAgreementCollectionIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter TldLegalAgreementCollectionIterator) Response() TldLegalAgreementCollection { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter TldLegalAgreementCollectionIterator) Value() TldLegalAgreement { - if !iter.page.NotDone() { - return TldLegalAgreement{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the TldLegalAgreementCollectionIterator type. -func NewTldLegalAgreementCollectionIterator(page TldLegalAgreementCollectionPage) TldLegalAgreementCollectionIterator { - return TldLegalAgreementCollectionIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (tlac TldLegalAgreementCollection) IsEmpty() bool { - return tlac.Value == nil || len(*tlac.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (tlac TldLegalAgreementCollection) hasNextLink() bool { - return tlac.NextLink != nil && len(*tlac.NextLink) != 0 -} - -// tldLegalAgreementCollectionPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (tlac TldLegalAgreementCollection) tldLegalAgreementCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !tlac.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(tlac.NextLink))) -} - -// TldLegalAgreementCollectionPage contains a page of TldLegalAgreement values. -type TldLegalAgreementCollectionPage struct { - fn func(context.Context, TldLegalAgreementCollection) (TldLegalAgreementCollection, error) - tlac TldLegalAgreementCollection -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *TldLegalAgreementCollectionPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TldLegalAgreementCollectionPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.tlac) - if err != nil { - return err - } - page.tlac = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *TldLegalAgreementCollectionPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page TldLegalAgreementCollectionPage) NotDone() bool { - return !page.tlac.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page TldLegalAgreementCollectionPage) Response() TldLegalAgreementCollection { - return page.tlac -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page TldLegalAgreementCollectionPage) Values() []TldLegalAgreement { - if page.tlac.IsEmpty() { - return nil - } - return *page.tlac.Value -} - -// Creates a new instance of the TldLegalAgreementCollectionPage type. -func NewTldLegalAgreementCollectionPage(cur TldLegalAgreementCollection, getNextPage func(context.Context, TldLegalAgreementCollection) (TldLegalAgreementCollection, error)) TldLegalAgreementCollectionPage { - return TldLegalAgreementCollectionPage{ - fn: getNextPage, - tlac: cur, - } -} - -// TokenStore the configuration settings of the token store. -type TokenStore struct { - // Enabled - true to durably store platform-specific security tokens that are obtained during login flows; otherwise, false. - // The default is false. - Enabled *bool `json:"enabled,omitempty"` - // TokenRefreshExtensionHours - The number of hours after session token expiration that a session token can be used to - // call the token refresh API. The default is 72 hours. - TokenRefreshExtensionHours *float64 `json:"tokenRefreshExtensionHours,omitempty"` - // FileSystem - The configuration settings of the storage of the tokens if a file system is used. - FileSystem *FileSystemTokenStore `json:"fileSystem,omitempty"` - // AzureBlobStorage - The configuration settings of the storage of the tokens if blob storage is used. - AzureBlobStorage *BlobStorageTokenStore `json:"azureBlobStorage,omitempty"` -} - -// TopLevelDomain a top level domain object. -type TopLevelDomain struct { - autorest.Response `json:"-"` - // TopLevelDomainProperties - TopLevelDomain resource specific properties - *TopLevelDomainProperties `json:"properties,omitempty"` +// VnetParameters the required set of inputs to validate a VNET +type VnetParameters struct { + // VnetParametersProperties - VnetParameters resource specific properties + *VnetParametersProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -30533,20 +34547,20 @@ type TopLevelDomain struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for TopLevelDomain. -func (tld TopLevelDomain) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for VnetParameters. +func (vp VnetParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if tld.TopLevelDomainProperties != nil { - objectMap["properties"] = tld.TopLevelDomainProperties + if vp.VnetParametersProperties != nil { + objectMap["properties"] = vp.VnetParametersProperties } - if tld.Kind != nil { - objectMap["kind"] = tld.Kind + if vp.Kind != nil { + objectMap["kind"] = vp.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for TopLevelDomain struct. -func (tld *TopLevelDomain) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for VnetParameters struct. +func (vp *VnetParameters) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -30556,12 +34570,12 @@ func (tld *TopLevelDomain) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var topLevelDomainProperties TopLevelDomainProperties - err = json.Unmarshal(*v, &topLevelDomainProperties) + var vnetParametersProperties VnetParametersProperties + err = json.Unmarshal(*v, &vnetParametersProperties) if err != nil { return err } - tld.TopLevelDomainProperties = &topLevelDomainProperties + vp.VnetParametersProperties = &vnetParametersProperties } case "id": if v != nil { @@ -30570,7 +34584,7 @@ func (tld *TopLevelDomain) UnmarshalJSON(body []byte) error { if err != nil { return err } - tld.ID = &ID + vp.ID = &ID } case "name": if v != nil { @@ -30579,7 +34593,7 @@ func (tld *TopLevelDomain) UnmarshalJSON(body []byte) error { if err != nil { return err } - tld.Name = &name + vp.Name = &name } case "kind": if v != nil { @@ -30588,7 +34602,7 @@ func (tld *TopLevelDomain) UnmarshalJSON(body []byte) error { if err != nil { return err } - tld.Kind = &kind + vp.Kind = &kind } case "type": if v != nil { @@ -30597,7 +34611,7 @@ func (tld *TopLevelDomain) UnmarshalJSON(body []byte) error { if err != nil { return err } - tld.Type = &typeVar + vp.Type = &typeVar } } } @@ -30605,203 +34619,124 @@ func (tld *TopLevelDomain) UnmarshalJSON(body []byte) error { return nil } -// TopLevelDomainAgreementOption options for retrieving the list of top level domain legal agreements. -type TopLevelDomainAgreementOption struct { - // IncludePrivacy - If true, then the list of agreements will include agreements for domain privacy as well; otherwise, false. - IncludePrivacy *bool `json:"includePrivacy,omitempty"` - // ForTransfer - If true, then the list of agreements will include agreements for domain transfer as well; otherwise, false. - ForTransfer *bool `json:"forTransfer,omitempty"` +// VnetParametersProperties vnetParameters resource specific properties +type VnetParametersProperties struct { + // VnetResourceGroup - The Resource Group of the VNET to be validated + VnetResourceGroup *string `json:"vnetResourceGroup,omitempty"` + // VnetName - The name of the VNET to be validated + VnetName *string `json:"vnetName,omitempty"` + // VnetSubnetName - The subnet name to be validated + VnetSubnetName *string `json:"vnetSubnetName,omitempty"` + // SubnetResourceID - The ARM Resource ID of the subnet to validate + SubnetResourceID *string `json:"subnetResourceId,omitempty"` } -// TopLevelDomainCollection collection of Top-level domains. -type TopLevelDomainCollection struct { +// VnetRoute virtual Network route contract used to pass routing information for a Virtual Network. +type VnetRoute struct { autorest.Response `json:"-"` - // Value - Collection of resources. - Value *[]TopLevelDomain `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty"` + // VnetRouteProperties - VnetRoute resource specific properties + *VnetRouteProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for TopLevelDomainCollection. -func (tldc TopLevelDomainCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for VnetRoute. +func (vr VnetRoute) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if tldc.Value != nil { - objectMap["value"] = tldc.Value + if vr.VnetRouteProperties != nil { + objectMap["properties"] = vr.VnetRouteProperties + } + if vr.Kind != nil { + objectMap["kind"] = vr.Kind } return json.Marshal(objectMap) } -// TopLevelDomainCollectionIterator provides access to a complete listing of TopLevelDomain values. -type TopLevelDomainCollectionIterator struct { - i int - page TopLevelDomainCollectionPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *TopLevelDomainCollectionIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TopLevelDomainCollectionIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) +// UnmarshalJSON is the custom unmarshaler for VnetRoute struct. +func (vr *VnetRoute) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { - iter.i-- return err } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *TopLevelDomainCollectionIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter TopLevelDomainCollectionIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter TopLevelDomainCollectionIterator) Response() TopLevelDomainCollection { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter TopLevelDomainCollectionIterator) Value() TopLevelDomain { - if !iter.page.NotDone() { - return TopLevelDomain{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the TopLevelDomainCollectionIterator type. -func NewTopLevelDomainCollectionIterator(page TopLevelDomainCollectionPage) TopLevelDomainCollectionIterator { - return TopLevelDomainCollectionIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (tldc TopLevelDomainCollection) IsEmpty() bool { - return tldc.Value == nil || len(*tldc.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (tldc TopLevelDomainCollection) hasNextLink() bool { - return tldc.NextLink != nil && len(*tldc.NextLink) != 0 -} - -// topLevelDomainCollectionPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (tldc TopLevelDomainCollection) topLevelDomainCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !tldc.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(tldc.NextLink))) -} - -// TopLevelDomainCollectionPage contains a page of TopLevelDomain values. -type TopLevelDomainCollectionPage struct { - fn func(context.Context, TopLevelDomainCollection) (TopLevelDomainCollection, error) - tldc TopLevelDomainCollection -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *TopLevelDomainCollectionPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TopLevelDomainCollectionPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode + for k, v := range m { + switch k { + case "properties": + if v != nil { + var vnetRouteProperties VnetRouteProperties + err = json.Unmarshal(*v, &vnetRouteProperties) + if err != nil { + return err + } + vr.VnetRouteProperties = &vnetRouteProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vr.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + vr.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vr.Type = &typeVar } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.tldc) - if err != nil { - return err - } - page.tldc = next - if !next.hasNextLink() || !next.IsEmpty() { - break } } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *TopLevelDomainCollectionPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page TopLevelDomainCollectionPage) NotDone() bool { - return !page.tldc.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page TopLevelDomainCollectionPage) Response() TopLevelDomainCollection { - return page.tldc -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page TopLevelDomainCollectionPage) Values() []TopLevelDomain { - if page.tldc.IsEmpty() { - return nil - } - return *page.tldc.Value -} - -// Creates a new instance of the TopLevelDomainCollectionPage type. -func NewTopLevelDomainCollectionPage(cur TopLevelDomainCollection, getNextPage func(context.Context, TopLevelDomainCollection) (TopLevelDomainCollection, error)) TopLevelDomainCollectionPage { - return TopLevelDomainCollectionPage{ - fn: getNextPage, - tldc: cur, - } -} -// TopLevelDomainProperties topLevelDomain resource specific properties -type TopLevelDomainProperties struct { - // Privacy - If true, then the top level domain supports domain privacy; otherwise, false. - Privacy *bool `json:"privacy,omitempty"` + return nil } -// TrafficWeight traffic weight assigned to a revision -type TrafficWeight struct { - // RevisionName - Name of a revision - RevisionName *string `json:"revisionName,omitempty"` - // Weight - Traffic weight assigned to a revision - Weight *int32 `json:"weight,omitempty"` - // LatestRevision - Indicates that the traffic weight belongs to a latest stable revision - LatestRevision *bool `json:"latestRevision,omitempty"` +// VnetRouteProperties vnetRoute resource specific properties +type VnetRouteProperties struct { + // StartAddress - The starting address for this route. This may also include a CIDR notation, in which case the end address must not be specified. + StartAddress *string `json:"startAddress,omitempty"` + // EndAddress - The ending address for this route. If the start address is specified in CIDR notation, this must be omitted. + EndAddress *string `json:"endAddress,omitempty"` + // RouteType - The type of route this is: + // DEFAULT - By default, every app has routes to the local address ranges specified by RFC1918 + // INHERITED - Routes inherited from the real Virtual Network routes + // STATIC - Static route set on the app only + // These values will be used for syncing an app's routes with those from a Virtual Network. Possible values include: 'RouteTypeDEFAULT', 'RouteTypeINHERITED', 'RouteTypeSTATIC' + RouteType RouteType `json:"routeType,omitempty"` } -// TriggeredJobHistory triggered Web Job History. List of Triggered Web Job Run Information elements. -type TriggeredJobHistory struct { +// VnetValidationFailureDetails a class that describes the reason for a validation failure. +type VnetValidationFailureDetails struct { autorest.Response `json:"-"` - // TriggeredJobHistoryProperties - TriggeredJobHistory resource specific properties - *TriggeredJobHistoryProperties `json:"properties,omitempty"` + // VnetValidationFailureDetailsProperties - VnetValidationFailureDetails resource specific properties + *VnetValidationFailureDetailsProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -30812,20 +34747,20 @@ type TriggeredJobHistory struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for TriggeredJobHistory. -func (tjh TriggeredJobHistory) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for VnetValidationFailureDetails. +func (vvfd VnetValidationFailureDetails) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if tjh.TriggeredJobHistoryProperties != nil { - objectMap["properties"] = tjh.TriggeredJobHistoryProperties + if vvfd.VnetValidationFailureDetailsProperties != nil { + objectMap["properties"] = vvfd.VnetValidationFailureDetailsProperties } - if tjh.Kind != nil { - objectMap["kind"] = tjh.Kind + if vvfd.Kind != nil { + objectMap["kind"] = vvfd.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for TriggeredJobHistory struct. -func (tjh *TriggeredJobHistory) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for VnetValidationFailureDetails struct. +func (vvfd *VnetValidationFailureDetails) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -30835,12 +34770,12 @@ func (tjh *TriggeredJobHistory) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var triggeredJobHistoryProperties TriggeredJobHistoryProperties - err = json.Unmarshal(*v, &triggeredJobHistoryProperties) + var vnetValidationFailureDetailsProperties VnetValidationFailureDetailsProperties + err = json.Unmarshal(*v, &vnetValidationFailureDetailsProperties) if err != nil { return err } - tjh.TriggeredJobHistoryProperties = &triggeredJobHistoryProperties + vvfd.VnetValidationFailureDetailsProperties = &vnetValidationFailureDetailsProperties } case "id": if v != nil { @@ -30849,7 +34784,7 @@ func (tjh *TriggeredJobHistory) UnmarshalJSON(body []byte) error { if err != nil { return err } - tjh.ID = &ID + vvfd.ID = &ID } case "name": if v != nil { @@ -30858,7 +34793,7 @@ func (tjh *TriggeredJobHistory) UnmarshalJSON(body []byte) error { if err != nil { return err } - tjh.Name = &name + vvfd.Name = &name } case "kind": if v != nil { @@ -30867,7 +34802,7 @@ func (tjh *TriggeredJobHistory) UnmarshalJSON(body []byte) error { if err != nil { return err } - tjh.Kind = &kind + vvfd.Kind = &kind } case "type": if v != nil { @@ -30876,220 +34811,30 @@ func (tjh *TriggeredJobHistory) UnmarshalJSON(body []byte) error { if err != nil { return err } - tjh.Type = &typeVar - } - } - } - - return nil -} - -// TriggeredJobHistoryCollection collection of Kudu continuous web job information elements. -type TriggeredJobHistoryCollection struct { - autorest.Response `json:"-"` - // Value - Collection of resources. - Value *[]TriggeredJobHistory `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for TriggeredJobHistoryCollection. -func (tjhc TriggeredJobHistoryCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if tjhc.Value != nil { - objectMap["value"] = tjhc.Value - } - return json.Marshal(objectMap) -} - -// TriggeredJobHistoryCollectionIterator provides access to a complete listing of TriggeredJobHistory -// values. -type TriggeredJobHistoryCollectionIterator struct { - i int - page TriggeredJobHistoryCollectionPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *TriggeredJobHistoryCollectionIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TriggeredJobHistoryCollectionIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *TriggeredJobHistoryCollectionIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter TriggeredJobHistoryCollectionIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter TriggeredJobHistoryCollectionIterator) Response() TriggeredJobHistoryCollection { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter TriggeredJobHistoryCollectionIterator) Value() TriggeredJobHistory { - if !iter.page.NotDone() { - return TriggeredJobHistory{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the TriggeredJobHistoryCollectionIterator type. -func NewTriggeredJobHistoryCollectionIterator(page TriggeredJobHistoryCollectionPage) TriggeredJobHistoryCollectionIterator { - return TriggeredJobHistoryCollectionIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (tjhc TriggeredJobHistoryCollection) IsEmpty() bool { - return tjhc.Value == nil || len(*tjhc.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (tjhc TriggeredJobHistoryCollection) hasNextLink() bool { - return tjhc.NextLink != nil && len(*tjhc.NextLink) != 0 -} - -// triggeredJobHistoryCollectionPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (tjhc TriggeredJobHistoryCollection) triggeredJobHistoryCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !tjhc.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(tjhc.NextLink))) -} - -// TriggeredJobHistoryCollectionPage contains a page of TriggeredJobHistory values. -type TriggeredJobHistoryCollectionPage struct { - fn func(context.Context, TriggeredJobHistoryCollection) (TriggeredJobHistoryCollection, error) - tjhc TriggeredJobHistoryCollection -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *TriggeredJobHistoryCollectionPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TriggeredJobHistoryCollectionPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode + vvfd.Type = &typeVar } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.tjhc) - if err != nil { - return err - } - page.tjhc = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *TriggeredJobHistoryCollectionPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page TriggeredJobHistoryCollectionPage) NotDone() bool { - return !page.tjhc.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page TriggeredJobHistoryCollectionPage) Response() TriggeredJobHistoryCollection { - return page.tjhc -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page TriggeredJobHistoryCollectionPage) Values() []TriggeredJobHistory { - if page.tjhc.IsEmpty() { - return nil - } - return *page.tjhc.Value -} - -// Creates a new instance of the TriggeredJobHistoryCollectionPage type. -func NewTriggeredJobHistoryCollectionPage(cur TriggeredJobHistoryCollection, getNextPage func(context.Context, TriggeredJobHistoryCollection) (TriggeredJobHistoryCollection, error)) TriggeredJobHistoryCollectionPage { - return TriggeredJobHistoryCollectionPage{ - fn: getNextPage, - tjhc: cur, + } } -} -// TriggeredJobHistoryProperties triggeredJobHistory resource specific properties -type TriggeredJobHistoryProperties struct { - // Runs - List of triggered web job runs. - Runs *[]TriggeredJobRun `json:"runs,omitempty"` + return nil } -// TriggeredJobRun triggered Web Job Run Information. -type TriggeredJobRun struct { - // WebJobID - Job ID. - WebJobID *string `json:"web_job_id,omitempty"` - // WebJobName - Job name. - WebJobName *string `json:"web_job_name,omitempty"` - // Status - Job status. Possible values include: 'TriggeredWebJobStatusSuccess', 'TriggeredWebJobStatusFailed', 'TriggeredWebJobStatusError' - Status TriggeredWebJobStatus `json:"status,omitempty"` - // StartTime - Start time. - StartTime *date.Time `json:"start_time,omitempty"` - // EndTime - End time. - EndTime *date.Time `json:"end_time,omitempty"` - // Duration - Job duration. - Duration *string `json:"duration,omitempty"` - // OutputURL - Output URL. - OutputURL *string `json:"output_url,omitempty"` - // ErrorURL - Error URL. - ErrorURL *string `json:"error_url,omitempty"` - // URL - Job URL. - URL *string `json:"url,omitempty"` - // JobName - Job name. - JobName *string `json:"job_name,omitempty"` - // Trigger - Job trigger. - Trigger *string `json:"trigger,omitempty"` +// VnetValidationFailureDetailsProperties vnetValidationFailureDetails resource specific properties +type VnetValidationFailureDetailsProperties struct { + // Message - Text describing the validation outcome. + Message *string `json:"message,omitempty"` + // Failed - A flag describing whether or not validation failed. + Failed *bool `json:"failed,omitempty"` + // FailedTests - A list of tests that failed in the validation. + FailedTests *[]VnetValidationTestFailure `json:"failedTests,omitempty"` + // Warnings - A list of warnings generated during validation. + Warnings *[]VnetValidationTestFailure `json:"warnings,omitempty"` } -// TriggeredWebJob triggered Web Job Information. -type TriggeredWebJob struct { - autorest.Response `json:"-"` - // TriggeredWebJobProperties - TriggeredWebJob resource specific properties - *TriggeredWebJobProperties `json:"properties,omitempty"` +// VnetValidationTestFailure a class that describes a test that failed during NSG and UDR validation. +type VnetValidationTestFailure struct { + // VnetValidationTestFailureProperties - VnetValidationTestFailure resource specific properties + *VnetValidationTestFailureProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource Name. @@ -31100,20 +34845,20 @@ type TriggeredWebJob struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for TriggeredWebJob. -func (twj TriggeredWebJob) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for VnetValidationTestFailure. +func (vvtf VnetValidationTestFailure) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if twj.TriggeredWebJobProperties != nil { - objectMap["properties"] = twj.TriggeredWebJobProperties + if vvtf.VnetValidationTestFailureProperties != nil { + objectMap["properties"] = vvtf.VnetValidationTestFailureProperties } - if twj.Kind != nil { - objectMap["kind"] = twj.Kind + if vvtf.Kind != nil { + objectMap["kind"] = vvtf.Kind } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for TriggeredWebJob struct. -func (twj *TriggeredWebJob) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for VnetValidationTestFailure struct. +func (vvtf *VnetValidationTestFailure) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -31123,12 +34868,12 @@ func (twj *TriggeredWebJob) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var triggeredWebJobProperties TriggeredWebJobProperties - err = json.Unmarshal(*v, &triggeredWebJobProperties) + var vnetValidationTestFailureProperties VnetValidationTestFailureProperties + err = json.Unmarshal(*v, &vnetValidationTestFailureProperties) if err != nil { return err } - twj.TriggeredWebJobProperties = &triggeredWebJobProperties + vvtf.VnetValidationTestFailureProperties = &vnetValidationTestFailureProperties } case "id": if v != nil { @@ -31137,7 +34882,7 @@ func (twj *TriggeredWebJob) UnmarshalJSON(body []byte) error { if err != nil { return err } - twj.ID = &ID + vvtf.ID = &ID } case "name": if v != nil { @@ -31146,7 +34891,7 @@ func (twj *TriggeredWebJob) UnmarshalJSON(body []byte) error { if err != nil { return err } - twj.Name = &name + vvtf.Name = &name } case "kind": if v != nil { @@ -31155,7 +34900,7 @@ func (twj *TriggeredWebJob) UnmarshalJSON(body []byte) error { if err != nil { return err } - twj.Kind = &kind + vvtf.Kind = &kind } case "type": if v != nil { @@ -31164,7 +34909,7 @@ func (twj *TriggeredWebJob) UnmarshalJSON(body []byte) error { if err != nil { return err } - twj.Type = &typeVar + vvtf.Type = &typeVar } } } @@ -31172,35 +34917,101 @@ func (twj *TriggeredWebJob) UnmarshalJSON(body []byte) error { return nil } -// TriggeredWebJobCollection collection of Kudu continuous web job information elements. -type TriggeredWebJobCollection struct { +// VnetValidationTestFailureProperties vnetValidationTestFailure resource specific properties +type VnetValidationTestFailureProperties struct { + // TestName - The name of the test that failed. + TestName *string `json:"testName,omitempty"` + // Details - The details of what caused the failure, e.g. the blocking rule name, etc. + Details *string `json:"details,omitempty"` +} + +// WindowsJavaContainerSettings windows Java Container settings. +type WindowsJavaContainerSettings struct { + // JavaContainer - READ-ONLY; Java container (runtime only). + JavaContainer *string `json:"javaContainer,omitempty"` + // JavaContainerVersion - READ-ONLY; Java container version (runtime only). + JavaContainerVersion *string `json:"javaContainerVersion,omitempty"` + // IsPreview - READ-ONLY; true if the stack is in preview; otherwise, false. + IsPreview *bool `json:"isPreview,omitempty"` + // IsDeprecated - READ-ONLY; true if the stack is deprecated; otherwise, false. + IsDeprecated *bool `json:"isDeprecated,omitempty"` + // IsHidden - READ-ONLY; true if the stack should be hidden; otherwise, false. + IsHidden *bool `json:"isHidden,omitempty"` + // EndOfLifeDate - READ-ONLY; End-of-life date for the minor version. + EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` + // IsAutoUpdate - READ-ONLY; true if the stack version is auto-updated; otherwise, false. + IsAutoUpdate *bool `json:"isAutoUpdate,omitempty"` + // IsEarlyAccess - READ-ONLY; true if the minor version is early-access; otherwise, false. + IsEarlyAccess *bool `json:"isEarlyAccess,omitempty"` +} + +// MarshalJSON is the custom marshaler for WindowsJavaContainerSettings. +func (wjcs WindowsJavaContainerSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// WorkerPool worker pool of an App Service Environment. +type WorkerPool struct { + // WorkerSizeID - Worker size ID for referencing this worker pool. + WorkerSizeID *int32 `json:"workerSizeId,omitempty"` + // ComputeMode - Shared or dedicated app hosting. Possible values include: 'ComputeModeOptionsShared', 'ComputeModeOptionsDedicated', 'ComputeModeOptionsDynamic' + ComputeMode ComputeModeOptions `json:"computeMode,omitempty"` + // WorkerSize - VM size of the worker pool instances. + WorkerSize *string `json:"workerSize,omitempty"` + // WorkerCount - Number of instances in the worker pool. + WorkerCount *int32 `json:"workerCount,omitempty"` + // InstanceNames - READ-ONLY; Names of all instances in the worker pool (read only). + InstanceNames *[]string `json:"instanceNames,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkerPool. +func (wp WorkerPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wp.WorkerSizeID != nil { + objectMap["workerSizeId"] = wp.WorkerSizeID + } + if wp.ComputeMode != "" { + objectMap["computeMode"] = wp.ComputeMode + } + if wp.WorkerSize != nil { + objectMap["workerSize"] = wp.WorkerSize + } + if wp.WorkerCount != nil { + objectMap["workerCount"] = wp.WorkerCount + } + return json.Marshal(objectMap) +} + +// WorkerPoolCollection collection of worker pools. +type WorkerPoolCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]TriggeredWebJob `json:"value,omitempty"` + Value *[]WorkerPoolResource `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for TriggeredWebJobCollection. -func (twjc TriggeredWebJobCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for WorkerPoolCollection. +func (wpc WorkerPoolCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if twjc.Value != nil { - objectMap["value"] = twjc.Value + if wpc.Value != nil { + objectMap["value"] = wpc.Value } return json.Marshal(objectMap) } -// TriggeredWebJobCollectionIterator provides access to a complete listing of TriggeredWebJob values. -type TriggeredWebJobCollectionIterator struct { +// WorkerPoolCollectionIterator provides access to a complete listing of WorkerPoolResource values. +type WorkerPoolCollectionIterator struct { i int - page TriggeredWebJobCollectionPage + page WorkerPoolCollectionPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *TriggeredWebJobCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *WorkerPoolCollectionIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TriggeredWebJobCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/WorkerPoolCollectionIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -31225,67 +35036,67 @@ func (iter *TriggeredWebJobCollectionIterator) NextWithContext(ctx context.Conte // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *TriggeredWebJobCollectionIterator) Next() error { +func (iter *WorkerPoolCollectionIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter TriggeredWebJobCollectionIterator) NotDone() bool { +func (iter WorkerPoolCollectionIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter TriggeredWebJobCollectionIterator) Response() TriggeredWebJobCollection { +func (iter WorkerPoolCollectionIterator) Response() WorkerPoolCollection { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter TriggeredWebJobCollectionIterator) Value() TriggeredWebJob { +func (iter WorkerPoolCollectionIterator) Value() WorkerPoolResource { if !iter.page.NotDone() { - return TriggeredWebJob{} + return WorkerPoolResource{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the TriggeredWebJobCollectionIterator type. -func NewTriggeredWebJobCollectionIterator(page TriggeredWebJobCollectionPage) TriggeredWebJobCollectionIterator { - return TriggeredWebJobCollectionIterator{page: page} +// Creates a new instance of the WorkerPoolCollectionIterator type. +func NewWorkerPoolCollectionIterator(page WorkerPoolCollectionPage) WorkerPoolCollectionIterator { + return WorkerPoolCollectionIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (twjc TriggeredWebJobCollection) IsEmpty() bool { - return twjc.Value == nil || len(*twjc.Value) == 0 +func (wpc WorkerPoolCollection) IsEmpty() bool { + return wpc.Value == nil || len(*wpc.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (twjc TriggeredWebJobCollection) hasNextLink() bool { - return twjc.NextLink != nil && len(*twjc.NextLink) != 0 +func (wpc WorkerPoolCollection) hasNextLink() bool { + return wpc.NextLink != nil && len(*wpc.NextLink) != 0 } -// triggeredWebJobCollectionPreparer prepares a request to retrieve the next set of results. +// workerPoolCollectionPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (twjc TriggeredWebJobCollection) triggeredWebJobCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !twjc.hasNextLink() { +func (wpc WorkerPoolCollection) workerPoolCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !wpc.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(twjc.NextLink))) + autorest.WithBaseURL(to.String(wpc.NextLink))) } -// TriggeredWebJobCollectionPage contains a page of TriggeredWebJob values. -type TriggeredWebJobCollectionPage struct { - fn func(context.Context, TriggeredWebJobCollection) (TriggeredWebJobCollection, error) - twjc TriggeredWebJobCollection +// WorkerPoolCollectionPage contains a page of WorkerPoolResource values. +type WorkerPoolCollectionPage struct { + fn func(context.Context, WorkerPoolCollection) (WorkerPoolCollection, error) + wpc WorkerPoolCollection } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *TriggeredWebJobCollectionPage) NextWithContext(ctx context.Context) (err error) { +func (page *WorkerPoolCollectionPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TriggeredWebJobCollectionPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/WorkerPoolCollectionPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -31295,11 +35106,11 @@ func (page *TriggeredWebJobCollectionPage) NextWithContext(ctx context.Context) }() } for { - next, err := page.fn(ctx, page.twjc) + next, err := page.fn(ctx, page.wpc) if err != nil { return err } - page.twjc = next + page.wpc = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -31310,143 +35121,173 @@ func (page *TriggeredWebJobCollectionPage) NextWithContext(ctx context.Context) // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *TriggeredWebJobCollectionPage) Next() error { +func (page *WorkerPoolCollectionPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page TriggeredWebJobCollectionPage) NotDone() bool { - return !page.twjc.IsEmpty() +func (page WorkerPoolCollectionPage) NotDone() bool { + return !page.wpc.IsEmpty() } // Response returns the raw server response from the last page request. -func (page TriggeredWebJobCollectionPage) Response() TriggeredWebJobCollection { - return page.twjc +func (page WorkerPoolCollectionPage) Response() WorkerPoolCollection { + return page.wpc } // Values returns the slice of values for the current page or nil if there are no values. -func (page TriggeredWebJobCollectionPage) Values() []TriggeredWebJob { - if page.twjc.IsEmpty() { +func (page WorkerPoolCollectionPage) Values() []WorkerPoolResource { + if page.wpc.IsEmpty() { return nil } - return *page.twjc.Value + return *page.wpc.Value } -// Creates a new instance of the TriggeredWebJobCollectionPage type. -func NewTriggeredWebJobCollectionPage(cur TriggeredWebJobCollection, getNextPage func(context.Context, TriggeredWebJobCollection) (TriggeredWebJobCollection, error)) TriggeredWebJobCollectionPage { - return TriggeredWebJobCollectionPage{ - fn: getNextPage, - twjc: cur, +// Creates a new instance of the WorkerPoolCollectionPage type. +func NewWorkerPoolCollectionPage(cur WorkerPoolCollection, getNextPage func(context.Context, WorkerPoolCollection) (WorkerPoolCollection, error)) WorkerPoolCollectionPage { + return WorkerPoolCollectionPage{ + fn: getNextPage, + wpc: cur, } } -// TriggeredWebJobProperties triggeredWebJob resource specific properties -type TriggeredWebJobProperties struct { - // LatestRun - Latest job run information. - LatestRun *TriggeredJobRun `json:"latest_run,omitempty"` - // HistoryURL - History URL. - HistoryURL *string `json:"history_url,omitempty"` - // SchedulerLogsURL - Scheduler Logs URL. - SchedulerLogsURL *string `json:"scheduler_logs_url,omitempty"` - // RunCommand - Run command. - RunCommand *string `json:"run_command,omitempty"` - // URL - Job URL. - URL *string `json:"url,omitempty"` - // ExtraInfoURL - Extra Info URL. - ExtraInfoURL *string `json:"extra_info_url,omitempty"` - // WebJobType - Job type. Possible values include: 'JobTypeContinuous', 'JobTypeTriggered' - WebJobType JobType `json:"web_job_type,omitempty"` - // Error - Error information. - Error *string `json:"error,omitempty"` - // UsingSdk - Using SDK? - UsingSdk *bool `json:"using_sdk,omitempty"` - // Settings - Job settings. - Settings map[string]interface{} `json:"settings"` +// WorkerPoolResource worker pool of an App Service Environment ARM resource. +type WorkerPoolResource struct { + autorest.Response `json:"-"` + // WorkerPool - Core resource properties + *WorkerPool `json:"properties,omitempty"` + Sku *SkuDescription `json:"sku,omitempty"` + // ID - READ-ONLY; Resource Id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for TriggeredWebJobProperties. -func (twj TriggeredWebJobProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for WorkerPoolResource. +func (wpr WorkerPoolResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if twj.LatestRun != nil { - objectMap["latest_run"] = twj.LatestRun - } - if twj.HistoryURL != nil { - objectMap["history_url"] = twj.HistoryURL - } - if twj.SchedulerLogsURL != nil { - objectMap["scheduler_logs_url"] = twj.SchedulerLogsURL - } - if twj.RunCommand != nil { - objectMap["run_command"] = twj.RunCommand - } - if twj.URL != nil { - objectMap["url"] = twj.URL - } - if twj.ExtraInfoURL != nil { - objectMap["extra_info_url"] = twj.ExtraInfoURL - } - if twj.WebJobType != "" { - objectMap["web_job_type"] = twj.WebJobType - } - if twj.Error != nil { - objectMap["error"] = twj.Error + if wpr.WorkerPool != nil { + objectMap["properties"] = wpr.WorkerPool } - if twj.UsingSdk != nil { - objectMap["using_sdk"] = twj.UsingSdk + if wpr.Sku != nil { + objectMap["sku"] = wpr.Sku } - if twj.Settings != nil { - objectMap["settings"] = twj.Settings + if wpr.Kind != nil { + objectMap["kind"] = wpr.Kind } return json.Marshal(objectMap) } -// Twitter the configuration settings of the Twitter provider. -type Twitter struct { - // Enabled - false if the Twitter provider should not be enabled despite the set registration; otherwise, true. - Enabled *bool `json:"enabled,omitempty"` - // Registration - The configuration settings of the app registration for the Twitter provider. - Registration *TwitterRegistration `json:"registration,omitempty"` -} +// UnmarshalJSON is the custom unmarshaler for WorkerPoolResource struct. +func (wpr *WorkerPoolResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var workerPool WorkerPool + err = json.Unmarshal(*v, &workerPool) + if err != nil { + return err + } + wpr.WorkerPool = &workerPool + } + case "sku": + if v != nil { + var sku SkuDescription + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + wpr.Sku = &sku + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + wpr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + wpr.Name = &name + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + wpr.Kind = &kind + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + wpr.Type = &typeVar + } + } + } -// TwitterRegistration the configuration settings of the app registration for the Twitter provider. -type TwitterRegistration struct { - // ConsumerKey - The OAuth 1.0a consumer key of the Twitter application used for sign-in. - // This setting is required for enabling Twitter Sign-In. - // Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in - ConsumerKey *string `json:"consumerKey,omitempty"` - // ConsumerSecretSettingName - The app setting name that contains the OAuth 1.0a consumer secret of the Twitter - // application used for sign-in. - ConsumerSecretSettingName *string `json:"consumerSecretSettingName,omitempty"` + return nil } -// Usage usage of the quota resource. -type Usage struct { - // UsageProperties - Usage resource specific properties - *UsageProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. +// Workflow the workflow type. +type Workflow struct { + // WorkflowProperties - The workflow properties. + *WorkflowProperties `json:"properties,omitempty"` + Identity *ManagedServiceIdentity `json:"identity,omitempty"` + // ID - READ-ONLY; The resource id. ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. + // Name - READ-ONLY; Gets the resource name. Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. + // Type - READ-ONLY; Gets the resource type. Type *string `json:"type,omitempty"` + // Location - The resource location. + Location *string `json:"location,omitempty"` + // Tags - The resource tags. + Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for Usage. -func (u Usage) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for Workflow. +func (w Workflow) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if u.UsageProperties != nil { - objectMap["properties"] = u.UsageProperties + if w.WorkflowProperties != nil { + objectMap["properties"] = w.WorkflowProperties } - if u.Kind != nil { - objectMap["kind"] = u.Kind + if w.Identity != nil { + objectMap["identity"] = w.Identity + } + if w.Location != nil { + objectMap["location"] = w.Location + } + if w.Tags != nil { + objectMap["tags"] = w.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for Usage struct. -func (u *Usage) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for Workflow struct. +func (w *Workflow) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -31456,12 +35297,21 @@ func (u *Usage) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var usageProperties UsageProperties - err = json.Unmarshal(*v, &usageProperties) + var workflowProperties WorkflowProperties + err = json.Unmarshal(*v, &workflowProperties) if err != nil { return err } - u.UsageProperties = &usageProperties + w.WorkflowProperties = &workflowProperties + } + case "identity": + if v != nil { + var identity ManagedServiceIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + w.Identity = &identity } case "id": if v != nil { @@ -31470,7 +35320,7 @@ func (u *Usage) UnmarshalJSON(body []byte) error { if err != nil { return err } - u.ID = &ID + w.ID = &ID } case "name": if v != nil { @@ -31479,25 +35329,34 @@ func (u *Usage) UnmarshalJSON(body []byte) error { if err != nil { return err } - u.Name = &name + w.Name = &name } - case "kind": + case "type": if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) + var typeVar string + err = json.Unmarshal(*v, &typeVar) if err != nil { return err } - u.Kind = &kind + w.Type = &typeVar } - case "type": + case "location": if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) + var location string + err = json.Unmarshal(*v, &location) if err != nil { return err } - u.Type = &typeVar + w.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + w.Tags = tags } } } @@ -31505,35 +35364,92 @@ func (u *Usage) UnmarshalJSON(body []byte) error { return nil } -// UsageCollection collection of usages. -type UsageCollection struct { +// WorkflowArtifacts the workflow filter. +type WorkflowArtifacts struct { + // AppSettings - Application settings of the workflow. + AppSettings interface{} `json:"appSettings,omitempty"` + // Files - Files of the app. + Files map[string]interface{} `json:"files"` + // FilesToDelete - Files of the app to delete. + FilesToDelete *[]string `json:"filesToDelete,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkflowArtifacts. +func (wa WorkflowArtifacts) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wa.AppSettings != nil { + objectMap["appSettings"] = wa.AppSettings + } + if wa.Files != nil { + objectMap["files"] = wa.Files + } + if wa.FilesToDelete != nil { + objectMap["filesToDelete"] = wa.FilesToDelete + } + return json.Marshal(objectMap) +} + +// WorkflowEnvelope workflow properties definition. +type WorkflowEnvelope struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; The resource id. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Gets the resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Gets the resource type. + Type *string `json:"type,omitempty"` + // Kind - The resource kind. + Kind *string `json:"kind,omitempty"` + // Location - The resource location. + Location *string `json:"location,omitempty"` + // Properties - Additional workflow properties. + Properties *WorkflowEnvelopeProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkflowEnvelope. +func (we WorkflowEnvelope) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if we.Kind != nil { + objectMap["kind"] = we.Kind + } + if we.Location != nil { + objectMap["location"] = we.Location + } + if we.Properties != nil { + objectMap["properties"] = we.Properties + } + return json.Marshal(objectMap) +} + +// WorkflowEnvelopeCollection collection of Kudu workflow information elements. +type WorkflowEnvelopeCollection struct { autorest.Response `json:"-"` // Value - Collection of resources. - Value *[]Usage `json:"value,omitempty"` + Value *[]WorkflowEnvelope `json:"value,omitempty"` // NextLink - READ-ONLY; Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for UsageCollection. -func (uc UsageCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for WorkflowEnvelopeCollection. +func (wec WorkflowEnvelopeCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if uc.Value != nil { - objectMap["value"] = uc.Value + if wec.Value != nil { + objectMap["value"] = wec.Value } return json.Marshal(objectMap) } -// UsageCollectionIterator provides access to a complete listing of Usage values. -type UsageCollectionIterator struct { +// WorkflowEnvelopeCollectionIterator provides access to a complete listing of WorkflowEnvelope values. +type WorkflowEnvelopeCollectionIterator struct { i int - page UsageCollectionPage + page WorkflowEnvelopeCollectionPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *UsageCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *WorkflowEnvelopeCollectionIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/UsageCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowEnvelopeCollectionIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -31558,67 +35474,67 @@ func (iter *UsageCollectionIterator) NextWithContext(ctx context.Context) (err e // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *UsageCollectionIterator) Next() error { +func (iter *WorkflowEnvelopeCollectionIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter UsageCollectionIterator) NotDone() bool { +func (iter WorkflowEnvelopeCollectionIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter UsageCollectionIterator) Response() UsageCollection { +func (iter WorkflowEnvelopeCollectionIterator) Response() WorkflowEnvelopeCollection { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter UsageCollectionIterator) Value() Usage { +func (iter WorkflowEnvelopeCollectionIterator) Value() WorkflowEnvelope { if !iter.page.NotDone() { - return Usage{} + return WorkflowEnvelope{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the UsageCollectionIterator type. -func NewUsageCollectionIterator(page UsageCollectionPage) UsageCollectionIterator { - return UsageCollectionIterator{page: page} +// Creates a new instance of the WorkflowEnvelopeCollectionIterator type. +func NewWorkflowEnvelopeCollectionIterator(page WorkflowEnvelopeCollectionPage) WorkflowEnvelopeCollectionIterator { + return WorkflowEnvelopeCollectionIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (uc UsageCollection) IsEmpty() bool { - return uc.Value == nil || len(*uc.Value) == 0 +func (wec WorkflowEnvelopeCollection) IsEmpty() bool { + return wec.Value == nil || len(*wec.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (uc UsageCollection) hasNextLink() bool { - return uc.NextLink != nil && len(*uc.NextLink) != 0 +func (wec WorkflowEnvelopeCollection) hasNextLink() bool { + return wec.NextLink != nil && len(*wec.NextLink) != 0 } -// usageCollectionPreparer prepares a request to retrieve the next set of results. +// workflowEnvelopeCollectionPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (uc UsageCollection) usageCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !uc.hasNextLink() { +func (wec WorkflowEnvelopeCollection) workflowEnvelopeCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !wec.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(uc.NextLink))) + autorest.WithBaseURL(to.String(wec.NextLink))) } - -// UsageCollectionPage contains a page of Usage values. -type UsageCollectionPage struct { - fn func(context.Context, UsageCollection) (UsageCollection, error) - uc UsageCollection + +// WorkflowEnvelopeCollectionPage contains a page of WorkflowEnvelope values. +type WorkflowEnvelopeCollectionPage struct { + fn func(context.Context, WorkflowEnvelopeCollection) (WorkflowEnvelopeCollection, error) + wec WorkflowEnvelopeCollection } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *UsageCollectionPage) NextWithContext(ctx context.Context) (err error) { +func (page *WorkflowEnvelopeCollectionPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/UsageCollectionPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowEnvelopeCollectionPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -31628,11 +35544,11 @@ func (page *UsageCollectionPage) NextWithContext(ctx context.Context) (err error }() } for { - next, err := page.fn(ctx, page.uc) + next, err := page.fn(ctx, page.wec) if err != nil { return err } - page.uc = next + page.wec = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -31643,91 +35559,239 @@ func (page *UsageCollectionPage) NextWithContext(ctx context.Context) (err error // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *UsageCollectionPage) Next() error { +func (page *WorkflowEnvelopeCollectionPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page UsageCollectionPage) NotDone() bool { - return !page.uc.IsEmpty() +func (page WorkflowEnvelopeCollectionPage) NotDone() bool { + return !page.wec.IsEmpty() } // Response returns the raw server response from the last page request. -func (page UsageCollectionPage) Response() UsageCollection { - return page.uc +func (page WorkflowEnvelopeCollectionPage) Response() WorkflowEnvelopeCollection { + return page.wec } // Values returns the slice of values for the current page or nil if there are no values. -func (page UsageCollectionPage) Values() []Usage { - if page.uc.IsEmpty() { +func (page WorkflowEnvelopeCollectionPage) Values() []WorkflowEnvelope { + if page.wec.IsEmpty() { return nil } - return *page.uc.Value + return *page.wec.Value } -// Creates a new instance of the UsageCollectionPage type. -func NewUsageCollectionPage(cur UsageCollection, getNextPage func(context.Context, UsageCollection) (UsageCollection, error)) UsageCollectionPage { - return UsageCollectionPage{ - fn: getNextPage, - uc: cur, +// Creates a new instance of the WorkflowEnvelopeCollectionPage type. +func NewWorkflowEnvelopeCollectionPage(cur WorkflowEnvelopeCollection, getNextPage func(context.Context, WorkflowEnvelopeCollection) (WorkflowEnvelopeCollection, error)) WorkflowEnvelopeCollectionPage { + return WorkflowEnvelopeCollectionPage{ + fn: getNextPage, + wec: cur, } } -// UsageProperties usage resource specific properties -type UsageProperties struct { - // DisplayName - READ-ONLY; Friendly name shown in the UI. - DisplayName *string `json:"displayName,omitempty"` - // ResourceName - READ-ONLY; Name of the quota resource. - ResourceName *string `json:"resourceName,omitempty"` - // Unit - READ-ONLY; Units of measurement for the quota resource. - Unit *string `json:"unit,omitempty"` - // CurrentValue - READ-ONLY; The current value of the resource counter. - CurrentValue *int64 `json:"currentValue,omitempty"` - // Limit - READ-ONLY; The resource limit. - Limit *int64 `json:"limit,omitempty"` - // NextResetTime - READ-ONLY; Next reset time for the resource counter. - NextResetTime *date.Time `json:"nextResetTime,omitempty"` - // ComputeMode - READ-ONLY; Compute mode used for this usage. Possible values include: 'ComputeModeOptionsShared', 'ComputeModeOptionsDedicated', 'ComputeModeOptionsDynamic' - ComputeMode ComputeModeOptions `json:"computeMode,omitempty"` - // SiteMode - READ-ONLY; Site mode used for this usage. - SiteMode *string `json:"siteMode,omitempty"` +// WorkflowEnvelopeProperties additional workflow properties. +type WorkflowEnvelopeProperties struct { + // Files - Gets or sets the files. + Files map[string]interface{} `json:"files"` + // FlowState - Gets or sets the state of the workflow. Possible values include: 'WorkflowStateNotSpecified', 'WorkflowStateCompleted', 'WorkflowStateEnabled', 'WorkflowStateDisabled', 'WorkflowStateDeleted', 'WorkflowStateSuspended' + FlowState WorkflowState `json:"flowState,omitempty"` + // Health - Gets or sets workflow health. + Health *WorkflowHealth `json:"health,omitempty"` } -// MarshalJSON is the custom marshaler for UsageProperties. -func (u UsageProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for WorkflowEnvelopeProperties. +func (we WorkflowEnvelopeProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if we.Files != nil { + objectMap["files"] = we.Files + } + if we.FlowState != "" { + objectMap["flowState"] = we.FlowState + } + if we.Health != nil { + objectMap["health"] = we.Health + } return json.Marshal(objectMap) } -// User user credentials used for publishing activity. -type User struct { - autorest.Response `json:"-"` - // UserProperties - User resource specific properties - *UserProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. +// WorkflowFilter the workflow filter. +type WorkflowFilter struct { + // State - The state of workflows. Possible values include: 'WorkflowStateNotSpecified', 'WorkflowStateCompleted', 'WorkflowStateEnabled', 'WorkflowStateDisabled', 'WorkflowStateDeleted', 'WorkflowStateSuspended' + State WorkflowState `json:"state,omitempty"` +} + +// WorkflowHealth represents the workflow health. +type WorkflowHealth struct { + // State - Gets or sets the workflow health state. Possible values include: 'WorkflowHealthStateNotSpecified', 'WorkflowHealthStateHealthy', 'WorkflowHealthStateUnhealthy', 'WorkflowHealthStateUnknown' + State WorkflowHealthState `json:"state,omitempty"` + // Error - Gets or sets the workflow error. + Error *ErrorEntity `json:"error,omitempty"` +} + +// WorkflowListResult the list of workflows. +type WorkflowListResult struct { + // Value - The list of workflows. + Value *[]Workflow `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// WorkflowOutputParameter the workflow output parameter. +type WorkflowOutputParameter struct { + // Error - READ-ONLY; Gets the error. + Error interface{} `json:"error,omitempty"` + // Type - The type. Possible values include: 'ParameterTypeNotSpecified', 'ParameterTypeString', 'ParameterTypeSecureString', 'ParameterTypeInt', 'ParameterTypeFloat', 'ParameterTypeBool', 'ParameterTypeArray', 'ParameterTypeObject', 'ParameterTypeSecureObject' + Type ParameterType `json:"type,omitempty"` + // Value - The value. + Value interface{} `json:"value,omitempty"` + // Metadata - The metadata. + Metadata interface{} `json:"metadata,omitempty"` + // Description - The description. + Description *string `json:"description,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkflowOutputParameter. +func (wop WorkflowOutputParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wop.Type != "" { + objectMap["type"] = wop.Type + } + if wop.Value != nil { + objectMap["value"] = wop.Value + } + if wop.Metadata != nil { + objectMap["metadata"] = wop.Metadata + } + if wop.Description != nil { + objectMap["description"] = wop.Description + } + return json.Marshal(objectMap) +} + +// WorkflowParameter the workflow parameters. +type WorkflowParameter struct { + // Type - The type. Possible values include: 'ParameterTypeNotSpecified', 'ParameterTypeString', 'ParameterTypeSecureString', 'ParameterTypeInt', 'ParameterTypeFloat', 'ParameterTypeBool', 'ParameterTypeArray', 'ParameterTypeObject', 'ParameterTypeSecureObject' + Type ParameterType `json:"type,omitempty"` + // Value - The value. + Value interface{} `json:"value,omitempty"` + // Metadata - The metadata. + Metadata interface{} `json:"metadata,omitempty"` + // Description - The description. + Description *string `json:"description,omitempty"` +} + +// WorkflowProperties the workflow properties. +type WorkflowProperties struct { + // ProvisioningState - READ-ONLY; Gets the provisioning state. Possible values include: 'WorkflowProvisioningStateNotSpecified', 'WorkflowProvisioningStateAccepted', 'WorkflowProvisioningStateRunning', 'WorkflowProvisioningStateReady', 'WorkflowProvisioningStateCreating', 'WorkflowProvisioningStateCreated', 'WorkflowProvisioningStateDeleting', 'WorkflowProvisioningStateDeleted', 'WorkflowProvisioningStateCanceled', 'WorkflowProvisioningStateFailed', 'WorkflowProvisioningStateSucceeded', 'WorkflowProvisioningStateMoving', 'WorkflowProvisioningStateUpdating', 'WorkflowProvisioningStateRegistering', 'WorkflowProvisioningStateRegistered', 'WorkflowProvisioningStateUnregistering', 'WorkflowProvisioningStateUnregistered', 'WorkflowProvisioningStateCompleted', 'WorkflowProvisioningStateRenewing', 'WorkflowProvisioningStatePending', 'WorkflowProvisioningStateWaiting', 'WorkflowProvisioningStateInProgress' + ProvisioningState WorkflowProvisioningState `json:"provisioningState,omitempty"` + // CreatedTime - READ-ONLY; Gets the created time. + CreatedTime *date.Time `json:"createdTime,omitempty"` + // ChangedTime - READ-ONLY; Gets the changed time. + ChangedTime *date.Time `json:"changedTime,omitempty"` + // State - The state. Possible values include: 'WorkflowStateNotSpecified', 'WorkflowStateCompleted', 'WorkflowStateEnabled', 'WorkflowStateDisabled', 'WorkflowStateDeleted', 'WorkflowStateSuspended' + State WorkflowState `json:"state,omitempty"` + // Version - READ-ONLY; Gets the version. + Version *string `json:"version,omitempty"` + // AccessEndpoint - READ-ONLY; Gets the access endpoint. + AccessEndpoint *string `json:"accessEndpoint,omitempty"` + // EndpointsConfiguration - The endpoints configuration. + EndpointsConfiguration *FlowEndpointsConfiguration `json:"endpointsConfiguration,omitempty"` + // AccessControl - The access control configuration. + AccessControl *FlowAccessControlConfiguration `json:"accessControl,omitempty"` + // Sku - READ-ONLY; The sku. + Sku *WorkflowSku `json:"sku,omitempty"` + // IntegrationAccount - The integration account. + IntegrationAccount *ResourceReference `json:"integrationAccount,omitempty"` + // IntegrationServiceEnvironment - The integration service environment. + IntegrationServiceEnvironment *ResourceReference `json:"integrationServiceEnvironment,omitempty"` + // Definition - The definition. + Definition interface{} `json:"definition,omitempty"` + // Parameters - The parameters. + Parameters map[string]*WorkflowParameter `json:"parameters"` + // Kind - The workflow kind. Possible values include: 'KindStateful', 'KindStateless' + Kind Kind `json:"kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkflowProperties. +func (wp WorkflowProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wp.State != "" { + objectMap["state"] = wp.State + } + if wp.EndpointsConfiguration != nil { + objectMap["endpointsConfiguration"] = wp.EndpointsConfiguration + } + if wp.AccessControl != nil { + objectMap["accessControl"] = wp.AccessControl + } + if wp.IntegrationAccount != nil { + objectMap["integrationAccount"] = wp.IntegrationAccount + } + if wp.IntegrationServiceEnvironment != nil { + objectMap["integrationServiceEnvironment"] = wp.IntegrationServiceEnvironment + } + if wp.Definition != nil { + objectMap["definition"] = wp.Definition + } + if wp.Parameters != nil { + objectMap["parameters"] = wp.Parameters + } + if wp.Kind != "" { + objectMap["kind"] = wp.Kind + } + return json.Marshal(objectMap) +} + +// WorkflowResource the base resource type. +type WorkflowResource struct { + // ID - READ-ONLY; The resource id. ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. + // Name - READ-ONLY; Gets the resource name. Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. + // Type - READ-ONLY; Gets the resource type. Type *string `json:"type,omitempty"` + // Location - The resource location. + Location *string `json:"location,omitempty"` + // Tags - The resource tags. + Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for User. -func (u User) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for WorkflowResource. +func (wr WorkflowResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if u.UserProperties != nil { - objectMap["properties"] = u.UserProperties + if wr.Location != nil { + objectMap["location"] = wr.Location } - if u.Kind != nil { - objectMap["kind"] = u.Kind + if wr.Tags != nil { + objectMap["tags"] = wr.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for User struct. -func (u *User) UnmarshalJSON(body []byte) error { +// WorkflowRun the workflow run. +type WorkflowRun struct { + autorest.Response `json:"-"` + // WorkflowRunProperties - The workflow run properties. + *WorkflowRunProperties `json:"properties,omitempty"` + // Name - READ-ONLY; Gets the workflow run name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Gets the workflow run type. + Type *string `json:"type,omitempty"` + // ID - READ-ONLY; The resource id. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkflowRun. +func (wr WorkflowRun) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wr.WorkflowRunProperties != nil { + objectMap["properties"] = wr.WorkflowRunProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for WorkflowRun struct. +func (wr *WorkflowRun) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -31737,21 +35801,12 @@ func (u *User) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var userProperties UserProperties - err = json.Unmarshal(*v, &userProperties) - if err != nil { - return err - } - u.UserProperties = &userProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + var workflowRunProperties WorkflowRunProperties + err = json.Unmarshal(*v, &workflowRunProperties) if err != nil { return err } - u.ID = &ID + wr.WorkflowRunProperties = &workflowRunProperties } case "name": if v != nil { @@ -31760,25 +35815,25 @@ func (u *User) UnmarshalJSON(body []byte) error { if err != nil { return err } - u.Name = &name + wr.Name = &name } - case "kind": + case "type": if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) + var typeVar string + err = json.Unmarshal(*v, &typeVar) if err != nil { return err } - u.Kind = &kind + wr.Type = &typeVar } - case "type": + case "id": if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) + var ID string + err = json.Unmarshal(*v, &ID) if err != nil { return err } - u.Type = &typeVar + wr.ID = &ID } } } @@ -31786,98 +35841,30 @@ func (u *User) UnmarshalJSON(body []byte) error { return nil } -// UserAssignedIdentity user Assigned identity. -type UserAssignedIdentity struct { - // PrincipalID - READ-ONLY; Principal Id of user assigned identity - PrincipalID *string `json:"principalId,omitempty"` - // ClientID - READ-ONLY; Client Id of user assigned identity - ClientID *string `json:"clientId,omitempty"` -} - -// MarshalJSON is the custom marshaler for UserAssignedIdentity. -func (uai UserAssignedIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// UserProperties user resource specific properties -type UserProperties struct { - // PublishingUserName - Username used for publishing. - PublishingUserName *string `json:"publishingUserName,omitempty"` - // PublishingPassword - Password used for publishing. - PublishingPassword *string `json:"publishingPassword,omitempty"` - // PublishingPasswordHash - Password hash used for publishing. - PublishingPasswordHash *string `json:"publishingPasswordHash,omitempty"` - // PublishingPasswordHashSalt - Password hash salt used for publishing. - PublishingPasswordHashSalt *string `json:"publishingPasswordHashSalt,omitempty"` - // ScmURI - Url of SCM site. - ScmURI *string `json:"scmUri,omitempty"` -} - -// ValidateProperties app properties used for validation. -type ValidateProperties struct { - // ServerFarmID - ARM resource ID of an App Service plan that would host the app. - ServerFarmID *string `json:"serverFarmId,omitempty"` - // SkuName - Name of the target SKU for the App Service plan. - SkuName *string `json:"skuName,omitempty"` - // NeedLinuxWorkers - true if App Service plan is for Linux workers; otherwise, false. - NeedLinuxWorkers *bool `json:"needLinuxWorkers,omitempty"` - // IsSpot - true if App Service plan is for Spot instances; otherwise, false. - IsSpot *bool `json:"isSpot,omitempty"` - // Capacity - Target capacity of the App Service plan (number of VMs). - Capacity *int32 `json:"capacity,omitempty"` - // HostingEnvironment - Name of App Service Environment where app or App Service plan should be created. - HostingEnvironment *string `json:"hostingEnvironment,omitempty"` - // IsXenon - true if App Service plan is running as a windows container - IsXenon *bool `json:"isXenon,omitempty"` - // ContainerRegistryBaseURL - Base URL of the container registry - ContainerRegistryBaseURL *string `json:"containerRegistryBaseUrl,omitempty"` - // ContainerRegistryUsername - Username for to access the container registry - ContainerRegistryUsername *string `json:"containerRegistryUsername,omitempty"` - // ContainerRegistryPassword - Password for to access the container registry - ContainerRegistryPassword *string `json:"containerRegistryPassword,omitempty"` - // ContainerImageRepository - Repository name (image name) - ContainerImageRepository *string `json:"containerImageRepository,omitempty"` - // ContainerImageTag - Image tag - ContainerImageTag *string `json:"containerImageTag,omitempty"` - // ContainerImagePlatform - Platform (windows or linux) - ContainerImagePlatform *string `json:"containerImagePlatform,omitempty"` - // AppServiceEnvironment - App Service Environment Properties - AppServiceEnvironment *AppServiceEnvironment `json:"appServiceEnvironment,omitempty"` -} - -// ValidateRequest resource validation request content. -type ValidateRequest struct { - // Name - Resource name to verify. +// WorkflowRunAction the workflow run action. +type WorkflowRunAction struct { + autorest.Response `json:"-"` + // WorkflowRunActionProperties - The workflow run action properties. + *WorkflowRunActionProperties `json:"properties,omitempty"` + // Name - READ-ONLY; Gets the workflow run action name. Name *string `json:"name,omitempty"` - // Type - Resource type used for verification. Possible values include: 'ValidateResourceTypesServerFarm', 'ValidateResourceTypesSite', 'ValidateResourceTypesMicrosoftWebhostingEnvironments' - Type ValidateResourceTypes `json:"type,omitempty"` - // Location - Expected location of the resource. - Location *string `json:"location,omitempty"` - // ValidateProperties - Properties of the resource to validate. - *ValidateProperties `json:"properties,omitempty"` + // Type - READ-ONLY; Gets the workflow run action type. + Type *string `json:"type,omitempty"` + // ID - READ-ONLY; The resource id. + ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for ValidateRequest. -func (vr ValidateRequest) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for WorkflowRunAction. +func (wra WorkflowRunAction) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if vr.Name != nil { - objectMap["name"] = vr.Name - } - if vr.Type != "" { - objectMap["type"] = vr.Type - } - if vr.Location != nil { - objectMap["location"] = vr.Location - } - if vr.ValidateProperties != nil { - objectMap["properties"] = vr.ValidateProperties + if wra.WorkflowRunActionProperties != nil { + objectMap["properties"] = wra.WorkflowRunActionProperties } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ValidateRequest struct. -func (vr *ValidateRequest) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for WorkflowRunAction struct. +func (wra *WorkflowRunAction) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -31885,41 +35872,41 @@ func (vr *ValidateRequest) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { - case "name": + case "properties": if v != nil { - var name string - err = json.Unmarshal(*v, &name) + var workflowRunActionProperties WorkflowRunActionProperties + err = json.Unmarshal(*v, &workflowRunActionProperties) if err != nil { return err } - vr.Name = &name + wra.WorkflowRunActionProperties = &workflowRunActionProperties } - case "type": + case "name": if v != nil { - var typeVar ValidateResourceTypes - err = json.Unmarshal(*v, &typeVar) + var name string + err = json.Unmarshal(*v, &name) if err != nil { return err } - vr.Type = typeVar + wra.Name = &name } - case "location": + case "type": if v != nil { - var location string - err = json.Unmarshal(*v, &location) + var typeVar string + err = json.Unmarshal(*v, &typeVar) if err != nil { return err } - vr.Location = &location + wra.Type = &typeVar } - case "properties": + case "id": if v != nil { - var validateProperties ValidateProperties - err = json.Unmarshal(*v, &validateProperties) + var ID string + err = json.Unmarshal(*v, &ID) if err != nil { return err } - vr.ValidateProperties = &validateProperties + wra.ID = &ID } } } @@ -31927,243 +35914,243 @@ func (vr *ValidateRequest) UnmarshalJSON(body []byte) error { return nil } -// ValidateResponse describes the result of resource validation. -type ValidateResponse struct { +// WorkflowRunActionFilter the workflow run action filter. +type WorkflowRunActionFilter struct { + // Status - The status of workflow run action. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored' + Status WorkflowStatus `json:"status,omitempty"` +} + +// WorkflowRunActionListResult the list of workflow run actions. +type WorkflowRunActionListResult struct { autorest.Response `json:"-"` - // Status - Result of validation. - Status *string `json:"status,omitempty"` - // Error - Error details for the case when validation fails. - Error *ValidateResponseError `json:"error,omitempty"` + // Value - A list of workflow run actions. + Value *[]WorkflowRunAction `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` } -// ValidateResponseError error details for when validation fails. -type ValidateResponseError struct { - // Code - Validation error code. - Code *string `json:"code,omitempty"` - // Message - Validation error message. - Message *string `json:"message,omitempty"` +// WorkflowRunActionListResultIterator provides access to a complete listing of WorkflowRunAction values. +type WorkflowRunActionListResultIterator struct { + i int + page WorkflowRunActionListResultPage } -// VirtualApplication virtual application in an app. -type VirtualApplication struct { - // VirtualPath - Virtual path. - VirtualPath *string `json:"virtualPath,omitempty"` - // PhysicalPath - Physical path. - PhysicalPath *string `json:"physicalPath,omitempty"` - // PreloadEnabled - true if preloading is enabled; otherwise, false. - PreloadEnabled *bool `json:"preloadEnabled,omitempty"` - // VirtualDirectories - Virtual directories for virtual application. - VirtualDirectories *[]VirtualDirectory `json:"virtualDirectories,omitempty"` +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *WorkflowRunActionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil } -// VirtualDirectory directory for virtual application. -type VirtualDirectory struct { - // VirtualPath - Path to virtual application. - VirtualPath *string `json:"virtualPath,omitempty"` - // PhysicalPath - Physical path. - PhysicalPath *string `json:"physicalPath,omitempty"` +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *WorkflowRunActionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) } -// VirtualIPMapping virtual IP mapping. -type VirtualIPMapping struct { - // VirtualIP - Virtual IP address. - VirtualIP *string `json:"virtualIP,omitempty"` - // InternalHTTPPort - Internal HTTP port. - InternalHTTPPort *int32 `json:"internalHttpPort,omitempty"` - // InternalHTTPSPort - Internal HTTPS port. - InternalHTTPSPort *int32 `json:"internalHttpsPort,omitempty"` - // InUse - Is virtual IP mapping in use. - InUse *bool `json:"inUse,omitempty"` - // ServiceName - name of the service that virtual IP is assigned to - ServiceName *string `json:"serviceName,omitempty"` +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter WorkflowRunActionListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) } -// VirtualNetworkProfile specification for using a Virtual Network. -type VirtualNetworkProfile struct { - // ID - Resource id of the Virtual Network. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Name of the Virtual Network (read-only). - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type of the Virtual Network (read-only). - Type *string `json:"type,omitempty"` - // Subnet - Subnet within the Virtual Network. - Subnet *string `json:"subnet,omitempty"` +// Response returns the raw server response from the last page request. +func (iter WorkflowRunActionListResultIterator) Response() WorkflowRunActionListResult { + return iter.page.Response() } -// MarshalJSON is the custom marshaler for VirtualNetworkProfile. -func (vnp VirtualNetworkProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vnp.ID != nil { - objectMap["id"] = vnp.ID - } - if vnp.Subnet != nil { - objectMap["subnet"] = vnp.Subnet +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter WorkflowRunActionListResultIterator) Value() WorkflowRunAction { + if !iter.page.NotDone() { + return WorkflowRunAction{} } - return json.Marshal(objectMap) + return iter.page.Values()[iter.i] } -// VnetGateway the Virtual Network gateway contract. This is used to give the Virtual Network gateway -// access to the VPN package. -type VnetGateway struct { - autorest.Response `json:"-"` - // VnetGatewayProperties - VnetGateway resource specific properties - *VnetGatewayProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` +// Creates a new instance of the WorkflowRunActionListResultIterator type. +func NewWorkflowRunActionListResultIterator(page WorkflowRunActionListResultPage) WorkflowRunActionListResultIterator { + return WorkflowRunActionListResultIterator{page: page} } -// MarshalJSON is the custom marshaler for VnetGateway. -func (vg VnetGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vg.VnetGatewayProperties != nil { - objectMap["properties"] = vg.VnetGatewayProperties - } - if vg.Kind != nil { - objectMap["kind"] = vg.Kind - } - return json.Marshal(objectMap) +// IsEmpty returns true if the ListResult contains no values. +func (wralr WorkflowRunActionListResult) IsEmpty() bool { + return wralr.Value == nil || len(*wralr.Value) == 0 } -// UnmarshalJSON is the custom unmarshaler for VnetGateway struct. -func (vg *VnetGateway) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err +// hasNextLink returns true if the NextLink is not empty. +func (wralr WorkflowRunActionListResult) hasNextLink() bool { + return wralr.NextLink != nil && len(*wralr.NextLink) != 0 +} + +// workflowRunActionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (wralr WorkflowRunActionListResult) workflowRunActionListResultPreparer(ctx context.Context) (*http.Request, error) { + if !wralr.hasNextLink() { + return nil, nil } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var vnetGatewayProperties VnetGatewayProperties - err = json.Unmarshal(*v, &vnetGatewayProperties) - if err != nil { - return err - } - vg.VnetGatewayProperties = &vnetGatewayProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vg.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vg.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - vg.Kind = &kind - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vg.Type = &typeVar + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(wralr.NextLink))) +} + +// WorkflowRunActionListResultPage contains a page of WorkflowRunAction values. +type WorkflowRunActionListResultPage struct { + fn func(context.Context, WorkflowRunActionListResult) (WorkflowRunActionListResult, error) + wralr WorkflowRunActionListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *WorkflowRunActionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.wralr) + if err != nil { + return err + } + page.wralr = next + if !next.hasNextLink() || !next.IsEmpty() { + break } } - return nil } -// VnetGatewayProperties vnetGateway resource specific properties -type VnetGatewayProperties struct { - // VnetName - The Virtual Network name. - VnetName *string `json:"vnetName,omitempty"` - // VpnPackageURI - The URI where the VPN package can be downloaded. - VpnPackageURI *string `json:"vpnPackageUri,omitempty"` +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *WorkflowRunActionListResultPage) Next() error { + return page.NextWithContext(context.Background()) } -// VnetInfo virtual Network information contract. -type VnetInfo struct { - // VnetResourceID - The Virtual Network's resource ID. - VnetResourceID *string `json:"vnetResourceId,omitempty"` - // CertThumbprint - READ-ONLY; The client certificate thumbprint. - CertThumbprint *string `json:"certThumbprint,omitempty"` - // CertBlob - A certificate file (.cer) blob containing the public key of the private key used to authenticate a - // Point-To-Site VPN connection. - CertBlob *string `json:"certBlob,omitempty"` - // Routes - READ-ONLY; The routes that this Virtual Network connection uses. - Routes *[]VnetRoute `json:"routes,omitempty"` - // ResyncRequired - READ-ONLY; true if a resync is required; otherwise, false. - ResyncRequired *bool `json:"resyncRequired,omitempty"` - // DNSServers - DNS servers to be used by this Virtual Network. This should be a comma-separated list of IP addresses. - DNSServers *string `json:"dnsServers,omitempty"` - // IsSwift - Flag that is used to denote if this is VNET injection - IsSwift *bool `json:"isSwift,omitempty"` +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page WorkflowRunActionListResultPage) NotDone() bool { + return !page.wralr.IsEmpty() } -// MarshalJSON is the custom marshaler for VnetInfo. -func (vi VnetInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vi.VnetResourceID != nil { - objectMap["vnetResourceId"] = vi.VnetResourceID - } - if vi.CertBlob != nil { - objectMap["certBlob"] = vi.CertBlob +// Response returns the raw server response from the last page request. +func (page WorkflowRunActionListResultPage) Response() WorkflowRunActionListResult { + return page.wralr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page WorkflowRunActionListResultPage) Values() []WorkflowRunAction { + if page.wralr.IsEmpty() { + return nil } - if vi.DNSServers != nil { - objectMap["dnsServers"] = vi.DNSServers + return *page.wralr.Value +} + +// Creates a new instance of the WorkflowRunActionListResultPage type. +func NewWorkflowRunActionListResultPage(cur WorkflowRunActionListResult, getNextPage func(context.Context, WorkflowRunActionListResult) (WorkflowRunActionListResult, error)) WorkflowRunActionListResultPage { + return WorkflowRunActionListResultPage{ + fn: getNextPage, + wralr: cur, } - if vi.IsSwift != nil { - objectMap["isSwift"] = vi.IsSwift +} + +// WorkflowRunActionProperties the workflow run action properties. +type WorkflowRunActionProperties struct { + // StartTime - READ-ONLY; Gets the start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - READ-ONLY; Gets the end time. + EndTime *date.Time `json:"endTime,omitempty"` + // Status - READ-ONLY; Gets the status. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored' + Status WorkflowStatus `json:"status,omitempty"` + // Code - READ-ONLY; Gets the code. + Code *string `json:"code,omitempty"` + // Error - READ-ONLY; Gets the error. + Error interface{} `json:"error,omitempty"` + // TrackingID - READ-ONLY; Gets the tracking id. + TrackingID *string `json:"trackingId,omitempty"` + // Correlation - The correlation properties. + Correlation *RunActionCorrelation `json:"correlation,omitempty"` + // InputsLink - READ-ONLY; Gets the link to inputs. + InputsLink *ContentLink `json:"inputsLink,omitempty"` + // OutputsLink - READ-ONLY; Gets the link to outputs. + OutputsLink *ContentLink `json:"outputsLink,omitempty"` + // TrackedProperties - READ-ONLY; Gets the tracked properties. + TrackedProperties interface{} `json:"trackedProperties,omitempty"` + // RetryHistory - Gets the retry histories. + RetryHistory *[]RetryHistory `json:"retryHistory,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkflowRunActionProperties. +func (wrap WorkflowRunActionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wrap.Correlation != nil { + objectMap["correlation"] = wrap.Correlation + } + if wrap.RetryHistory != nil { + objectMap["retryHistory"] = wrap.RetryHistory } return json.Marshal(objectMap) } -// VnetInfoResource virtual Network information ARM resource. -type VnetInfoResource struct { +// WorkflowRunActionRepetitionDefinition the workflow run action repetition definition. +type WorkflowRunActionRepetitionDefinition struct { autorest.Response `json:"-"` - // VnetInfo - Core resource properties - *VnetInfo `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. + // WorkflowRunActionRepetitionProperties - The workflow run action repetition properties definition. + *WorkflowRunActionRepetitionProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The resource id. ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. + // Name - READ-ONLY; Gets the resource name. Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. + // Type - READ-ONLY; Gets the resource type. Type *string `json:"type,omitempty"` + // Location - The resource location. + Location *string `json:"location,omitempty"` + // Tags - The resource tags. + Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for VnetInfoResource. -func (vir VnetInfoResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for WorkflowRunActionRepetitionDefinition. +func (wrard WorkflowRunActionRepetitionDefinition) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if vir.VnetInfo != nil { - objectMap["properties"] = vir.VnetInfo + if wrard.WorkflowRunActionRepetitionProperties != nil { + objectMap["properties"] = wrard.WorkflowRunActionRepetitionProperties } - if vir.Kind != nil { - objectMap["kind"] = vir.Kind + if wrard.Location != nil { + objectMap["location"] = wrard.Location + } + if wrard.Tags != nil { + objectMap["tags"] = wrard.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for VnetInfoResource struct. -func (vir *VnetInfoResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for WorkflowRunActionRepetitionDefinition struct. +func (wrard *WorkflowRunActionRepetitionDefinition) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -32173,12 +36160,12 @@ func (vir *VnetInfoResource) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var vnetInfo VnetInfo - err = json.Unmarshal(*v, &vnetInfo) + var workflowRunActionRepetitionProperties WorkflowRunActionRepetitionProperties + err = json.Unmarshal(*v, &workflowRunActionRepetitionProperties) if err != nil { return err } - vir.VnetInfo = &vnetInfo + wrard.WorkflowRunActionRepetitionProperties = &workflowRunActionRepetitionProperties } case "id": if v != nil { @@ -32187,7 +36174,7 @@ func (vir *VnetInfoResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - vir.ID = &ID + wrard.ID = &ID } case "name": if v != nil { @@ -32196,25 +36183,34 @@ func (vir *VnetInfoResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - vir.Name = &name + wrard.Name = &name } - case "kind": + case "type": if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) + var typeVar string + err = json.Unmarshal(*v, &typeVar) if err != nil { return err } - vir.Kind = &kind + wrard.Type = &typeVar } - case "type": + case "location": if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) + var location string + err = json.Unmarshal(*v, &location) if err != nil { return err } - vir.Type = &typeVar + wrard.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + wrard.Tags = tags } } } @@ -32222,234 +36218,506 @@ func (vir *VnetInfoResource) UnmarshalJSON(body []byte) error { return nil } -// VnetParameters the required set of inputs to validate a VNET -type VnetParameters struct { - // VnetParametersProperties - VnetParameters resource specific properties - *VnetParametersProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` +// WorkflowRunActionRepetitionDefinitionCollection a collection of workflow run action repetitions. +type WorkflowRunActionRepetitionDefinitionCollection struct { + autorest.Response `json:"-"` + // NextLink - The link used to get the next page of recommendations. + NextLink *string `json:"nextLink,omitempty"` + Value *[]WorkflowRunActionRepetitionDefinition `json:"value,omitempty"` } -// MarshalJSON is the custom marshaler for VnetParameters. -func (vp VnetParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vp.VnetParametersProperties != nil { - objectMap["properties"] = vp.VnetParametersProperties - } - if vp.Kind != nil { - objectMap["kind"] = vp.Kind - } - return json.Marshal(objectMap) +// WorkflowRunActionRepetitionDefinitionCollectionIterator provides access to a complete listing of +// WorkflowRunActionRepetitionDefinition values. +type WorkflowRunActionRepetitionDefinitionCollectionIterator struct { + i int + page WorkflowRunActionRepetitionDefinitionCollectionPage } -// UnmarshalJSON is the custom unmarshaler for VnetParameters struct. -func (vp *VnetParameters) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *WorkflowRunActionRepetitionDefinitionCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRepetitionDefinitionCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) if err != nil { + iter.i-- return err } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var vnetParametersProperties VnetParametersProperties - err = json.Unmarshal(*v, &vnetParametersProperties) - if err != nil { - return err - } - vp.VnetParametersProperties = &vnetParametersProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vp.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - vp.Kind = &kind - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vp.Type = &typeVar + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *WorkflowRunActionRepetitionDefinitionCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter WorkflowRunActionRepetitionDefinitionCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter WorkflowRunActionRepetitionDefinitionCollectionIterator) Response() WorkflowRunActionRepetitionDefinitionCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter WorkflowRunActionRepetitionDefinitionCollectionIterator) Value() WorkflowRunActionRepetitionDefinition { + if !iter.page.NotDone() { + return WorkflowRunActionRepetitionDefinition{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the WorkflowRunActionRepetitionDefinitionCollectionIterator type. +func NewWorkflowRunActionRepetitionDefinitionCollectionIterator(page WorkflowRunActionRepetitionDefinitionCollectionPage) WorkflowRunActionRepetitionDefinitionCollectionIterator { + return WorkflowRunActionRepetitionDefinitionCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (wrardc WorkflowRunActionRepetitionDefinitionCollection) IsEmpty() bool { + return wrardc.Value == nil || len(*wrardc.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (wrardc WorkflowRunActionRepetitionDefinitionCollection) hasNextLink() bool { + return wrardc.NextLink != nil && len(*wrardc.NextLink) != 0 +} + +// workflowRunActionRepetitionDefinitionCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (wrardc WorkflowRunActionRepetitionDefinitionCollection) workflowRunActionRepetitionDefinitionCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !wrardc.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(wrardc.NextLink))) +} + +// WorkflowRunActionRepetitionDefinitionCollectionPage contains a page of +// WorkflowRunActionRepetitionDefinition values. +type WorkflowRunActionRepetitionDefinitionCollectionPage struct { + fn func(context.Context, WorkflowRunActionRepetitionDefinitionCollection) (WorkflowRunActionRepetitionDefinitionCollection, error) + wrardc WorkflowRunActionRepetitionDefinitionCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *WorkflowRunActionRepetitionDefinitionCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRepetitionDefinitionCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.wrardc) + if err != nil { + return err + } + page.wrardc = next + if !next.hasNextLink() || !next.IsEmpty() { + break } } - return nil } -// VnetParametersProperties vnetParameters resource specific properties -type VnetParametersProperties struct { - // VnetResourceGroup - The Resource Group of the VNET to be validated - VnetResourceGroup *string `json:"vnetResourceGroup,omitempty"` - // VnetName - The name of the VNET to be validated - VnetName *string `json:"vnetName,omitempty"` - // VnetSubnetName - The subnet name to be validated - VnetSubnetName *string `json:"vnetSubnetName,omitempty"` - // SubnetResourceID - The ARM Resource ID of the subnet to validate - SubnetResourceID *string `json:"subnetResourceId,omitempty"` +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *WorkflowRunActionRepetitionDefinitionCollectionPage) Next() error { + return page.NextWithContext(context.Background()) } -// VnetRoute virtual Network route contract used to pass routing information for a Virtual Network. -type VnetRoute struct { - autorest.Response `json:"-"` - // VnetRouteProperties - VnetRoute resource specific properties - *VnetRouteProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. - Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page WorkflowRunActionRepetitionDefinitionCollectionPage) NotDone() bool { + return !page.wrardc.IsEmpty() } -// MarshalJSON is the custom marshaler for VnetRoute. -func (vr VnetRoute) MarshalJSON() ([]byte, error) { +// Response returns the raw server response from the last page request. +func (page WorkflowRunActionRepetitionDefinitionCollectionPage) Response() WorkflowRunActionRepetitionDefinitionCollection { + return page.wrardc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page WorkflowRunActionRepetitionDefinitionCollectionPage) Values() []WorkflowRunActionRepetitionDefinition { + if page.wrardc.IsEmpty() { + return nil + } + return *page.wrardc.Value +} + +// Creates a new instance of the WorkflowRunActionRepetitionDefinitionCollectionPage type. +func NewWorkflowRunActionRepetitionDefinitionCollectionPage(cur WorkflowRunActionRepetitionDefinitionCollection, getNextPage func(context.Context, WorkflowRunActionRepetitionDefinitionCollection) (WorkflowRunActionRepetitionDefinitionCollection, error)) WorkflowRunActionRepetitionDefinitionCollectionPage { + return WorkflowRunActionRepetitionDefinitionCollectionPage{ + fn: getNextPage, + wrardc: cur, + } +} + +// WorkflowRunActionRepetitionProperties the workflow run action repetition properties definition. +type WorkflowRunActionRepetitionProperties struct { + // RepetitionIndexes - The repetition indexes. + RepetitionIndexes *[]RepetitionIndex `json:"repetitionIndexes,omitempty"` + // TrackingID - READ-ONLY; Gets the tracking id. + TrackingID *string `json:"trackingId,omitempty"` + // Inputs - READ-ONLY; Gets the inputs. + Inputs interface{} `json:"inputs,omitempty"` + // InputsLink - READ-ONLY; Gets the link to inputs. + InputsLink *ContentLink `json:"inputsLink,omitempty"` + // Outputs - READ-ONLY; Gets the outputs. + Outputs interface{} `json:"outputs,omitempty"` + // OutputsLink - READ-ONLY; Gets the link to outputs. + OutputsLink *ContentLink `json:"outputsLink,omitempty"` + // TrackedProperties - READ-ONLY; Gets the tracked properties. + TrackedProperties interface{} `json:"trackedProperties,omitempty"` + // RetryHistory - Gets the retry histories. + RetryHistory *[]RetryHistory `json:"retryHistory,omitempty"` + IterationCount *int32 `json:"iterationCount,omitempty"` + // StartTime - The start time of the workflow scope repetition. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time of the workflow scope repetition. + EndTime *date.Time `json:"endTime,omitempty"` + // Correlation - The correlation properties. + Correlation *RunActionCorrelation `json:"correlation,omitempty"` + // Status - The status of the workflow scope repetition. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored' + Status WorkflowStatus `json:"status,omitempty"` + // Code - The workflow scope repetition code. + Code *string `json:"code,omitempty"` + Error interface{} `json:"error,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkflowRunActionRepetitionProperties. +func (wrarp WorkflowRunActionRepetitionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if vr.VnetRouteProperties != nil { - objectMap["properties"] = vr.VnetRouteProperties + if wrarp.RepetitionIndexes != nil { + objectMap["repetitionIndexes"] = wrarp.RepetitionIndexes } - if vr.Kind != nil { - objectMap["kind"] = vr.Kind + if wrarp.RetryHistory != nil { + objectMap["retryHistory"] = wrarp.RetryHistory + } + if wrarp.IterationCount != nil { + objectMap["iterationCount"] = wrarp.IterationCount + } + if wrarp.StartTime != nil { + objectMap["startTime"] = wrarp.StartTime + } + if wrarp.EndTime != nil { + objectMap["endTime"] = wrarp.EndTime + } + if wrarp.Correlation != nil { + objectMap["correlation"] = wrarp.Correlation + } + if wrarp.Status != "" { + objectMap["status"] = wrarp.Status + } + if wrarp.Code != nil { + objectMap["code"] = wrarp.Code + } + if wrarp.Error != nil { + objectMap["error"] = wrarp.Error } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for VnetRoute struct. -func (vr *VnetRoute) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) +// WorkflowRunFilter the workflow run filter. +type WorkflowRunFilter struct { + // Status - The status of workflow run. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored' + Status WorkflowStatus `json:"status,omitempty"` +} + +// WorkflowRunListResult the list of workflow runs. +type WorkflowRunListResult struct { + autorest.Response `json:"-"` + // Value - A list of workflow runs. + Value *[]WorkflowRun `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// WorkflowRunListResultIterator provides access to a complete listing of WorkflowRun values. +type WorkflowRunListResultIterator struct { + i int + page WorkflowRunListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *WorkflowRunListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) if err != nil { + iter.i-- return err } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var vnetRouteProperties VnetRouteProperties - err = json.Unmarshal(*v, &vnetRouteProperties) - if err != nil { - return err - } - vr.VnetRouteProperties = &vnetRouteProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vr.Name = &name - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - vr.Kind = &kind - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vr.Type = &typeVar + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *WorkflowRunListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter WorkflowRunListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter WorkflowRunListResultIterator) Response() WorkflowRunListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter WorkflowRunListResultIterator) Value() WorkflowRun { + if !iter.page.NotDone() { + return WorkflowRun{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the WorkflowRunListResultIterator type. +func NewWorkflowRunListResultIterator(page WorkflowRunListResultPage) WorkflowRunListResultIterator { + return WorkflowRunListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (wrlr WorkflowRunListResult) IsEmpty() bool { + return wrlr.Value == nil || len(*wrlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (wrlr WorkflowRunListResult) hasNextLink() bool { + return wrlr.NextLink != nil && len(*wrlr.NextLink) != 0 +} + +// workflowRunListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (wrlr WorkflowRunListResult) workflowRunListResultPreparer(ctx context.Context) (*http.Request, error) { + if !wrlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(wrlr.NextLink))) +} + +// WorkflowRunListResultPage contains a page of WorkflowRun values. +type WorkflowRunListResultPage struct { + fn func(context.Context, WorkflowRunListResult) (WorkflowRunListResult, error) + wrlr WorkflowRunListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *WorkflowRunListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.wrlr) + if err != nil { + return err + } + page.wrlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break } } - return nil } -// VnetRouteProperties vnetRoute resource specific properties -type VnetRouteProperties struct { - // StartAddress - The starting address for this route. This may also include a CIDR notation, in which case the end address must not be specified. - StartAddress *string `json:"startAddress,omitempty"` - // EndAddress - The ending address for this route. If the start address is specified in CIDR notation, this must be omitted. - EndAddress *string `json:"endAddress,omitempty"` - // RouteType - The type of route this is: - // DEFAULT - By default, every app has routes to the local address ranges specified by RFC1918 - // INHERITED - Routes inherited from the real Virtual Network routes - // STATIC - Static route set on the app only - // These values will be used for syncing an app's routes with those from a Virtual Network. Possible values include: 'RouteTypeDEFAULT', 'RouteTypeINHERITED', 'RouteTypeSTATIC' - RouteType RouteType `json:"routeType,omitempty"` +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *WorkflowRunListResultPage) Next() error { + return page.NextWithContext(context.Background()) } -// VnetValidationFailureDetails a class that describes the reason for a validation failure. -type VnetValidationFailureDetails struct { +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page WorkflowRunListResultPage) NotDone() bool { + return !page.wrlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page WorkflowRunListResultPage) Response() WorkflowRunListResult { + return page.wrlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page WorkflowRunListResultPage) Values() []WorkflowRun { + if page.wrlr.IsEmpty() { + return nil + } + return *page.wrlr.Value +} + +// Creates a new instance of the WorkflowRunListResultPage type. +func NewWorkflowRunListResultPage(cur WorkflowRunListResult, getNextPage func(context.Context, WorkflowRunListResult) (WorkflowRunListResult, error)) WorkflowRunListResultPage { + return WorkflowRunListResultPage{ + fn: getNextPage, + wrlr: cur, + } +} + +// WorkflowRunProperties the workflow run properties. +type WorkflowRunProperties struct { + // WaitEndTime - READ-ONLY; Gets the wait end time. + WaitEndTime *date.Time `json:"waitEndTime,omitempty"` + // StartTime - READ-ONLY; Gets the start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - READ-ONLY; Gets the end time. + EndTime *date.Time `json:"endTime,omitempty"` + // Status - READ-ONLY; Gets the status. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored' + Status WorkflowStatus `json:"status,omitempty"` + // Code - READ-ONLY; Gets the code. + Code *string `json:"code,omitempty"` + // Error - READ-ONLY; Gets the error. + Error interface{} `json:"error,omitempty"` + // CorrelationID - READ-ONLY; Gets the correlation id. + CorrelationID *string `json:"correlationId,omitempty"` + // Correlation - The run correlation. + Correlation *Correlation `json:"correlation,omitempty"` + // Workflow - READ-ONLY; Gets the reference to workflow version. + Workflow *ResourceReference `json:"workflow,omitempty"` + // Trigger - READ-ONLY; Gets the fired trigger. + Trigger *WorkflowRunTrigger `json:"trigger,omitempty"` + // Outputs - READ-ONLY; Gets the outputs. + Outputs map[string]*WorkflowOutputParameter `json:"outputs"` + // Response - READ-ONLY; Gets the response of the flow run. + Response *WorkflowRunTrigger `json:"response,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkflowRunProperties. +func (wrp WorkflowRunProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wrp.Correlation != nil { + objectMap["correlation"] = wrp.Correlation + } + return json.Marshal(objectMap) +} + +// WorkflowRunTrigger the workflow run trigger. +type WorkflowRunTrigger struct { + // Name - READ-ONLY; Gets the name. + Name *string `json:"name,omitempty"` + // Inputs - READ-ONLY; Gets the inputs. + Inputs interface{} `json:"inputs,omitempty"` + // InputsLink - READ-ONLY; Gets the link to inputs. + InputsLink *ContentLink `json:"inputsLink,omitempty"` + // Outputs - READ-ONLY; Gets the outputs. + Outputs interface{} `json:"outputs,omitempty"` + // OutputsLink - READ-ONLY; Gets the link to outputs. + OutputsLink *ContentLink `json:"outputsLink,omitempty"` + // ScheduledTime - READ-ONLY; Gets the scheduled time. + ScheduledTime *date.Time `json:"scheduledTime,omitempty"` + // StartTime - READ-ONLY; Gets the start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - READ-ONLY; Gets the end time. + EndTime *date.Time `json:"endTime,omitempty"` + // TrackingID - READ-ONLY; Gets the tracking id. + TrackingID *string `json:"trackingId,omitempty"` + // Correlation - The run correlation. + Correlation *Correlation `json:"correlation,omitempty"` + // Code - READ-ONLY; Gets the code. + Code *string `json:"code,omitempty"` + // Status - READ-ONLY; Gets the status. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored' + Status WorkflowStatus `json:"status,omitempty"` + // Error - READ-ONLY; Gets the error. + Error interface{} `json:"error,omitempty"` + // TrackedProperties - READ-ONLY; Gets the tracked properties. + TrackedProperties interface{} `json:"trackedProperties,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkflowRunTrigger. +func (wrt WorkflowRunTrigger) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wrt.Correlation != nil { + objectMap["correlation"] = wrt.Correlation + } + return json.Marshal(objectMap) +} + +// WorkflowSku the sku type. +type WorkflowSku struct { + // Name - The name. Possible values include: 'WorkflowSkuNameNotSpecified', 'WorkflowSkuNameFree', 'WorkflowSkuNameShared', 'WorkflowSkuNameBasic', 'WorkflowSkuNameStandard', 'WorkflowSkuNamePremium' + Name WorkflowSkuName `json:"name,omitempty"` + // Plan - The reference to plan. + Plan *ResourceReference `json:"plan,omitempty"` +} + +// WorkflowTrigger the workflow trigger. +type WorkflowTrigger struct { autorest.Response `json:"-"` - // VnetValidationFailureDetailsProperties - VnetValidationFailureDetails resource specific properties - *VnetValidationFailureDetailsProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. + // WorkflowTriggerProperties - The workflow trigger properties. + *WorkflowTriggerProperties `json:"properties,omitempty"` + // Name - READ-ONLY; Gets the workflow trigger name. Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. + // Type - READ-ONLY; Gets the workflow trigger type. Type *string `json:"type,omitempty"` + // ID - READ-ONLY; The resource id. + ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for VnetValidationFailureDetails. -func (vvfd VnetValidationFailureDetails) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for WorkflowTrigger. +func (wt WorkflowTrigger) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if vvfd.VnetValidationFailureDetailsProperties != nil { - objectMap["properties"] = vvfd.VnetValidationFailureDetailsProperties - } - if vvfd.Kind != nil { - objectMap["kind"] = vvfd.Kind + if wt.WorkflowTriggerProperties != nil { + objectMap["properties"] = wt.WorkflowTriggerProperties } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for VnetValidationFailureDetails struct. -func (vvfd *VnetValidationFailureDetails) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for WorkflowTrigger struct. +func (wt *WorkflowTrigger) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -32459,21 +36727,12 @@ func (vvfd *VnetValidationFailureDetails) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var vnetValidationFailureDetailsProperties VnetValidationFailureDetailsProperties - err = json.Unmarshal(*v, &vnetValidationFailureDetailsProperties) - if err != nil { - return err - } - vvfd.VnetValidationFailureDetailsProperties = &vnetValidationFailureDetailsProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + var workflowTriggerProperties WorkflowTriggerProperties + err = json.Unmarshal(*v, &workflowTriggerProperties) if err != nil { return err } - vvfd.ID = &ID + wt.WorkflowTriggerProperties = &workflowTriggerProperties } case "name": if v != nil { @@ -32482,25 +36741,25 @@ func (vvfd *VnetValidationFailureDetails) UnmarshalJSON(body []byte) error { if err != nil { return err } - vvfd.Name = &name + wt.Name = &name } - case "kind": + case "type": if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) + var typeVar string + err = json.Unmarshal(*v, &typeVar) if err != nil { return err } - vvfd.Kind = &kind + wt.Type = &typeVar } - case "type": + case "id": if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) + var ID string + err = json.Unmarshal(*v, &ID) if err != nil { return err } - vvfd.Type = &typeVar + wt.ID = &ID } } } @@ -32508,46 +36767,102 @@ func (vvfd *VnetValidationFailureDetails) UnmarshalJSON(body []byte) error { return nil } -// VnetValidationFailureDetailsProperties vnetValidationFailureDetails resource specific properties -type VnetValidationFailureDetailsProperties struct { - // Message - Text describing the validation outcome. - Message *string `json:"message,omitempty"` - // Failed - A flag describing whether or not validation failed. - Failed *bool `json:"failed,omitempty"` - // FailedTests - A list of tests that failed in the validation. - FailedTests *[]VnetValidationTestFailure `json:"failedTests,omitempty"` - // Warnings - A list of warnings generated during validation. - Warnings *[]VnetValidationTestFailure `json:"warnings,omitempty"` +// WorkflowTriggerCallbackURL the workflow trigger callback URL. +type WorkflowTriggerCallbackURL struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Gets the workflow trigger callback URL. + Value *string `json:"value,omitempty"` + // Method - READ-ONLY; Gets the workflow trigger callback URL HTTP method. + Method *string `json:"method,omitempty"` + // BasePath - READ-ONLY; Gets the workflow trigger callback URL base path. + BasePath *string `json:"basePath,omitempty"` + // RelativePath - READ-ONLY; Gets the workflow trigger callback URL relative path. + RelativePath *string `json:"relativePath,omitempty"` + // RelativePathParameters - Gets the workflow trigger callback URL relative path parameters. + RelativePathParameters *[]string `json:"relativePathParameters,omitempty"` + // Queries - Gets the workflow trigger callback URL query parameters. + Queries *WorkflowTriggerListCallbackURLQueries `json:"queries,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkflowTriggerCallbackURL. +func (wtcu WorkflowTriggerCallbackURL) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wtcu.RelativePathParameters != nil { + objectMap["relativePathParameters"] = wtcu.RelativePathParameters + } + if wtcu.Queries != nil { + objectMap["queries"] = wtcu.Queries + } + return json.Marshal(objectMap) +} + +// WorkflowTriggerFilter the workflow trigger filter. +type WorkflowTriggerFilter struct { + // State - The state of workflow trigger. Possible values include: 'WorkflowStateNotSpecified', 'WorkflowStateCompleted', 'WorkflowStateEnabled', 'WorkflowStateDisabled', 'WorkflowStateDeleted', 'WorkflowStateSuspended' + State WorkflowState `json:"state,omitempty"` +} + +// WorkflowTriggerHistoriesResubmitFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WorkflowTriggerHistoriesResubmitFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WorkflowTriggerHistoriesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WorkflowTriggerHistoriesResubmitFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WorkflowTriggerHistoriesResubmitFuture.Result. +func (future *WorkflowTriggerHistoriesResubmitFuture) result(client WorkflowTriggerHistoriesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowTriggerHistoriesResubmitFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.WorkflowTriggerHistoriesResubmitFuture") + return + } + ar.Response = future.Response() + return } -// VnetValidationTestFailure a class that describes a test that failed during NSG and UDR validation. -type VnetValidationTestFailure struct { - // VnetValidationTestFailureProperties - VnetValidationTestFailure resource specific properties - *VnetValidationTestFailureProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. +// WorkflowTriggerHistory the workflow trigger history. +type WorkflowTriggerHistory struct { + autorest.Response `json:"-"` + // WorkflowTriggerHistoryProperties - Gets the workflow trigger history properties. + *WorkflowTriggerHistoryProperties `json:"properties,omitempty"` + // Name - READ-ONLY; Gets the workflow trigger history name. Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. + // Type - READ-ONLY; Gets the workflow trigger history type. Type *string `json:"type,omitempty"` + // ID - READ-ONLY; The resource id. + ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for VnetValidationTestFailure. -func (vvtf VnetValidationTestFailure) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for WorkflowTriggerHistory. +func (wth WorkflowTriggerHistory) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if vvtf.VnetValidationTestFailureProperties != nil { - objectMap["properties"] = vvtf.VnetValidationTestFailureProperties - } - if vvtf.Kind != nil { - objectMap["kind"] = vvtf.Kind + if wth.WorkflowTriggerHistoryProperties != nil { + objectMap["properties"] = wth.WorkflowTriggerHistoryProperties } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for VnetValidationTestFailure struct. -func (vvtf *VnetValidationTestFailure) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for WorkflowTriggerHistory struct. +func (wth *WorkflowTriggerHistory) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -32557,21 +36872,12 @@ func (vvtf *VnetValidationTestFailure) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var vnetValidationTestFailureProperties VnetValidationTestFailureProperties - err = json.Unmarshal(*v, &vnetValidationTestFailureProperties) - if err != nil { - return err - } - vvtf.VnetValidationTestFailureProperties = &vnetValidationTestFailureProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + var workflowTriggerHistoryProperties WorkflowTriggerHistoryProperties + err = json.Unmarshal(*v, &workflowTriggerHistoryProperties) if err != nil { return err } - vvtf.ID = &ID + wth.WorkflowTriggerHistoryProperties = &workflowTriggerHistoryProperties } case "name": if v != nil { @@ -32580,25 +36886,25 @@ func (vvtf *VnetValidationTestFailure) UnmarshalJSON(body []byte) error { if err != nil { return err } - vvtf.Name = &name + wth.Name = &name } - case "kind": + case "type": if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) + var typeVar string + err = json.Unmarshal(*v, &typeVar) if err != nil { return err } - vvtf.Kind = &kind + wth.Type = &typeVar } - case "type": + case "id": if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) + var ID string + err = json.Unmarshal(*v, &ID) if err != nil { return err } - vvtf.Type = &typeVar + wth.ID = &ID } } } @@ -32606,101 +36912,243 @@ func (vvtf *VnetValidationTestFailure) UnmarshalJSON(body []byte) error { return nil } -// VnetValidationTestFailureProperties vnetValidationTestFailure resource specific properties -type VnetValidationTestFailureProperties struct { - // TestName - The name of the test that failed. - TestName *string `json:"testName,omitempty"` - // Details - The details of what caused the failure, e.g. the blocking rule name, etc. - Details *string `json:"details,omitempty"` +// WorkflowTriggerHistoryFilter the workflow trigger history filter. +type WorkflowTriggerHistoryFilter struct { + // Status - The status of workflow trigger history. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored' + Status WorkflowStatus `json:"status,omitempty"` } -// WindowsJavaContainerSettings windows Java Container settings. -type WindowsJavaContainerSettings struct { - // JavaContainer - READ-ONLY; Java container (runtime only). - JavaContainer *string `json:"javaContainer,omitempty"` - // JavaContainerVersion - READ-ONLY; Java container version (runtime only). - JavaContainerVersion *string `json:"javaContainerVersion,omitempty"` - // IsPreview - READ-ONLY; true if the stack is in preview; otherwise, false. - IsPreview *bool `json:"isPreview,omitempty"` - // IsDeprecated - READ-ONLY; true if the stack is deprecated; otherwise, false. - IsDeprecated *bool `json:"isDeprecated,omitempty"` - // IsHidden - READ-ONLY; true if the stack should be hidden; otherwise, false. - IsHidden *bool `json:"isHidden,omitempty"` - // EndOfLifeDate - READ-ONLY; End-of-life date for the minor version. - EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` - // IsAutoUpdate - READ-ONLY; true if the stack version is auto-updated; otherwise, false. - IsAutoUpdate *bool `json:"isAutoUpdate,omitempty"` - // IsEarlyAccess - READ-ONLY; true if the minor version is early-access; otherwise, false. - IsEarlyAccess *bool `json:"isEarlyAccess,omitempty"` +// WorkflowTriggerHistoryListResult the list of workflow trigger histories. +type WorkflowTriggerHistoryListResult struct { + autorest.Response `json:"-"` + // Value - A list of workflow trigger histories. + Value *[]WorkflowTriggerHistory `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for WindowsJavaContainerSettings. -func (wjcs WindowsJavaContainerSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) +// WorkflowTriggerHistoryListResultIterator provides access to a complete listing of WorkflowTriggerHistory +// values. +type WorkflowTriggerHistoryListResultIterator struct { + i int + page WorkflowTriggerHistoryListResultPage } -// WorkerPool worker pool of an App Service Environment. -type WorkerPool struct { - // WorkerSizeID - Worker size ID for referencing this worker pool. - WorkerSizeID *int32 `json:"workerSizeId,omitempty"` - // ComputeMode - Shared or dedicated app hosting. Possible values include: 'ComputeModeOptionsShared', 'ComputeModeOptionsDedicated', 'ComputeModeOptionsDynamic' - ComputeMode ComputeModeOptions `json:"computeMode,omitempty"` - // WorkerSize - VM size of the worker pool instances. - WorkerSize *string `json:"workerSize,omitempty"` - // WorkerCount - Number of instances in the worker pool. - WorkerCount *int32 `json:"workerCount,omitempty"` - // InstanceNames - READ-ONLY; Names of all instances in the worker pool (read only). - InstanceNames *[]string `json:"instanceNames,omitempty"` +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *WorkflowTriggerHistoryListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerHistoryListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil } -// MarshalJSON is the custom marshaler for WorkerPool. -func (wp WorkerPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wp.WorkerSizeID != nil { - objectMap["workerSizeId"] = wp.WorkerSizeID +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *WorkflowTriggerHistoryListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter WorkflowTriggerHistoryListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter WorkflowTriggerHistoryListResultIterator) Response() WorkflowTriggerHistoryListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter WorkflowTriggerHistoryListResultIterator) Value() WorkflowTriggerHistory { + if !iter.page.NotDone() { + return WorkflowTriggerHistory{} } - if wp.ComputeMode != "" { - objectMap["computeMode"] = wp.ComputeMode + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the WorkflowTriggerHistoryListResultIterator type. +func NewWorkflowTriggerHistoryListResultIterator(page WorkflowTriggerHistoryListResultPage) WorkflowTriggerHistoryListResultIterator { + return WorkflowTriggerHistoryListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (wthlr WorkflowTriggerHistoryListResult) IsEmpty() bool { + return wthlr.Value == nil || len(*wthlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (wthlr WorkflowTriggerHistoryListResult) hasNextLink() bool { + return wthlr.NextLink != nil && len(*wthlr.NextLink) != 0 +} + +// workflowTriggerHistoryListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (wthlr WorkflowTriggerHistoryListResult) workflowTriggerHistoryListResultPreparer(ctx context.Context) (*http.Request, error) { + if !wthlr.hasNextLink() { + return nil, nil } - if wp.WorkerSize != nil { - objectMap["workerSize"] = wp.WorkerSize + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(wthlr.NextLink))) +} + +// WorkflowTriggerHistoryListResultPage contains a page of WorkflowTriggerHistory values. +type WorkflowTriggerHistoryListResultPage struct { + fn func(context.Context, WorkflowTriggerHistoryListResult) (WorkflowTriggerHistoryListResult, error) + wthlr WorkflowTriggerHistoryListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *WorkflowTriggerHistoryListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerHistoryListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - if wp.WorkerCount != nil { - objectMap["workerCount"] = wp.WorkerCount + for { + next, err := page.fn(ctx, page.wthlr) + if err != nil { + return err + } + page.wthlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - return json.Marshal(objectMap) + return nil } -// WorkerPoolCollection collection of worker pools. -type WorkerPoolCollection struct { - autorest.Response `json:"-"` - // Value - Collection of resources. - Value *[]WorkerPoolResource `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty"` +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *WorkflowTriggerHistoryListResultPage) Next() error { + return page.NextWithContext(context.Background()) } -// MarshalJSON is the custom marshaler for WorkerPoolCollection. -func (wpc WorkerPoolCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wpc.Value != nil { - objectMap["value"] = wpc.Value +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page WorkflowTriggerHistoryListResultPage) NotDone() bool { + return !page.wthlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page WorkflowTriggerHistoryListResultPage) Response() WorkflowTriggerHistoryListResult { + return page.wthlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page WorkflowTriggerHistoryListResultPage) Values() []WorkflowTriggerHistory { + if page.wthlr.IsEmpty() { + return nil } - return json.Marshal(objectMap) + return *page.wthlr.Value } -// WorkerPoolCollectionIterator provides access to a complete listing of WorkerPoolResource values. -type WorkerPoolCollectionIterator struct { +// Creates a new instance of the WorkflowTriggerHistoryListResultPage type. +func NewWorkflowTriggerHistoryListResultPage(cur WorkflowTriggerHistoryListResult, getNextPage func(context.Context, WorkflowTriggerHistoryListResult) (WorkflowTriggerHistoryListResult, error)) WorkflowTriggerHistoryListResultPage { + return WorkflowTriggerHistoryListResultPage{ + fn: getNextPage, + wthlr: cur, + } +} + +// WorkflowTriggerHistoryProperties the workflow trigger history properties. +type WorkflowTriggerHistoryProperties struct { + // StartTime - READ-ONLY; Gets the start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - READ-ONLY; Gets the end time. + EndTime *date.Time `json:"endTime,omitempty"` + // ScheduledTime - READ-ONLY; The scheduled time. + ScheduledTime *date.Time `json:"scheduledTime,omitempty"` + // Status - READ-ONLY; Gets the status. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored' + Status WorkflowStatus `json:"status,omitempty"` + // Code - READ-ONLY; Gets the code. + Code *string `json:"code,omitempty"` + // Error - READ-ONLY; Gets the error. + Error interface{} `json:"error,omitempty"` + // TrackingID - READ-ONLY; Gets the tracking id. + TrackingID *string `json:"trackingId,omitempty"` + // Correlation - The run correlation. + Correlation *Correlation `json:"correlation,omitempty"` + // InputsLink - READ-ONLY; Gets the link to input parameters. + InputsLink *ContentLink `json:"inputsLink,omitempty"` + // OutputsLink - READ-ONLY; Gets the link to output parameters. + OutputsLink *ContentLink `json:"outputsLink,omitempty"` + // Fired - READ-ONLY; The value indicating whether trigger was fired. + Fired *bool `json:"fired,omitempty"` + // Run - READ-ONLY; Gets the reference to workflow run. + Run *ResourceReference `json:"run,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkflowTriggerHistoryProperties. +func (wthp WorkflowTriggerHistoryProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wthp.Correlation != nil { + objectMap["correlation"] = wthp.Correlation + } + return json.Marshal(objectMap) +} + +// WorkflowTriggerListCallbackURLQueries gets the workflow trigger callback URL query parameters. +type WorkflowTriggerListCallbackURLQueries struct { + // APIVersion - The api version. + APIVersion *string `json:"api-version,omitempty"` + // Sp - The SAS permissions. + Sp *string `json:"sp,omitempty"` + // Sv - The SAS version. + Sv *string `json:"sv,omitempty"` + // Sig - The SAS signature. + Sig *string `json:"sig,omitempty"` + // Se - The SAS timestamp. + Se *string `json:"se,omitempty"` +} + +// WorkflowTriggerListResult the list of workflow triggers. +type WorkflowTriggerListResult struct { + autorest.Response `json:"-"` + // Value - A list of workflow triggers. + Value *[]WorkflowTrigger `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// WorkflowTriggerListResultIterator provides access to a complete listing of WorkflowTrigger values. +type WorkflowTriggerListResultIterator struct { i int - page WorkerPoolCollectionPage + page WorkflowTriggerListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *WorkerPoolCollectionIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *WorkflowTriggerListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkerPoolCollectionIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -32725,67 +37173,67 @@ func (iter *WorkerPoolCollectionIterator) NextWithContext(ctx context.Context) ( // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *WorkerPoolCollectionIterator) Next() error { +func (iter *WorkflowTriggerListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter WorkerPoolCollectionIterator) NotDone() bool { +func (iter WorkflowTriggerListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter WorkerPoolCollectionIterator) Response() WorkerPoolCollection { +func (iter WorkflowTriggerListResultIterator) Response() WorkflowTriggerListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter WorkerPoolCollectionIterator) Value() WorkerPoolResource { +func (iter WorkflowTriggerListResultIterator) Value() WorkflowTrigger { if !iter.page.NotDone() { - return WorkerPoolResource{} + return WorkflowTrigger{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the WorkerPoolCollectionIterator type. -func NewWorkerPoolCollectionIterator(page WorkerPoolCollectionPage) WorkerPoolCollectionIterator { - return WorkerPoolCollectionIterator{page: page} +// Creates a new instance of the WorkflowTriggerListResultIterator type. +func NewWorkflowTriggerListResultIterator(page WorkflowTriggerListResultPage) WorkflowTriggerListResultIterator { + return WorkflowTriggerListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (wpc WorkerPoolCollection) IsEmpty() bool { - return wpc.Value == nil || len(*wpc.Value) == 0 +func (wtlr WorkflowTriggerListResult) IsEmpty() bool { + return wtlr.Value == nil || len(*wtlr.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (wpc WorkerPoolCollection) hasNextLink() bool { - return wpc.NextLink != nil && len(*wpc.NextLink) != 0 +func (wtlr WorkflowTriggerListResult) hasNextLink() bool { + return wtlr.NextLink != nil && len(*wtlr.NextLink) != 0 } -// workerPoolCollectionPreparer prepares a request to retrieve the next set of results. +// workflowTriggerListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (wpc WorkerPoolCollection) workerPoolCollectionPreparer(ctx context.Context) (*http.Request, error) { - if !wpc.hasNextLink() { +func (wtlr WorkflowTriggerListResult) workflowTriggerListResultPreparer(ctx context.Context) (*http.Request, error) { + if !wtlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(wpc.NextLink))) + autorest.WithBaseURL(to.String(wtlr.NextLink))) } -// WorkerPoolCollectionPage contains a page of WorkerPoolResource values. -type WorkerPoolCollectionPage struct { - fn func(context.Context, WorkerPoolCollection) (WorkerPoolCollection, error) - wpc WorkerPoolCollection +// WorkflowTriggerListResultPage contains a page of WorkflowTrigger values. +type WorkflowTriggerListResultPage struct { + fn func(context.Context, WorkflowTriggerListResult) (WorkflowTriggerListResult, error) + wtlr WorkflowTriggerListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *WorkerPoolCollectionPage) NextWithContext(ctx context.Context) (err error) { +func (page *WorkflowTriggerListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkerPoolCollectionPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -32795,11 +37243,11 @@ func (page *WorkerPoolCollectionPage) NextWithContext(ctx context.Context) (err }() } for { - next, err := page.fn(ctx, page.wpc) + next, err := page.fn(ctx, page.wtlr) if err != nil { return err } - page.wpc = next + page.wtlr = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -32810,69 +37258,151 @@ func (page *WorkerPoolCollectionPage) NextWithContext(ctx context.Context) (err // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *WorkerPoolCollectionPage) Next() error { +func (page *WorkflowTriggerListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page WorkerPoolCollectionPage) NotDone() bool { - return !page.wpc.IsEmpty() +func (page WorkflowTriggerListResultPage) NotDone() bool { + return !page.wtlr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page WorkerPoolCollectionPage) Response() WorkerPoolCollection { - return page.wpc +func (page WorkflowTriggerListResultPage) Response() WorkflowTriggerListResult { + return page.wtlr } // Values returns the slice of values for the current page or nil if there are no values. -func (page WorkerPoolCollectionPage) Values() []WorkerPoolResource { - if page.wpc.IsEmpty() { +func (page WorkflowTriggerListResultPage) Values() []WorkflowTrigger { + if page.wtlr.IsEmpty() { return nil } - return *page.wpc.Value + return *page.wtlr.Value } -// Creates a new instance of the WorkerPoolCollectionPage type. -func NewWorkerPoolCollectionPage(cur WorkerPoolCollection, getNextPage func(context.Context, WorkerPoolCollection) (WorkerPoolCollection, error)) WorkerPoolCollectionPage { - return WorkerPoolCollectionPage{ - fn: getNextPage, - wpc: cur, +// Creates a new instance of the WorkflowTriggerListResultPage type. +func NewWorkflowTriggerListResultPage(cur WorkflowTriggerListResult, getNextPage func(context.Context, WorkflowTriggerListResult) (WorkflowTriggerListResult, error)) WorkflowTriggerListResultPage { + return WorkflowTriggerListResultPage{ + fn: getNextPage, + wtlr: cur, } } -// WorkerPoolResource worker pool of an App Service Environment ARM resource. -type WorkerPoolResource struct { +// WorkflowTriggerProperties the workflow trigger properties. +type WorkflowTriggerProperties struct { + // ProvisioningState - READ-ONLY; Gets the provisioning state. Possible values include: 'WorkflowTriggerProvisioningStateNotSpecified', 'WorkflowTriggerProvisioningStateAccepted', 'WorkflowTriggerProvisioningStateRunning', 'WorkflowTriggerProvisioningStateReady', 'WorkflowTriggerProvisioningStateCreating', 'WorkflowTriggerProvisioningStateCreated', 'WorkflowTriggerProvisioningStateDeleting', 'WorkflowTriggerProvisioningStateDeleted', 'WorkflowTriggerProvisioningStateCanceled', 'WorkflowTriggerProvisioningStateFailed', 'WorkflowTriggerProvisioningStateSucceeded', 'WorkflowTriggerProvisioningStateMoving', 'WorkflowTriggerProvisioningStateUpdating', 'WorkflowTriggerProvisioningStateRegistering', 'WorkflowTriggerProvisioningStateRegistered', 'WorkflowTriggerProvisioningStateUnregistering', 'WorkflowTriggerProvisioningStateUnregistered', 'WorkflowTriggerProvisioningStateCompleted' + ProvisioningState WorkflowTriggerProvisioningState `json:"provisioningState,omitempty"` + // CreatedTime - READ-ONLY; Gets the created time. + CreatedTime *date.Time `json:"createdTime,omitempty"` + // ChangedTime - READ-ONLY; Gets the changed time. + ChangedTime *date.Time `json:"changedTime,omitempty"` + // State - READ-ONLY; Gets the state. Possible values include: 'WorkflowStateNotSpecified', 'WorkflowStateCompleted', 'WorkflowStateEnabled', 'WorkflowStateDisabled', 'WorkflowStateDeleted', 'WorkflowStateSuspended' + State WorkflowState `json:"state,omitempty"` + // Status - READ-ONLY; Gets the status. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored' + Status WorkflowStatus `json:"status,omitempty"` + // LastExecutionTime - READ-ONLY; Gets the last execution time. + LastExecutionTime *date.Time `json:"lastExecutionTime,omitempty"` + // NextExecutionTime - READ-ONLY; Gets the next execution time. + NextExecutionTime *date.Time `json:"nextExecutionTime,omitempty"` + // Recurrence - READ-ONLY; Gets the workflow trigger recurrence. + Recurrence *WorkflowTriggerRecurrence `json:"recurrence,omitempty"` + // Workflow - READ-ONLY; Gets the reference to workflow. + Workflow *ResourceReference `json:"workflow,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkflowTriggerProperties. +func (wtp WorkflowTriggerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// WorkflowTriggerRecurrence the workflow trigger recurrence. +type WorkflowTriggerRecurrence struct { + // Frequency - The frequency. Possible values include: 'RecurrenceFrequencyNotSpecified', 'RecurrenceFrequencySecond', 'RecurrenceFrequencyMinute', 'RecurrenceFrequencyHour', 'RecurrenceFrequencyDay', 'RecurrenceFrequencyWeek', 'RecurrenceFrequencyMonth', 'RecurrenceFrequencyYear' + Frequency RecurrenceFrequency `json:"frequency,omitempty"` + // Interval - The interval. + Interval *int32 `json:"interval,omitempty"` + // StartTime - The start time. + StartTime *string `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *string `json:"endTime,omitempty"` + // TimeZone - The time zone. + TimeZone *string `json:"timeZone,omitempty"` + // Schedule - The recurrence schedule. + Schedule *RecurrenceSchedule `json:"schedule,omitempty"` +} + +// WorkflowTriggersRunFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type WorkflowTriggersRunFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(WorkflowTriggersClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *WorkflowTriggersRunFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for WorkflowTriggersRunFuture.Result. +func (future *WorkflowTriggersRunFuture) result(client WorkflowTriggersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowTriggersRunFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("web.WorkflowTriggersRunFuture") + return + } + ar.Response = future.Response() + return +} + +// WorkflowVersion the workflow version. +type WorkflowVersion struct { autorest.Response `json:"-"` - // WorkerPool - Core resource properties - *WorkerPool `json:"properties,omitempty"` - Sku *SkuDescription `json:"sku,omitempty"` - // ID - READ-ONLY; Resource Id. + // WorkflowVersionProperties - The workflow version properties. + *WorkflowVersionProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The resource id. ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource Name. + // Name - READ-ONLY; Gets the resource name. Name *string `json:"name,omitempty"` - // Kind - Kind of resource. - Kind *string `json:"kind,omitempty"` - // Type - READ-ONLY; Resource type. + // Type - READ-ONLY; Gets the resource type. Type *string `json:"type,omitempty"` + // Location - The resource location. + Location *string `json:"location,omitempty"` + // Tags - The resource tags. + Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for WorkerPoolResource. -func (wpr WorkerPoolResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for WorkflowVersion. +func (wv WorkflowVersion) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if wpr.WorkerPool != nil { - objectMap["properties"] = wpr.WorkerPool + if wv.WorkflowVersionProperties != nil { + objectMap["properties"] = wv.WorkflowVersionProperties } - if wpr.Sku != nil { - objectMap["sku"] = wpr.Sku + if wv.Location != nil { + objectMap["location"] = wv.Location } - if wpr.Kind != nil { - objectMap["kind"] = wpr.Kind + if wv.Tags != nil { + objectMap["tags"] = wv.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for WorkerPoolResource struct. -func (wpr *WorkerPoolResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for WorkflowVersion struct. +func (wv *WorkflowVersion) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -32882,21 +37412,12 @@ func (wpr *WorkerPoolResource) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var workerPool WorkerPool - err = json.Unmarshal(*v, &workerPool) - if err != nil { - return err - } - wpr.WorkerPool = &workerPool - } - case "sku": - if v != nil { - var sku SkuDescription - err = json.Unmarshal(*v, &sku) + var workflowVersionProperties WorkflowVersionProperties + err = json.Unmarshal(*v, &workflowVersionProperties) if err != nil { return err } - wpr.Sku = &sku + wv.WorkflowVersionProperties = &workflowVersionProperties } case "id": if v != nil { @@ -32905,7 +37426,7 @@ func (wpr *WorkerPoolResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - wpr.ID = &ID + wv.ID = &ID } case "name": if v != nil { @@ -32914,28 +37435,248 @@ func (wpr *WorkerPoolResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - wpr.Name = &name + wv.Name = &name } - case "kind": + case "type": if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) + var typeVar string + err = json.Unmarshal(*v, &typeVar) if err != nil { return err } - wpr.Kind = &kind + wv.Type = &typeVar } - case "type": + case "location": if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) + var location string + err = json.Unmarshal(*v, &location) if err != nil { return err } - wpr.Type = &typeVar + wv.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + wv.Tags = tags } } } return nil } + +// WorkflowVersionListResult the list of workflow versions. +type WorkflowVersionListResult struct { + autorest.Response `json:"-"` + // Value - A list of workflow versions. + Value *[]WorkflowVersion `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// WorkflowVersionListResultIterator provides access to a complete listing of WorkflowVersion values. +type WorkflowVersionListResultIterator struct { + i int + page WorkflowVersionListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *WorkflowVersionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowVersionListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *WorkflowVersionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter WorkflowVersionListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter WorkflowVersionListResultIterator) Response() WorkflowVersionListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter WorkflowVersionListResultIterator) Value() WorkflowVersion { + if !iter.page.NotDone() { + return WorkflowVersion{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the WorkflowVersionListResultIterator type. +func NewWorkflowVersionListResultIterator(page WorkflowVersionListResultPage) WorkflowVersionListResultIterator { + return WorkflowVersionListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (wvlr WorkflowVersionListResult) IsEmpty() bool { + return wvlr.Value == nil || len(*wvlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (wvlr WorkflowVersionListResult) hasNextLink() bool { + return wvlr.NextLink != nil && len(*wvlr.NextLink) != 0 +} + +// workflowVersionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (wvlr WorkflowVersionListResult) workflowVersionListResultPreparer(ctx context.Context) (*http.Request, error) { + if !wvlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(wvlr.NextLink))) +} + +// WorkflowVersionListResultPage contains a page of WorkflowVersion values. +type WorkflowVersionListResultPage struct { + fn func(context.Context, WorkflowVersionListResult) (WorkflowVersionListResult, error) + wvlr WorkflowVersionListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *WorkflowVersionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowVersionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.wvlr) + if err != nil { + return err + } + page.wvlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *WorkflowVersionListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page WorkflowVersionListResultPage) NotDone() bool { + return !page.wvlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page WorkflowVersionListResultPage) Response() WorkflowVersionListResult { + return page.wvlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page WorkflowVersionListResultPage) Values() []WorkflowVersion { + if page.wvlr.IsEmpty() { + return nil + } + return *page.wvlr.Value +} + +// Creates a new instance of the WorkflowVersionListResultPage type. +func NewWorkflowVersionListResultPage(cur WorkflowVersionListResult, getNextPage func(context.Context, WorkflowVersionListResult) (WorkflowVersionListResult, error)) WorkflowVersionListResultPage { + return WorkflowVersionListResultPage{ + fn: getNextPage, + wvlr: cur, + } +} + +// WorkflowVersionProperties the workflow version properties. +type WorkflowVersionProperties struct { + // ProvisioningState - READ-ONLY; The provisioning state. Possible values include: 'WorkflowProvisioningStateNotSpecified', 'WorkflowProvisioningStateAccepted', 'WorkflowProvisioningStateRunning', 'WorkflowProvisioningStateReady', 'WorkflowProvisioningStateCreating', 'WorkflowProvisioningStateCreated', 'WorkflowProvisioningStateDeleting', 'WorkflowProvisioningStateDeleted', 'WorkflowProvisioningStateCanceled', 'WorkflowProvisioningStateFailed', 'WorkflowProvisioningStateSucceeded', 'WorkflowProvisioningStateMoving', 'WorkflowProvisioningStateUpdating', 'WorkflowProvisioningStateRegistering', 'WorkflowProvisioningStateRegistered', 'WorkflowProvisioningStateUnregistering', 'WorkflowProvisioningStateUnregistered', 'WorkflowProvisioningStateCompleted', 'WorkflowProvisioningStateRenewing', 'WorkflowProvisioningStatePending', 'WorkflowProvisioningStateWaiting', 'WorkflowProvisioningStateInProgress' + ProvisioningState WorkflowProvisioningState `json:"provisioningState,omitempty"` + // CreatedTime - READ-ONLY; Gets the created time. + CreatedTime *date.Time `json:"createdTime,omitempty"` + // ChangedTime - READ-ONLY; Gets the changed time. + ChangedTime *date.Time `json:"changedTime,omitempty"` + // State - The state. Possible values include: 'WorkflowStateNotSpecified', 'WorkflowStateCompleted', 'WorkflowStateEnabled', 'WorkflowStateDisabled', 'WorkflowStateDeleted', 'WorkflowStateSuspended' + State WorkflowState `json:"state,omitempty"` + // Version - READ-ONLY; Gets the version. + Version *string `json:"version,omitempty"` + // AccessEndpoint - READ-ONLY; Gets the access endpoint. + AccessEndpoint *string `json:"accessEndpoint,omitempty"` + // EndpointsConfiguration - The endpoints configuration. + EndpointsConfiguration *FlowEndpointsConfiguration `json:"endpointsConfiguration,omitempty"` + // AccessControl - The access control configuration. + AccessControl *FlowAccessControlConfiguration `json:"accessControl,omitempty"` + // Sku - READ-ONLY; The sku. + Sku *WorkflowSku `json:"sku,omitempty"` + // IntegrationAccount - The integration account. + IntegrationAccount *ResourceReference `json:"integrationAccount,omitempty"` + // Definition - The definition. + Definition interface{} `json:"definition,omitempty"` + // Parameters - The parameters. + Parameters map[string]*WorkflowParameter `json:"parameters"` +} + +// MarshalJSON is the custom marshaler for WorkflowVersionProperties. +func (wvp WorkflowVersionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wvp.State != "" { + objectMap["state"] = wvp.State + } + if wvp.EndpointsConfiguration != nil { + objectMap["endpointsConfiguration"] = wvp.EndpointsConfiguration + } + if wvp.AccessControl != nil { + objectMap["accessControl"] = wvp.AccessControl + } + if wvp.IntegrationAccount != nil { + objectMap["integrationAccount"] = wvp.IntegrationAccount + } + if wvp.Definition != nil { + objectMap["definition"] = wvp.Definition + } + if wvp.Parameters != nil { + objectMap["parameters"] = wvp.Parameters + } + return json.Marshal(objectMap) +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/provider.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/provider.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/provider.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/provider.go index 2628f62ea344..fc9d1048c302 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/provider.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/provider.go @@ -8,10 +8,11 @@ package web import ( "context" + "net/http" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/tracing" - "net/http" ) // ProviderClient is the webSite Management Client @@ -31,7 +32,7 @@ func NewProviderClientWithBaseURI(baseURI string, subscriptionID string) Provide } // GetAvailableStacks description for Get available application frameworks and their versions -func (client ProviderClient) GetAvailableStacks(ctx context.Context, osTypeSelected string) (result ApplicationStackCollectionPage, err error) { +func (client ProviderClient) GetAvailableStacks(ctx context.Context, osTypeSelected ProviderOsTypeSelected) (result ApplicationStackCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ProviderClient.GetAvailableStacks") defer func() { @@ -70,8 +71,8 @@ func (client ProviderClient) GetAvailableStacks(ctx context.Context, osTypeSelec } // GetAvailableStacksPreparer prepares the GetAvailableStacks request. -func (client ProviderClient) GetAvailableStacksPreparer(ctx context.Context, osTypeSelected string) (*http.Request, error) { - const APIVersion = "2021-03-01" +func (client ProviderClient) GetAvailableStacksPreparer(ctx context.Context, osTypeSelected ProviderOsTypeSelected) (*http.Request, error) { + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -127,7 +128,7 @@ func (client ProviderClient) getAvailableStacksNextResults(ctx context.Context, } // GetAvailableStacksComplete enumerates all values, automatically crossing page boundaries as required. -func (client ProviderClient) GetAvailableStacksComplete(ctx context.Context, osTypeSelected string) (result ApplicationStackCollectionIterator, err error) { +func (client ProviderClient) GetAvailableStacksComplete(ctx context.Context, osTypeSelected ProviderOsTypeSelected) (result ApplicationStackCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ProviderClient.GetAvailableStacks") defer func() { @@ -143,7 +144,7 @@ func (client ProviderClient) GetAvailableStacksComplete(ctx context.Context, osT } // GetAvailableStacksOnPrem description for Get available application frameworks and their versions -func (client ProviderClient) GetAvailableStacksOnPrem(ctx context.Context, osTypeSelected string) (result ApplicationStackCollectionPage, err error) { +func (client ProviderClient) GetAvailableStacksOnPrem(ctx context.Context, osTypeSelected ProviderOsTypeSelected) (result ApplicationStackCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ProviderClient.GetAvailableStacksOnPrem") defer func() { @@ -182,12 +183,12 @@ func (client ProviderClient) GetAvailableStacksOnPrem(ctx context.Context, osTyp } // GetAvailableStacksOnPremPreparer prepares the GetAvailableStacksOnPrem request. -func (client ProviderClient) GetAvailableStacksOnPremPreparer(ctx context.Context, osTypeSelected string) (*http.Request, error) { +func (client ProviderClient) GetAvailableStacksOnPremPreparer(ctx context.Context, osTypeSelected ProviderOsTypeSelected) (*http.Request, error) { pathParameters := map[string]interface{}{ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -243,7 +244,7 @@ func (client ProviderClient) getAvailableStacksOnPremNextResults(ctx context.Con } // GetAvailableStacksOnPremComplete enumerates all values, automatically crossing page boundaries as required. -func (client ProviderClient) GetAvailableStacksOnPremComplete(ctx context.Context, osTypeSelected string) (result ApplicationStackCollectionIterator, err error) { +func (client ProviderClient) GetAvailableStacksOnPremComplete(ctx context.Context, osTypeSelected ProviderOsTypeSelected) (result ApplicationStackCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ProviderClient.GetAvailableStacksOnPrem") defer func() { @@ -261,7 +262,7 @@ func (client ProviderClient) GetAvailableStacksOnPremComplete(ctx context.Contex // GetFunctionAppStacks description for Get available Function app frameworks and their versions // Parameters: // stackOsType - stack OS Type -func (client ProviderClient) GetFunctionAppStacks(ctx context.Context, stackOsType string) (result FunctionAppStackCollectionPage, err error) { +func (client ProviderClient) GetFunctionAppStacks(ctx context.Context, stackOsType ProviderStackOsType) (result FunctionAppStackCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ProviderClient.GetFunctionAppStacks") defer func() { @@ -300,8 +301,8 @@ func (client ProviderClient) GetFunctionAppStacks(ctx context.Context, stackOsTy } // GetFunctionAppStacksPreparer prepares the GetFunctionAppStacks request. -func (client ProviderClient) GetFunctionAppStacksPreparer(ctx context.Context, stackOsType string) (*http.Request, error) { - const APIVersion = "2021-03-01" +func (client ProviderClient) GetFunctionAppStacksPreparer(ctx context.Context, stackOsType ProviderStackOsType) (*http.Request, error) { + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -357,7 +358,7 @@ func (client ProviderClient) getFunctionAppStacksNextResults(ctx context.Context } // GetFunctionAppStacksComplete enumerates all values, automatically crossing page boundaries as required. -func (client ProviderClient) GetFunctionAppStacksComplete(ctx context.Context, stackOsType string) (result FunctionAppStackCollectionIterator, err error) { +func (client ProviderClient) GetFunctionAppStacksComplete(ctx context.Context, stackOsType ProviderStackOsType) (result FunctionAppStackCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ProviderClient.GetFunctionAppStacks") defer func() { @@ -377,7 +378,7 @@ func (client ProviderClient) GetFunctionAppStacksComplete(ctx context.Context, s // Parameters: // location - function App stack location. // stackOsType - stack OS Type -func (client ProviderClient) GetFunctionAppStacksForLocation(ctx context.Context, location string, stackOsType string) (result FunctionAppStackCollectionPage, err error) { +func (client ProviderClient) GetFunctionAppStacksForLocation(ctx context.Context, location string, stackOsType ProviderStackOsType) (result FunctionAppStackCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ProviderClient.GetFunctionAppStacksForLocation") defer func() { @@ -416,12 +417,12 @@ func (client ProviderClient) GetFunctionAppStacksForLocation(ctx context.Context } // GetFunctionAppStacksForLocationPreparer prepares the GetFunctionAppStacksForLocation request. -func (client ProviderClient) GetFunctionAppStacksForLocationPreparer(ctx context.Context, location string, stackOsType string) (*http.Request, error) { +func (client ProviderClient) GetFunctionAppStacksForLocationPreparer(ctx context.Context, location string, stackOsType ProviderStackOsType) (*http.Request, error) { pathParameters := map[string]interface{}{ "location": autorest.Encode("path", location), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -477,7 +478,7 @@ func (client ProviderClient) getFunctionAppStacksForLocationNextResults(ctx cont } // GetFunctionAppStacksForLocationComplete enumerates all values, automatically crossing page boundaries as required. -func (client ProviderClient) GetFunctionAppStacksForLocationComplete(ctx context.Context, location string, stackOsType string) (result FunctionAppStackCollectionIterator, err error) { +func (client ProviderClient) GetFunctionAppStacksForLocationComplete(ctx context.Context, location string, stackOsType ProviderStackOsType) (result FunctionAppStackCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ProviderClient.GetFunctionAppStacksForLocation") defer func() { @@ -495,7 +496,7 @@ func (client ProviderClient) GetFunctionAppStacksForLocationComplete(ctx context // GetWebAppStacks description for Get available Web app frameworks and their versions // Parameters: // stackOsType - stack OS Type -func (client ProviderClient) GetWebAppStacks(ctx context.Context, stackOsType string) (result AppStackCollectionPage, err error) { +func (client ProviderClient) GetWebAppStacks(ctx context.Context, stackOsType ProviderStackOsType) (result AppStackCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ProviderClient.GetWebAppStacks") defer func() { @@ -534,8 +535,8 @@ func (client ProviderClient) GetWebAppStacks(ctx context.Context, stackOsType st } // GetWebAppStacksPreparer prepares the GetWebAppStacks request. -func (client ProviderClient) GetWebAppStacksPreparer(ctx context.Context, stackOsType string) (*http.Request, error) { - const APIVersion = "2021-03-01" +func (client ProviderClient) GetWebAppStacksPreparer(ctx context.Context, stackOsType ProviderStackOsType) (*http.Request, error) { + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -591,7 +592,7 @@ func (client ProviderClient) getWebAppStacksNextResults(ctx context.Context, las } // GetWebAppStacksComplete enumerates all values, automatically crossing page boundaries as required. -func (client ProviderClient) GetWebAppStacksComplete(ctx context.Context, stackOsType string) (result AppStackCollectionIterator, err error) { +func (client ProviderClient) GetWebAppStacksComplete(ctx context.Context, stackOsType ProviderStackOsType) (result AppStackCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ProviderClient.GetWebAppStacks") defer func() { @@ -610,7 +611,7 @@ func (client ProviderClient) GetWebAppStacksComplete(ctx context.Context, stackO // Parameters: // location - web App stack location. // stackOsType - stack OS Type -func (client ProviderClient) GetWebAppStacksForLocation(ctx context.Context, location string, stackOsType string) (result AppStackCollectionPage, err error) { +func (client ProviderClient) GetWebAppStacksForLocation(ctx context.Context, location string, stackOsType ProviderStackOsType) (result AppStackCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ProviderClient.GetWebAppStacksForLocation") defer func() { @@ -649,12 +650,12 @@ func (client ProviderClient) GetWebAppStacksForLocation(ctx context.Context, loc } // GetWebAppStacksForLocationPreparer prepares the GetWebAppStacksForLocation request. -func (client ProviderClient) GetWebAppStacksForLocationPreparer(ctx context.Context, location string, stackOsType string) (*http.Request, error) { +func (client ProviderClient) GetWebAppStacksForLocationPreparer(ctx context.Context, location string, stackOsType ProviderStackOsType) (*http.Request, error) { pathParameters := map[string]interface{}{ "location": autorest.Encode("path", location), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -710,7 +711,7 @@ func (client ProviderClient) getWebAppStacksForLocationNextResults(ctx context.C } // GetWebAppStacksForLocationComplete enumerates all values, automatically crossing page boundaries as required. -func (client ProviderClient) GetWebAppStacksForLocationComplete(ctx context.Context, location string, stackOsType string) (result AppStackCollectionIterator, err error) { +func (client ProviderClient) GetWebAppStacksForLocationComplete(ctx context.Context, location string, stackOsType ProviderStackOsType) (result AppStackCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ProviderClient.GetWebAppStacksForLocation") defer func() { @@ -767,7 +768,7 @@ func (client ProviderClient) ListOperations(ctx context.Context) (result CsmOper // ListOperationsPreparer prepares the ListOperations request. func (client ProviderClient) ListOperationsPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/recommendations.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/recommendations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/recommendations.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/recommendations.go index ba4db5822305..41f4f1074f2e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/recommendations.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/recommendations.go @@ -8,11 +8,12 @@ package web import ( "context" + "net/http" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" - "net/http" ) // RecommendationsClient is the webSite Management Client @@ -84,7 +85,7 @@ func (client RecommendationsClient) DisableAllForHostingEnvironmentPreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, "environmentName": autorest.Encode("query", environmentName), @@ -168,7 +169,7 @@ func (client RecommendationsClient) DisableAllForWebAppPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -253,7 +254,7 @@ func (client RecommendationsClient) DisableRecommendationForHostingEnvironmentPr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, "environmentName": autorest.Encode("query", environmentName), @@ -339,7 +340,7 @@ func (client RecommendationsClient) DisableRecommendationForSitePreparer(ctx con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -413,7 +414,7 @@ func (client RecommendationsClient) DisableRecommendationForSubscriptionPreparer "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -501,7 +502,7 @@ func (client RecommendationsClient) GetRuleDetailsByHostingEnvironmentPreparer(c "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -596,7 +597,7 @@ func (client RecommendationsClient) GetRuleDetailsByWebAppPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -684,7 +685,7 @@ func (client RecommendationsClient) ListPreparer(ctx context.Context, featured * "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -822,7 +823,7 @@ func (client RecommendationsClient) ListHistoryForHostingEnvironmentPreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -959,7 +960,7 @@ func (client RecommendationsClient) ListHistoryForWebAppPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1095,7 +1096,7 @@ func (client RecommendationsClient) ListRecommendedRulesForHostingEnvironmentPre "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1231,7 +1232,7 @@ func (client RecommendationsClient) ListRecommendedRulesForWebAppPreparer(ctx co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1345,7 +1346,7 @@ func (client RecommendationsClient) ResetAllFiltersPreparer(ctx context.Context) "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1428,7 +1429,7 @@ func (client RecommendationsClient) ResetAllFiltersForHostingEnvironmentPreparer "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, "environmentName": autorest.Encode("query", environmentName), @@ -1512,7 +1513,7 @@ func (client RecommendationsClient) ResetAllFiltersForWebAppPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/resourcehealthmetadata.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/resourcehealthmetadata.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/resourcehealthmetadata.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/resourcehealthmetadata.go index ab5b103ac541..623d1636b199 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/resourcehealthmetadata.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/resourcehealthmetadata.go @@ -8,11 +8,12 @@ package web import ( "context" + "net/http" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" - "net/http" ) // ResourceHealthMetadataClient is the webSite Management Client @@ -85,7 +86,7 @@ func (client ResourceHealthMetadataClient) GetBySitePreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -171,7 +172,7 @@ func (client ResourceHealthMetadataClient) GetBySiteSlotPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -247,7 +248,7 @@ func (client ResourceHealthMetadataClient) ListPreparer(ctx context.Context) (*h "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -372,7 +373,7 @@ func (client ResourceHealthMetadataClient) ListByResourceGroupPreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -498,7 +499,7 @@ func (client ResourceHealthMetadataClient) ListBySitePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -626,7 +627,7 @@ func (client ResourceHealthMetadataClient) ListBySiteSlotPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/staticsites.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/staticsites.go similarity index 62% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/staticsites.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/staticsites.go index 1019f5b91c9d..4fc0db288c5c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/staticsites.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/staticsites.go @@ -8,11 +8,12 @@ package web import ( "context" + "net/http" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" - "net/http" ) // StaticSitesClient is the webSite Management Client @@ -80,7 +81,7 @@ func (client StaticSitesClient) ApproveOrRejectPrivateEndpointConnectionPreparer "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -123,6 +124,293 @@ func (client StaticSitesClient) ApproveOrRejectPrivateEndpointConnectionResponde return } +// CreateOrUpdateBasicAuth description for Adds or updates basic auth for a static site. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the static site. +// basicAuthEnvelope - a JSON representation of the basic auth properties. +func (client StaticSitesClient) CreateOrUpdateBasicAuth(ctx context.Context, resourceGroupName string, name string, basicAuthEnvelope StaticSiteBasicAuthPropertiesARMResource) (result StaticSiteBasicAuthPropertiesARMResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.CreateOrUpdateBasicAuth") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: basicAuthEnvelope, + Constraints: []validation.Constraint{{Target: "basicAuthEnvelope.StaticSiteBasicAuthPropertiesARMResourceProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "basicAuthEnvelope.StaticSiteBasicAuthPropertiesARMResourceProperties.ApplicableEnvironmentsMode", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "CreateOrUpdateBasicAuth", err.Error()) + } + + req, err := client.CreateOrUpdateBasicAuthPreparer(ctx, resourceGroupName, name, basicAuthEnvelope) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "CreateOrUpdateBasicAuth", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateBasicAuthSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "CreateOrUpdateBasicAuth", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateBasicAuthResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "CreateOrUpdateBasicAuth", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdateBasicAuthPreparer prepares the CreateOrUpdateBasicAuth request. +func (client StaticSitesClient) CreateOrUpdateBasicAuthPreparer(ctx context.Context, resourceGroupName string, name string, basicAuthEnvelope StaticSiteBasicAuthPropertiesARMResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "basicAuthName": autorest.Encode("path", "default"), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName}", pathParameters), + autorest.WithJSON(basicAuthEnvelope), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateBasicAuthSender sends the CreateOrUpdateBasicAuth request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) CreateOrUpdateBasicAuthSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateBasicAuthResponder handles the response to the CreateOrUpdateBasicAuth request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) CreateOrUpdateBasicAuthResponder(resp *http.Response) (result StaticSiteBasicAuthPropertiesARMResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdateBuildDatabaseConnection description for Create or update a database connection for a static site build +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the static site +// environmentName - the stage site identifier. +// databaseConnectionName - name of the database connection. +// databaseConnectionRequestEnvelope - a JSON representation of the database connection request properties +func (client StaticSitesClient) CreateOrUpdateBuildDatabaseConnection(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnection) (result DatabaseConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.CreateOrUpdateBuildDatabaseConnection") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: environmentName, + Constraints: []validation.Constraint{{Target: "environmentName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+$`, Chain: nil}}}, + {TargetValue: databaseConnectionName, + Constraints: []validation.Constraint{{Target: "databaseConnectionName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+$`, Chain: nil}}}, + {TargetValue: databaseConnectionRequestEnvelope, + Constraints: []validation.Constraint{{Target: "databaseConnectionRequestEnvelope.DatabaseConnectionProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "databaseConnectionRequestEnvelope.DatabaseConnectionProperties.ResourceID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "databaseConnectionRequestEnvelope.DatabaseConnectionProperties.Region", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "CreateOrUpdateBuildDatabaseConnection", err.Error()) + } + + req, err := client.CreateOrUpdateBuildDatabaseConnectionPreparer(ctx, resourceGroupName, name, environmentName, databaseConnectionName, databaseConnectionRequestEnvelope) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "CreateOrUpdateBuildDatabaseConnection", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateBuildDatabaseConnectionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "CreateOrUpdateBuildDatabaseConnection", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateBuildDatabaseConnectionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "CreateOrUpdateBuildDatabaseConnection", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdateBuildDatabaseConnectionPreparer prepares the CreateOrUpdateBuildDatabaseConnection request. +func (client StaticSitesClient) CreateOrUpdateBuildDatabaseConnectionPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseConnectionName": autorest.Encode("path", databaseConnectionName), + "environmentName": autorest.Encode("path", environmentName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}", pathParameters), + autorest.WithJSON(databaseConnectionRequestEnvelope), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateBuildDatabaseConnectionSender sends the CreateOrUpdateBuildDatabaseConnection request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) CreateOrUpdateBuildDatabaseConnectionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateBuildDatabaseConnectionResponder handles the response to the CreateOrUpdateBuildDatabaseConnection request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) CreateOrUpdateBuildDatabaseConnectionResponder(resp *http.Response) (result DatabaseConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdateDatabaseConnection description for Create or update a database connection for a static site +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the static site +// databaseConnectionName - name of the database connection. +// databaseConnectionRequestEnvelope - a JSON representation of the database connection request properties +func (client StaticSitesClient) CreateOrUpdateDatabaseConnection(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnection) (result DatabaseConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.CreateOrUpdateDatabaseConnection") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: databaseConnectionName, + Constraints: []validation.Constraint{{Target: "databaseConnectionName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+$`, Chain: nil}}}, + {TargetValue: databaseConnectionRequestEnvelope, + Constraints: []validation.Constraint{{Target: "databaseConnectionRequestEnvelope.DatabaseConnectionProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "databaseConnectionRequestEnvelope.DatabaseConnectionProperties.ResourceID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "databaseConnectionRequestEnvelope.DatabaseConnectionProperties.Region", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "CreateOrUpdateDatabaseConnection", err.Error()) + } + + req, err := client.CreateOrUpdateDatabaseConnectionPreparer(ctx, resourceGroupName, name, databaseConnectionName, databaseConnectionRequestEnvelope) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "CreateOrUpdateDatabaseConnection", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateDatabaseConnectionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "CreateOrUpdateDatabaseConnection", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateDatabaseConnectionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "CreateOrUpdateDatabaseConnection", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdateDatabaseConnectionPreparer prepares the CreateOrUpdateDatabaseConnection request. +func (client StaticSitesClient) CreateOrUpdateDatabaseConnectionPreparer(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseConnectionName": autorest.Encode("path", databaseConnectionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}", pathParameters), + autorest.WithJSON(databaseConnectionRequestEnvelope), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateDatabaseConnectionSender sends the CreateOrUpdateDatabaseConnection request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) CreateOrUpdateDatabaseConnectionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateDatabaseConnectionResponder handles the response to the CreateOrUpdateDatabaseConnection request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) CreateOrUpdateDatabaseConnectionResponder(resp *http.Response) (result DatabaseConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // CreateOrUpdateStaticSite description for Creates a new static site in an existing resource group, or updates an // existing static site. // Parameters: @@ -171,7 +459,7 @@ func (client StaticSitesClient) CreateOrUpdateStaticSitePreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -268,7 +556,7 @@ func (client StaticSitesClient) CreateOrUpdateStaticSiteAppSettingsPreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -357,7 +645,7 @@ func (client StaticSitesClient) CreateOrUpdateStaticSiteBuildAppSettingsPreparer "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -447,7 +735,7 @@ func (client StaticSitesClient) CreateOrUpdateStaticSiteBuildFunctionAppSettings "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -531,7 +819,7 @@ func (client StaticSitesClient) CreateOrUpdateStaticSiteCustomDomainPreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -629,7 +917,7 @@ func (client StaticSitesClient) CreateOrUpdateStaticSiteFunctionAppSettingsPrepa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -715,7 +1003,7 @@ func (client StaticSitesClient) CreateUserRolesInvitationLinkPreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -796,7 +1084,7 @@ func (client StaticSitesClient) CreateZipDeploymentForStaticSitePreparer(ctx con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -889,7 +1177,7 @@ func (client StaticSitesClient) CreateZipDeploymentForStaticSiteBuildPreparer(ct "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -931,18 +1219,19 @@ func (client StaticSitesClient) CreateZipDeploymentForStaticSiteBuildResponder(r return } -// DeletePrivateEndpointConnection description for Deletes a private endpoint connection +// DeleteBuildDatabaseConnection sends the delete build database connection request. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the static site. -// privateEndpointConnectionName - name of the private endpoint connection. -func (client StaticSitesClient) DeletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string) (result StaticSitesDeletePrivateEndpointConnectionFuture, err error) { +// name - name of the static site +// environmentName - the stage site identifier. +// databaseConnectionName - name of the database connection. +func (client StaticSitesClient) DeleteBuildDatabaseConnection(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.DeletePrivateEndpointConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.DeleteBuildDatabaseConnection") defer func() { sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -951,35 +1240,47 @@ func (client StaticSitesClient) DeletePrivateEndpointConnection(ctx context.Cont {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "DeletePrivateEndpointConnection", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: environmentName, + Constraints: []validation.Constraint{{Target: "environmentName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+$`, Chain: nil}}}, + {TargetValue: databaseConnectionName, + Constraints: []validation.Constraint{{Target: "databaseConnectionName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "DeleteBuildDatabaseConnection", err.Error()) } - req, err := client.DeletePrivateEndpointConnectionPreparer(ctx, resourceGroupName, name, privateEndpointConnectionName) + req, err := client.DeleteBuildDatabaseConnectionPreparer(ctx, resourceGroupName, name, environmentName, databaseConnectionName) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "DeletePrivateEndpointConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "DeleteBuildDatabaseConnection", nil, "Failure preparing request") return } - result, err = client.DeletePrivateEndpointConnectionSender(req) + resp, err := client.DeleteBuildDatabaseConnectionSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "DeletePrivateEndpointConnection", result.Response(), "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "DeleteBuildDatabaseConnection", resp, "Failure sending request") + return + } + + result, err = client.DeleteBuildDatabaseConnectionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "DeleteBuildDatabaseConnection", resp, "Failure responding to request") return } return } -// DeletePrivateEndpointConnectionPreparer prepares the DeletePrivateEndpointConnection request. -func (client StaticSitesClient) DeletePrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string) (*http.Request, error) { +// DeleteBuildDatabaseConnectionPreparer prepares the DeleteBuildDatabaseConnection request. +func (client StaticSitesClient) DeleteBuildDatabaseConnectionPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "databaseConnectionName": autorest.Encode("path", databaseConnectionName), + "environmentName": autorest.Encode("path", environmentName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -987,50 +1288,40 @@ func (client StaticSitesClient) DeletePrivateEndpointConnectionPreparer(ctx cont preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeletePrivateEndpointConnectionSender sends the DeletePrivateEndpointConnection request. The method will close the +// DeleteBuildDatabaseConnectionSender sends the DeleteBuildDatabaseConnection request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) DeletePrivateEndpointConnectionSender(req *http.Request) (future StaticSitesDeletePrivateEndpointConnectionFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return +func (client StaticSitesClient) DeleteBuildDatabaseConnectionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// DeletePrivateEndpointConnectionResponder handles the response to the DeletePrivateEndpointConnection request. The method always +// DeleteBuildDatabaseConnectionResponder handles the response to the DeleteBuildDatabaseConnection request. The method always // closes the http.Response Body. -func (client StaticSitesClient) DeletePrivateEndpointConnectionResponder(resp *http.Response) (result SetObject, err error) { +func (client StaticSitesClient) DeleteBuildDatabaseConnectionResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByUnmarshallingJSON(&result.Value), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// DeleteStaticSite description for Deletes a static site. +// DeleteDatabaseConnection sends the delete database connection request. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the static site to delete. -func (client StaticSitesClient) DeleteStaticSite(ctx context.Context, resourceGroupName string, name string) (result StaticSitesDeleteStaticSiteFuture, err error) { +// name - name of the static site +// databaseConnectionName - name of the database connection. +func (client StaticSitesClient) DeleteDatabaseConnection(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.DeleteStaticSite") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.DeleteDatabaseConnection") defer func() { sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -1039,17 +1330,192 @@ func (client StaticSitesClient) DeleteStaticSite(ctx context.Context, resourceGr {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "DeleteStaticSite", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: databaseConnectionName, + Constraints: []validation.Constraint{{Target: "databaseConnectionName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "DeleteDatabaseConnection", err.Error()) } - req, err := client.DeleteStaticSitePreparer(ctx, resourceGroupName, name) + req, err := client.DeleteDatabaseConnectionPreparer(ctx, resourceGroupName, name, databaseConnectionName) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "DeleteStaticSite", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "DeleteDatabaseConnection", nil, "Failure preparing request") return } - result, err = client.DeleteStaticSiteSender(req) + resp, err := client.DeleteDatabaseConnectionSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "DeleteDatabaseConnection", resp, "Failure sending request") + return + } + + result, err = client.DeleteDatabaseConnectionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "DeleteDatabaseConnection", resp, "Failure responding to request") + return + } + + return +} + +// DeleteDatabaseConnectionPreparer prepares the DeleteDatabaseConnection request. +func (client StaticSitesClient) DeleteDatabaseConnectionPreparer(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseConnectionName": autorest.Encode("path", databaseConnectionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteDatabaseConnectionSender sends the DeleteDatabaseConnection request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) DeleteDatabaseConnectionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteDatabaseConnectionResponder handles the response to the DeleteDatabaseConnection request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) DeleteDatabaseConnectionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeletePrivateEndpointConnection description for Deletes a private endpoint connection +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the static site. +// privateEndpointConnectionName - name of the private endpoint connection. +func (client StaticSitesClient) DeletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string) (result StaticSitesDeletePrivateEndpointConnectionFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.DeletePrivateEndpointConnection") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "DeletePrivateEndpointConnection", err.Error()) + } + + req, err := client.DeletePrivateEndpointConnectionPreparer(ctx, resourceGroupName, name, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "DeletePrivateEndpointConnection", nil, "Failure preparing request") + return + } + + result, err = client.DeletePrivateEndpointConnectionSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "DeletePrivateEndpointConnection", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePrivateEndpointConnectionPreparer prepares the DeletePrivateEndpointConnection request. +func (client StaticSitesClient) DeletePrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeletePrivateEndpointConnectionSender sends the DeletePrivateEndpointConnection request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) DeletePrivateEndpointConnectionSender(req *http.Request) (future StaticSitesDeletePrivateEndpointConnectionFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeletePrivateEndpointConnectionResponder handles the response to the DeletePrivateEndpointConnection request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) DeletePrivateEndpointConnectionResponder(resp *http.Response) (result SetObject, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// DeleteStaticSite description for Deletes a static site. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the static site to delete. +func (client StaticSitesClient) DeleteStaticSite(ctx context.Context, resourceGroupName string, name string) (result StaticSitesDeleteStaticSiteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.DeleteStaticSite") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "DeleteStaticSite", err.Error()) + } + + req, err := client.DeleteStaticSitePreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "DeleteStaticSite", nil, "Failure preparing request") + return + } + + result, err = client.DeleteStaticSiteSender(req) if err != nil { err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "DeleteStaticSite", result.Response(), "Failure sending request") return @@ -1066,7 +1532,7 @@ func (client StaticSitesClient) DeleteStaticSitePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1154,7 +1620,7 @@ func (client StaticSitesClient) DeleteStaticSiteBuildPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1242,7 +1708,7 @@ func (client StaticSitesClient) DeleteStaticSiteCustomDomainPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1339,7 +1805,7 @@ func (client StaticSitesClient) DeleteStaticSiteUserPreparer(ctx context.Context "userid": autorest.Encode("path", userid), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1415,7 +1881,7 @@ func (client StaticSitesClient) DetachStaticSitePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1511,7 +1977,7 @@ func (client StaticSitesClient) DetachUserProvidedFunctionAppFromStaticSitePrepa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1599,7 +2065,7 @@ func (client StaticSitesClient) DetachUserProvidedFunctionAppFromStaticSiteBuild "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1629,14 +2095,13 @@ func (client StaticSitesClient) DetachUserProvidedFunctionAppFromStaticSiteBuild return } -// GetPrivateEndpointConnection description for Gets a private endpoint connection +// GetBasicAuth description for Gets the basic auth properties for a static site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the static site. -// privateEndpointConnectionName - name of the private endpoint connection. -func (client StaticSitesClient) GetPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string) (result RemotePrivateEndpointConnectionARMResource, err error) { +func (client StaticSitesClient) GetBasicAuth(ctx context.Context, resourceGroupName string, name string) (result StaticSiteBasicAuthPropertiesARMResource, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetPrivateEndpointConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetBasicAuth") defer func() { sc := -1 if result.Response.Response != nil { @@ -1650,41 +2115,41 @@ func (client StaticSitesClient) GetPrivateEndpointConnection(ctx context.Context Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "GetPrivateEndpointConnection", err.Error()) + return result, validation.NewError("web.StaticSitesClient", "GetBasicAuth", err.Error()) } - req, err := client.GetPrivateEndpointConnectionPreparer(ctx, resourceGroupName, name, privateEndpointConnectionName) + req, err := client.GetBasicAuthPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetPrivateEndpointConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetBasicAuth", nil, "Failure preparing request") return } - resp, err := client.GetPrivateEndpointConnectionSender(req) + resp, err := client.GetBasicAuthSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetPrivateEndpointConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetBasicAuth", resp, "Failure sending request") return } - result, err = client.GetPrivateEndpointConnectionResponder(resp) + result, err = client.GetBasicAuthResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetPrivateEndpointConnection", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetBasicAuth", resp, "Failure responding to request") return } return } -// GetPrivateEndpointConnectionPreparer prepares the GetPrivateEndpointConnection request. -func (client StaticSitesClient) GetPrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string) (*http.Request, error) { +// GetBasicAuthPreparer prepares the GetBasicAuth request. +func (client StaticSitesClient) GetBasicAuthPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "basicAuthName": autorest.Encode("path", "default"), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1692,20 +2157,20 @@ func (client StaticSitesClient) GetPrivateEndpointConnectionPreparer(ctx context preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPrivateEndpointConnectionSender sends the GetPrivateEndpointConnection request. The method will close the +// GetBasicAuthSender sends the GetBasicAuth request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) GetPrivateEndpointConnectionSender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) GetBasicAuthSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// GetPrivateEndpointConnectionResponder handles the response to the GetPrivateEndpointConnection request. The method always +// GetBasicAuthResponder handles the response to the GetBasicAuth request. The method always // closes the http.Response Body. -func (client StaticSitesClient) GetPrivateEndpointConnectionResponder(resp *http.Response) (result RemotePrivateEndpointConnectionARMResource, err error) { +func (client StaticSitesClient) GetBasicAuthResponder(resp *http.Response) (result StaticSiteBasicAuthPropertiesARMResource, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -1715,18 +2180,19 @@ func (client StaticSitesClient) GetPrivateEndpointConnectionResponder(resp *http return } -// GetPrivateEndpointConnectionList description for Gets the list of private endpoint connections associated with a -// static site +// GetBuildDatabaseConnection sends the get build database connection request. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the static site. -func (client StaticSitesClient) GetPrivateEndpointConnectionList(ctx context.Context, resourceGroupName string, name string) (result PrivateEndpointConnectionCollectionPage, err error) { +// name - name of the static site +// environmentName - the stage site identifier. +// databaseConnectionName - name of the database connection. +func (client StaticSitesClient) GetBuildDatabaseConnection(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string) (result DatabaseConnection, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetPrivateEndpointConnectionList") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetBuildDatabaseConnection") defer func() { sc := -1 - if result.pecc.Response.Response != nil { - sc = result.pecc.Response.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -1735,46 +2201,47 @@ func (client StaticSitesClient) GetPrivateEndpointConnectionList(ctx context.Con {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "GetPrivateEndpointConnectionList", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: environmentName, + Constraints: []validation.Constraint{{Target: "environmentName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+$`, Chain: nil}}}, + {TargetValue: databaseConnectionName, + Constraints: []validation.Constraint{{Target: "databaseConnectionName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "GetBuildDatabaseConnection", err.Error()) } - result.fn = client.getPrivateEndpointConnectionListNextResults - req, err := client.GetPrivateEndpointConnectionListPreparer(ctx, resourceGroupName, name) + req, err := client.GetBuildDatabaseConnectionPreparer(ctx, resourceGroupName, name, environmentName, databaseConnectionName) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetPrivateEndpointConnectionList", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetBuildDatabaseConnection", nil, "Failure preparing request") return } - resp, err := client.GetPrivateEndpointConnectionListSender(req) + resp, err := client.GetBuildDatabaseConnectionSender(req) if err != nil { - result.pecc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetPrivateEndpointConnectionList", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetBuildDatabaseConnection", resp, "Failure sending request") return } - result.pecc, err = client.GetPrivateEndpointConnectionListResponder(resp) + result, err = client.GetBuildDatabaseConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetPrivateEndpointConnectionList", resp, "Failure responding to request") - return - } - if result.pecc.hasNextLink() && result.pecc.IsEmpty() { - err = result.NextWithContext(ctx) + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetBuildDatabaseConnection", resp, "Failure responding to request") return } return } -// GetPrivateEndpointConnectionListPreparer prepares the GetPrivateEndpointConnectionList request. -func (client StaticSitesClient) GetPrivateEndpointConnectionListPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetBuildDatabaseConnectionPreparer prepares the GetBuildDatabaseConnection request. +func (client StaticSitesClient) GetBuildDatabaseConnectionPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "databaseConnectionName": autorest.Encode("path", databaseConnectionName), + "environmentName": autorest.Encode("path", environmentName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1782,20 +2249,20 @@ func (client StaticSitesClient) GetPrivateEndpointConnectionListPreparer(ctx con preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPrivateEndpointConnectionListSender sends the GetPrivateEndpointConnectionList request. The method will close the +// GetBuildDatabaseConnectionSender sends the GetBuildDatabaseConnection request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) GetPrivateEndpointConnectionListSender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) GetBuildDatabaseConnectionSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// GetPrivateEndpointConnectionListResponder handles the response to the GetPrivateEndpointConnectionList request. The method always +// GetBuildDatabaseConnectionResponder handles the response to the GetBuildDatabaseConnection request. The method always // closes the http.Response Body. -func (client StaticSitesClient) GetPrivateEndpointConnectionListResponder(resp *http.Response) (result PrivateEndpointConnectionCollection, err error) { +func (client StaticSitesClient) GetBuildDatabaseConnectionResponder(resp *http.Response) (result DatabaseConnection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -1805,54 +2272,240 @@ func (client StaticSitesClient) GetPrivateEndpointConnectionListResponder(resp * return } -// getPrivateEndpointConnectionListNextResults retrieves the next set of results, if any. -func (client StaticSitesClient) getPrivateEndpointConnectionListNextResults(ctx context.Context, lastResults PrivateEndpointConnectionCollection) (result PrivateEndpointConnectionCollection, err error) { - req, err := lastResults.privateEndpointConnectionCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getPrivateEndpointConnectionListNextResults", nil, "Failure preparing next results request") +// GetBuildDatabaseConnectionWithDetails sends the get build database connection with details request. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the static site +// environmentName - the stage site identifier. +// databaseConnectionName - name of the database connection. +func (client StaticSitesClient) GetBuildDatabaseConnectionWithDetails(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string) (result DatabaseConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetBuildDatabaseConnectionWithDetails") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - if req == nil { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: environmentName, + Constraints: []validation.Constraint{{Target: "environmentName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+$`, Chain: nil}}}, + {TargetValue: databaseConnectionName, + Constraints: []validation.Constraint{{Target: "databaseConnectionName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "GetBuildDatabaseConnectionWithDetails", err.Error()) + } + + req, err := client.GetBuildDatabaseConnectionWithDetailsPreparer(ctx, resourceGroupName, name, environmentName, databaseConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetBuildDatabaseConnectionWithDetails", nil, "Failure preparing request") return } - resp, err := client.GetPrivateEndpointConnectionListSender(req) + + resp, err := client.GetBuildDatabaseConnectionWithDetailsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getPrivateEndpointConnectionListNextResults", resp, "Failure sending next results request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetBuildDatabaseConnectionWithDetails", resp, "Failure sending request") + return } - result, err = client.GetPrivateEndpointConnectionListResponder(resp) + + result, err = client.GetBuildDatabaseConnectionWithDetailsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "getPrivateEndpointConnectionListNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetBuildDatabaseConnectionWithDetails", resp, "Failure responding to request") + return } + return } -// GetPrivateEndpointConnectionListComplete enumerates all values, automatically crossing page boundaries as required. -func (client StaticSitesClient) GetPrivateEndpointConnectionListComplete(ctx context.Context, resourceGroupName string, name string) (result PrivateEndpointConnectionCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetPrivateEndpointConnectionList") - defer func() { - sc := -1 +// GetBuildDatabaseConnectionWithDetailsPreparer prepares the GetBuildDatabaseConnectionWithDetails request. +func (client StaticSitesClient) GetBuildDatabaseConnectionWithDetailsPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseConnectionName": autorest.Encode("path", databaseConnectionName), + "environmentName": autorest.Encode("path", environmentName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}/show", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetBuildDatabaseConnectionWithDetailsSender sends the GetBuildDatabaseConnectionWithDetails request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) GetBuildDatabaseConnectionWithDetailsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetBuildDatabaseConnectionWithDetailsResponder handles the response to the GetBuildDatabaseConnectionWithDetails request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) GetBuildDatabaseConnectionWithDetailsResponder(resp *http.Response) (result DatabaseConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetBuildDatabaseConnections sends the get build database connections request. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the static site +// environmentName - the stage site identifier. +func (client StaticSitesClient) GetBuildDatabaseConnections(ctx context.Context, resourceGroupName string, name string, environmentName string) (result DatabaseConnectionCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetBuildDatabaseConnections") + defer func() { + sc := -1 + if result.dcc.Response.Response != nil { + sc = result.dcc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: environmentName, + Constraints: []validation.Constraint{{Target: "environmentName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "GetBuildDatabaseConnections", err.Error()) + } + + result.fn = client.getBuildDatabaseConnectionsNextResults + req, err := client.GetBuildDatabaseConnectionsPreparer(ctx, resourceGroupName, name, environmentName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetBuildDatabaseConnections", nil, "Failure preparing request") + return + } + + resp, err := client.GetBuildDatabaseConnectionsSender(req) + if err != nil { + result.dcc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetBuildDatabaseConnections", resp, "Failure sending request") + return + } + + result.dcc, err = client.GetBuildDatabaseConnectionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetBuildDatabaseConnections", resp, "Failure responding to request") + return + } + if result.dcc.hasNextLink() && result.dcc.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// GetBuildDatabaseConnectionsPreparer prepares the GetBuildDatabaseConnections request. +func (client StaticSitesClient) GetBuildDatabaseConnectionsPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "environmentName": autorest.Encode("path", environmentName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetBuildDatabaseConnectionsSender sends the GetBuildDatabaseConnections request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) GetBuildDatabaseConnectionsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetBuildDatabaseConnectionsResponder handles the response to the GetBuildDatabaseConnections request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) GetBuildDatabaseConnectionsResponder(resp *http.Response) (result DatabaseConnectionCollection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// getBuildDatabaseConnectionsNextResults retrieves the next set of results, if any. +func (client StaticSitesClient) getBuildDatabaseConnectionsNextResults(ctx context.Context, lastResults DatabaseConnectionCollection) (result DatabaseConnectionCollection, err error) { + req, err := lastResults.databaseConnectionCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getBuildDatabaseConnectionsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.GetBuildDatabaseConnectionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getBuildDatabaseConnectionsNextResults", resp, "Failure sending next results request") + } + result, err = client.GetBuildDatabaseConnectionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "getBuildDatabaseConnectionsNextResults", resp, "Failure responding to next results request") + } + return +} + +// GetBuildDatabaseConnectionsComplete enumerates all values, automatically crossing page boundaries as required. +func (client StaticSitesClient) GetBuildDatabaseConnectionsComplete(ctx context.Context, resourceGroupName string, name string, environmentName string) (result DatabaseConnectionCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetBuildDatabaseConnections") + defer func() { + sc := -1 if result.Response().Response.Response != nil { sc = result.page.Response().Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.GetPrivateEndpointConnectionList(ctx, resourceGroupName, name) + result.page, err = client.GetBuildDatabaseConnections(ctx, resourceGroupName, name, environmentName) return } -// GetPrivateLinkResources description for Gets the private link resources +// GetBuildDatabaseConnectionsWithDetails sends the get build database connections with details request. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the site. -func (client StaticSitesClient) GetPrivateLinkResources(ctx context.Context, resourceGroupName string, name string) (result PrivateLinkResourcesWrapper, err error) { +// name - name of the static site +// environmentName - the stage site identifier. +func (client StaticSitesClient) GetBuildDatabaseConnectionsWithDetails(ctx context.Context, resourceGroupName string, name string, environmentName string) (result DatabaseConnectionCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetPrivateLinkResources") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetBuildDatabaseConnectionsWithDetails") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.dcc.Response.Response != nil { + sc = result.dcc.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -1861,62 +2514,70 @@ func (client StaticSitesClient) GetPrivateLinkResources(ctx context.Context, res {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "GetPrivateLinkResources", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: environmentName, + Constraints: []validation.Constraint{{Target: "environmentName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "GetBuildDatabaseConnectionsWithDetails", err.Error()) } - req, err := client.GetPrivateLinkResourcesPreparer(ctx, resourceGroupName, name) + result.fn = client.getBuildDatabaseConnectionsWithDetailsNextResults + req, err := client.GetBuildDatabaseConnectionsWithDetailsPreparer(ctx, resourceGroupName, name, environmentName) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetPrivateLinkResources", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetBuildDatabaseConnectionsWithDetails", nil, "Failure preparing request") return } - resp, err := client.GetPrivateLinkResourcesSender(req) + resp, err := client.GetBuildDatabaseConnectionsWithDetailsSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetPrivateLinkResources", resp, "Failure sending request") + result.dcc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetBuildDatabaseConnectionsWithDetails", resp, "Failure sending request") return } - result, err = client.GetPrivateLinkResourcesResponder(resp) + result.dcc, err = client.GetBuildDatabaseConnectionsWithDetailsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetPrivateLinkResources", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetBuildDatabaseConnectionsWithDetails", resp, "Failure responding to request") + return + } + if result.dcc.hasNextLink() && result.dcc.IsEmpty() { + err = result.NextWithContext(ctx) return } return } -// GetPrivateLinkResourcesPreparer prepares the GetPrivateLinkResources request. -func (client StaticSitesClient) GetPrivateLinkResourcesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetBuildDatabaseConnectionsWithDetailsPreparer prepares the GetBuildDatabaseConnectionsWithDetails request. +func (client StaticSitesClient) GetBuildDatabaseConnectionsWithDetailsPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "environmentName": autorest.Encode("path", environmentName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/showDatabaseConnections", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPrivateLinkResourcesSender sends the GetPrivateLinkResources request. The method will close the +// GetBuildDatabaseConnectionsWithDetailsSender sends the GetBuildDatabaseConnectionsWithDetails request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) GetPrivateLinkResourcesSender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) GetBuildDatabaseConnectionsWithDetailsSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// GetPrivateLinkResourcesResponder handles the response to the GetPrivateLinkResources request. The method always +// GetBuildDatabaseConnectionsWithDetailsResponder handles the response to the GetBuildDatabaseConnectionsWithDetails request. The method always // closes the http.Response Body. -func (client StaticSitesClient) GetPrivateLinkResourcesResponder(resp *http.Response) (result PrivateLinkResourcesWrapper, err error) { +func (client StaticSitesClient) GetBuildDatabaseConnectionsWithDetailsResponder(resp *http.Response) (result DatabaseConnectionCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -1926,13 +2587,51 @@ func (client StaticSitesClient) GetPrivateLinkResourcesResponder(resp *http.Resp return } -// GetStaticSite description for Gets the details of a static site. +// getBuildDatabaseConnectionsWithDetailsNextResults retrieves the next set of results, if any. +func (client StaticSitesClient) getBuildDatabaseConnectionsWithDetailsNextResults(ctx context.Context, lastResults DatabaseConnectionCollection) (result DatabaseConnectionCollection, err error) { + req, err := lastResults.databaseConnectionCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getBuildDatabaseConnectionsWithDetailsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.GetBuildDatabaseConnectionsWithDetailsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getBuildDatabaseConnectionsWithDetailsNextResults", resp, "Failure sending next results request") + } + result, err = client.GetBuildDatabaseConnectionsWithDetailsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "getBuildDatabaseConnectionsWithDetailsNextResults", resp, "Failure responding to next results request") + } + return +} + +// GetBuildDatabaseConnectionsWithDetailsComplete enumerates all values, automatically crossing page boundaries as required. +func (client StaticSitesClient) GetBuildDatabaseConnectionsWithDetailsComplete(ctx context.Context, resourceGroupName string, name string, environmentName string) (result DatabaseConnectionCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetBuildDatabaseConnectionsWithDetails") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.GetBuildDatabaseConnectionsWithDetails(ctx, resourceGroupName, name, environmentName) + return +} + +// GetDatabaseConnection sends the get database connection request. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the static site. -func (client StaticSitesClient) GetStaticSite(ctx context.Context, resourceGroupName string, name string) (result StaticSiteARMResource, err error) { +// name - name of the static site +// databaseConnectionName - name of the database connection. +func (client StaticSitesClient) GetDatabaseConnection(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string) (result DatabaseConnection, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetStaticSite") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetDatabaseConnection") defer func() { sc := -1 if result.Response.Response != nil { @@ -1945,41 +2644,44 @@ func (client StaticSitesClient) GetStaticSite(ctx context.Context, resourceGroup {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "GetStaticSite", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: databaseConnectionName, + Constraints: []validation.Constraint{{Target: "databaseConnectionName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "GetDatabaseConnection", err.Error()) } - req, err := client.GetStaticSitePreparer(ctx, resourceGroupName, name) + req, err := client.GetDatabaseConnectionPreparer(ctx, resourceGroupName, name, databaseConnectionName) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSite", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetDatabaseConnection", nil, "Failure preparing request") return } - resp, err := client.GetStaticSiteSender(req) + resp, err := client.GetDatabaseConnectionSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSite", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetDatabaseConnection", resp, "Failure sending request") return } - result, err = client.GetStaticSiteResponder(resp) + result, err = client.GetDatabaseConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSite", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetDatabaseConnection", resp, "Failure responding to request") return } return } -// GetStaticSitePreparer prepares the GetStaticSite request. -func (client StaticSitesClient) GetStaticSitePreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetDatabaseConnectionPreparer prepares the GetDatabaseConnection request. +func (client StaticSitesClient) GetDatabaseConnectionPreparer(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "databaseConnectionName": autorest.Encode("path", databaseConnectionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1987,20 +2689,20 @@ func (client StaticSitesClient) GetStaticSitePreparer(ctx context.Context, resou preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetStaticSiteSender sends the GetStaticSite request. The method will close the +// GetDatabaseConnectionSender sends the GetDatabaseConnection request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) GetStaticSiteSender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) GetDatabaseConnectionSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// GetStaticSiteResponder handles the response to the GetStaticSite request. The method always +// GetDatabaseConnectionResponder handles the response to the GetDatabaseConnection request. The method always // closes the http.Response Body. -func (client StaticSitesClient) GetStaticSiteResponder(resp *http.Response) (result StaticSiteARMResource, err error) { +func (client StaticSitesClient) GetDatabaseConnectionResponder(resp *http.Response) (result DatabaseConnection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -2010,14 +2712,14 @@ func (client StaticSitesClient) GetStaticSiteResponder(resp *http.Response) (res return } -// GetStaticSiteBuild description for Gets the details of a static site build. +// GetDatabaseConnectionWithDetails sends the get database connection with details request. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the static site. -// environmentName - the stage site identifier. -func (client StaticSitesClient) GetStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string) (result StaticSiteBuildARMResource, err error) { +// name - name of the static site +// databaseConnectionName - name of the database connection. +func (client StaticSitesClient) GetDatabaseConnectionWithDetails(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string) (result DatabaseConnection, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetStaticSiteBuild") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetDatabaseConnectionWithDetails") defer func() { sc := -1 if result.Response.Response != nil { @@ -2030,63 +2732,65 @@ func (client StaticSitesClient) GetStaticSiteBuild(ctx context.Context, resource {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "GetStaticSiteBuild", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: databaseConnectionName, + Constraints: []validation.Constraint{{Target: "databaseConnectionName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "GetDatabaseConnectionWithDetails", err.Error()) } - req, err := client.GetStaticSiteBuildPreparer(ctx, resourceGroupName, name, environmentName) + req, err := client.GetDatabaseConnectionWithDetailsPreparer(ctx, resourceGroupName, name, databaseConnectionName) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSiteBuild", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetDatabaseConnectionWithDetails", nil, "Failure preparing request") return } - resp, err := client.GetStaticSiteBuildSender(req) + resp, err := client.GetDatabaseConnectionWithDetailsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSiteBuild", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetDatabaseConnectionWithDetails", resp, "Failure sending request") return } - result, err = client.GetStaticSiteBuildResponder(resp) + result, err = client.GetDatabaseConnectionWithDetailsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSiteBuild", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetDatabaseConnectionWithDetails", resp, "Failure responding to request") return } return } -// GetStaticSiteBuildPreparer prepares the GetStaticSiteBuild request. -func (client StaticSitesClient) GetStaticSiteBuildPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string) (*http.Request, error) { +// GetDatabaseConnectionWithDetailsPreparer prepares the GetDatabaseConnectionWithDetails request. +func (client StaticSitesClient) GetDatabaseConnectionWithDetailsPreparer(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "environmentName": autorest.Encode("path", environmentName), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "databaseConnectionName": autorest.Encode("path", databaseConnectionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}/show", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetStaticSiteBuildSender sends the GetStaticSiteBuild request. The method will close the +// GetDatabaseConnectionWithDetailsSender sends the GetDatabaseConnectionWithDetails request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) GetStaticSiteBuildSender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) GetDatabaseConnectionWithDetailsSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// GetStaticSiteBuildResponder handles the response to the GetStaticSiteBuild request. The method always +// GetDatabaseConnectionWithDetailsResponder handles the response to the GetDatabaseConnectionWithDetails request. The method always // closes the http.Response Body. -func (client StaticSitesClient) GetStaticSiteBuildResponder(resp *http.Response) (result StaticSiteBuildARMResource, err error) { +func (client StaticSitesClient) GetDatabaseConnectionWithDetailsResponder(resp *http.Response) (result DatabaseConnection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -2096,17 +2800,17 @@ func (client StaticSitesClient) GetStaticSiteBuildResponder(resp *http.Response) return } -// GetStaticSiteBuilds description for Gets all static site builds for a particular static site. +// GetDatabaseConnections sends the get database connections request. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the static site. -func (client StaticSitesClient) GetStaticSiteBuilds(ctx context.Context, resourceGroupName string, name string) (result StaticSiteBuildCollectionPage, err error) { +// name - name of the static site +func (client StaticSitesClient) GetDatabaseConnections(ctx context.Context, resourceGroupName string, name string) (result DatabaseConnectionCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetStaticSiteBuilds") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetDatabaseConnections") defer func() { sc := -1 - if result.ssbc.Response.Response != nil { - sc = result.ssbc.Response.Response.StatusCode + if result.dcc.Response.Response != nil { + sc = result.dcc.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -2116,29 +2820,29 @@ func (client StaticSitesClient) GetStaticSiteBuilds(ctx context.Context, resourc Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "GetStaticSiteBuilds", err.Error()) + return result, validation.NewError("web.StaticSitesClient", "GetDatabaseConnections", err.Error()) } - result.fn = client.getStaticSiteBuildsNextResults - req, err := client.GetStaticSiteBuildsPreparer(ctx, resourceGroupName, name) + result.fn = client.getDatabaseConnectionsNextResults + req, err := client.GetDatabaseConnectionsPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSiteBuilds", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetDatabaseConnections", nil, "Failure preparing request") return } - resp, err := client.GetStaticSiteBuildsSender(req) + resp, err := client.GetDatabaseConnectionsSender(req) if err != nil { - result.ssbc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSiteBuilds", resp, "Failure sending request") + result.dcc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetDatabaseConnections", resp, "Failure sending request") return } - result.ssbc, err = client.GetStaticSiteBuildsResponder(resp) + result.dcc, err = client.GetDatabaseConnectionsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSiteBuilds", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetDatabaseConnections", resp, "Failure responding to request") return } - if result.ssbc.hasNextLink() && result.ssbc.IsEmpty() { + if result.dcc.hasNextLink() && result.dcc.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -2146,15 +2850,15 @@ func (client StaticSitesClient) GetStaticSiteBuilds(ctx context.Context, resourc return } -// GetStaticSiteBuildsPreparer prepares the GetStaticSiteBuilds request. -func (client StaticSitesClient) GetStaticSiteBuildsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetDatabaseConnectionsPreparer prepares the GetDatabaseConnections request. +func (client StaticSitesClient) GetDatabaseConnectionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2162,20 +2866,20 @@ func (client StaticSitesClient) GetStaticSiteBuildsPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetStaticSiteBuildsSender sends the GetStaticSiteBuilds request. The method will close the +// GetDatabaseConnectionsSender sends the GetDatabaseConnections request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) GetStaticSiteBuildsSender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) GetDatabaseConnectionsSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// GetStaticSiteBuildsResponder handles the response to the GetStaticSiteBuilds request. The method always +// GetDatabaseConnectionsResponder handles the response to the GetDatabaseConnections request. The method always // closes the http.Response Body. -func (client StaticSitesClient) GetStaticSiteBuildsResponder(resp *http.Response) (result StaticSiteBuildCollection, err error) { +func (client StaticSitesClient) GetDatabaseConnectionsResponder(resp *http.Response) (result DatabaseConnectionCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -2185,31 +2889,31 @@ func (client StaticSitesClient) GetStaticSiteBuildsResponder(resp *http.Response return } -// getStaticSiteBuildsNextResults retrieves the next set of results, if any. -func (client StaticSitesClient) getStaticSiteBuildsNextResults(ctx context.Context, lastResults StaticSiteBuildCollection) (result StaticSiteBuildCollection, err error) { - req, err := lastResults.staticSiteBuildCollectionPreparer(ctx) +// getDatabaseConnectionsNextResults retrieves the next set of results, if any. +func (client StaticSitesClient) getDatabaseConnectionsNextResults(ctx context.Context, lastResults DatabaseConnectionCollection) (result DatabaseConnectionCollection, err error) { + req, err := lastResults.databaseConnectionCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getStaticSiteBuildsNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getDatabaseConnectionsNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.GetStaticSiteBuildsSender(req) + resp, err := client.GetDatabaseConnectionsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getStaticSiteBuildsNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getDatabaseConnectionsNextResults", resp, "Failure sending next results request") } - result, err = client.GetStaticSiteBuildsResponder(resp) + result, err = client.GetDatabaseConnectionsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "getStaticSiteBuildsNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "getDatabaseConnectionsNextResults", resp, "Failure responding to next results request") } return } -// GetStaticSiteBuildsComplete enumerates all values, automatically crossing page boundaries as required. -func (client StaticSitesClient) GetStaticSiteBuildsComplete(ctx context.Context, resourceGroupName string, name string) (result StaticSiteBuildCollectionIterator, err error) { +// GetDatabaseConnectionsComplete enumerates all values, automatically crossing page boundaries as required. +func (client StaticSitesClient) GetDatabaseConnectionsComplete(ctx context.Context, resourceGroupName string, name string) (result DatabaseConnectionCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetStaticSiteBuilds") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetDatabaseConnections") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -2218,22 +2922,21 @@ func (client StaticSitesClient) GetStaticSiteBuildsComplete(ctx context.Context, tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.GetStaticSiteBuilds(ctx, resourceGroupName, name) + result.page, err = client.GetDatabaseConnections(ctx, resourceGroupName, name) return } -// GetStaticSiteCustomDomain description for Gets an existing custom domain for a particular static site. +// GetDatabaseConnectionsWithDetails sends the get database connections with details request. // Parameters: // 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. -func (client StaticSitesClient) GetStaticSiteCustomDomain(ctx context.Context, resourceGroupName string, name string, domainName string) (result StaticSiteCustomDomainOverviewARMResource, err error) { +// name - name of the static site +func (client StaticSitesClient) GetDatabaseConnectionsWithDetails(ctx context.Context, resourceGroupName string, name string) (result DatabaseConnectionCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetStaticSiteCustomDomain") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetDatabaseConnectionsWithDetails") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.dcc.Response.Response != nil { + sc = result.dcc.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -2243,113 +2946,29 @@ func (client StaticSitesClient) GetStaticSiteCustomDomain(ctx context.Context, r Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "GetStaticSiteCustomDomain", err.Error()) + return result, validation.NewError("web.StaticSitesClient", "GetDatabaseConnectionsWithDetails", err.Error()) } - req, err := client.GetStaticSiteCustomDomainPreparer(ctx, resourceGroupName, name, domainName) - if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSiteCustomDomain", nil, "Failure preparing request") - return - } - - resp, err := client.GetStaticSiteCustomDomainSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSiteCustomDomain", resp, "Failure sending request") - return - } - - result, err = client.GetStaticSiteCustomDomainResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSiteCustomDomain", resp, "Failure responding to request") - return - } - - return -} - -// GetStaticSiteCustomDomainPreparer prepares the GetStaticSiteCustomDomain request. -func (client StaticSitesClient) GetStaticSiteCustomDomainPreparer(ctx context.Context, resourceGroupName string, name string, domainName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "domainName": autorest.Encode("path", domainName), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2021-03-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetStaticSiteCustomDomainSender sends the GetStaticSiteCustomDomain request. The method will close the -// http.Response Body if it receives an error. -func (client StaticSitesClient) GetStaticSiteCustomDomainSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetStaticSiteCustomDomainResponder handles the response to the GetStaticSiteCustomDomain request. The method always -// closes the http.Response Body. -func (client StaticSitesClient) GetStaticSiteCustomDomainResponder(resp *http.Response) (result StaticSiteCustomDomainOverviewARMResource, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetStaticSitesByResourceGroup description for Gets all static sites in the specified resource group. -// Parameters: -// resourceGroupName - name of the resource group to which the resource belongs. -func (client StaticSitesClient) GetStaticSitesByResourceGroup(ctx context.Context, resourceGroupName string) (result StaticSiteCollectionPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetStaticSitesByResourceGroup") - defer func() { - sc := -1 - if result.ssc.Response.Response != nil { - sc = result.ssc.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "GetStaticSitesByResourceGroup", err.Error()) - } - - result.fn = client.getStaticSitesByResourceGroupNextResults - req, err := client.GetStaticSitesByResourceGroupPreparer(ctx, resourceGroupName) + result.fn = client.getDatabaseConnectionsWithDetailsNextResults + req, err := client.GetDatabaseConnectionsWithDetailsPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSitesByResourceGroup", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetDatabaseConnectionsWithDetails", nil, "Failure preparing request") return } - resp, err := client.GetStaticSitesByResourceGroupSender(req) + resp, err := client.GetDatabaseConnectionsWithDetailsSender(req) if err != nil { - result.ssc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSitesByResourceGroup", resp, "Failure sending request") + result.dcc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetDatabaseConnectionsWithDetails", resp, "Failure sending request") return } - result.ssc, err = client.GetStaticSitesByResourceGroupResponder(resp) + result.dcc, err = client.GetDatabaseConnectionsWithDetailsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSitesByResourceGroup", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetDatabaseConnectionsWithDetails", resp, "Failure responding to request") return } - if result.ssc.hasNextLink() && result.ssc.IsEmpty() { + if result.dcc.hasNextLink() && result.dcc.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -2357,35 +2976,36 @@ func (client StaticSitesClient) GetStaticSitesByResourceGroup(ctx context.Contex return } -// GetStaticSitesByResourceGroupPreparer prepares the GetStaticSitesByResourceGroup request. -func (client StaticSitesClient) GetStaticSitesByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { +// GetDatabaseConnectionsWithDetailsPreparer prepares the GetDatabaseConnectionsWithDetails request. +func (client StaticSitesClient) GetDatabaseConnectionsWithDetailsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/showDatabaseConnections", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetStaticSitesByResourceGroupSender sends the GetStaticSitesByResourceGroup request. The method will close the +// GetDatabaseConnectionsWithDetailsSender sends the GetDatabaseConnectionsWithDetails request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) GetStaticSitesByResourceGroupSender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) GetDatabaseConnectionsWithDetailsSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// GetStaticSitesByResourceGroupResponder handles the response to the GetStaticSitesByResourceGroup request. The method always +// GetDatabaseConnectionsWithDetailsResponder handles the response to the GetDatabaseConnectionsWithDetails request. The method always // closes the http.Response Body. -func (client StaticSitesClient) GetStaticSitesByResourceGroupResponder(resp *http.Response) (result StaticSiteCollection, err error) { +func (client StaticSitesClient) GetDatabaseConnectionsWithDetailsResponder(resp *http.Response) (result DatabaseConnectionCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -2395,31 +3015,31 @@ func (client StaticSitesClient) GetStaticSitesByResourceGroupResponder(resp *htt return } -// getStaticSitesByResourceGroupNextResults retrieves the next set of results, if any. -func (client StaticSitesClient) getStaticSitesByResourceGroupNextResults(ctx context.Context, lastResults StaticSiteCollection) (result StaticSiteCollection, err error) { - req, err := lastResults.staticSiteCollectionPreparer(ctx) +// getDatabaseConnectionsWithDetailsNextResults retrieves the next set of results, if any. +func (client StaticSitesClient) getDatabaseConnectionsWithDetailsNextResults(ctx context.Context, lastResults DatabaseConnectionCollection) (result DatabaseConnectionCollection, err error) { + req, err := lastResults.databaseConnectionCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getStaticSitesByResourceGroupNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getDatabaseConnectionsWithDetailsNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.GetStaticSitesByResourceGroupSender(req) + resp, err := client.GetDatabaseConnectionsWithDetailsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getStaticSitesByResourceGroupNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getDatabaseConnectionsWithDetailsNextResults", resp, "Failure sending next results request") } - result, err = client.GetStaticSitesByResourceGroupResponder(resp) + result, err = client.GetDatabaseConnectionsWithDetailsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "getStaticSitesByResourceGroupNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "getDatabaseConnectionsWithDetailsNextResults", resp, "Failure responding to next results request") } return } -// GetStaticSitesByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client StaticSitesClient) GetStaticSitesByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result StaticSiteCollectionIterator, err error) { +// GetDatabaseConnectionsWithDetailsComplete enumerates all values, automatically crossing page boundaries as required. +func (client StaticSitesClient) GetDatabaseConnectionsWithDetailsComplete(ctx context.Context, resourceGroupName string, name string) (result DatabaseConnectionCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetStaticSitesByResourceGroup") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetDatabaseConnectionsWithDetails") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -2428,19 +3048,18 @@ func (client StaticSitesClient) GetStaticSitesByResourceGroupComplete(ctx contex tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.GetStaticSitesByResourceGroup(ctx, resourceGroupName) + result.page, err = client.GetDatabaseConnectionsWithDetails(ctx, resourceGroupName, name) return } -// GetUserProvidedFunctionAppForStaticSite description for Gets the details of the user provided function app -// registered with a static site +// GetLinkedBackend sends the get linked backend request. // Parameters: // 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. -func (client StaticSitesClient) GetUserProvidedFunctionAppForStaticSite(ctx context.Context, resourceGroupName string, name string, functionAppName string) (result StaticSiteUserProvidedFunctionAppARMResource, err error) { +// name - name of the static site +// linkedBackendName - name of the linked backend that should be retrieved +func (client StaticSitesClient) GetLinkedBackend(ctx context.Context, resourceGroupName string, name string, linkedBackendName string) (result StaticSiteLinkedBackendARMResource, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetUserProvidedFunctionAppForStaticSite") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetLinkedBackend") defer func() { sc := -1 if result.Response.Response != nil { @@ -2454,41 +3073,41 @@ func (client StaticSitesClient) GetUserProvidedFunctionAppForStaticSite(ctx cont Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "GetUserProvidedFunctionAppForStaticSite", err.Error()) + return result, validation.NewError("web.StaticSitesClient", "GetLinkedBackend", err.Error()) } - req, err := client.GetUserProvidedFunctionAppForStaticSitePreparer(ctx, resourceGroupName, name, functionAppName) + req, err := client.GetLinkedBackendPreparer(ctx, resourceGroupName, name, linkedBackendName) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppForStaticSite", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetLinkedBackend", nil, "Failure preparing request") return } - resp, err := client.GetUserProvidedFunctionAppForStaticSiteSender(req) + resp, err := client.GetLinkedBackendSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppForStaticSite", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetLinkedBackend", resp, "Failure sending request") return } - result, err = client.GetUserProvidedFunctionAppForStaticSiteResponder(resp) + result, err = client.GetLinkedBackendResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppForStaticSite", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetLinkedBackend", resp, "Failure responding to request") return } return } -// GetUserProvidedFunctionAppForStaticSitePreparer prepares the GetUserProvidedFunctionAppForStaticSite request. -func (client StaticSitesClient) GetUserProvidedFunctionAppForStaticSitePreparer(ctx context.Context, resourceGroupName string, name string, functionAppName string) (*http.Request, error) { +// GetLinkedBackendPreparer prepares the GetLinkedBackend request. +func (client StaticSitesClient) GetLinkedBackendPreparer(ctx context.Context, resourceGroupName string, name string, linkedBackendName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "functionAppName": autorest.Encode("path", functionAppName), + "linkedBackendName": autorest.Encode("path", linkedBackendName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2496,20 +3115,20 @@ func (client StaticSitesClient) GetUserProvidedFunctionAppForStaticSitePreparer( preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetUserProvidedFunctionAppForStaticSiteSender sends the GetUserProvidedFunctionAppForStaticSite request. The method will close the +// GetLinkedBackendSender sends the GetLinkedBackend request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) GetUserProvidedFunctionAppForStaticSiteSender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) GetLinkedBackendSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// GetUserProvidedFunctionAppForStaticSiteResponder handles the response to the GetUserProvidedFunctionAppForStaticSite request. The method always +// GetLinkedBackendResponder handles the response to the GetLinkedBackend request. The method always // closes the http.Response Body. -func (client StaticSitesClient) GetUserProvidedFunctionAppForStaticSiteResponder(resp *http.Response) (result StaticSiteUserProvidedFunctionAppARMResource, err error) { +func (client StaticSitesClient) GetLinkedBackendResponder(resp *http.Response) (result StaticSiteLinkedBackendARMResource, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -2519,16 +3138,15 @@ func (client StaticSitesClient) GetUserProvidedFunctionAppForStaticSiteResponder return } -// GetUserProvidedFunctionAppForStaticSiteBuild description for Gets the details of the user provided function app -// registered with a static site build +// GetLinkedBackendForBuild sends the get linked backend for build request. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the static site. -// environmentName - the stage site identifier. -// functionAppName - name of the function app registered with the static site build. -func (client StaticSitesClient) GetUserProvidedFunctionAppForStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string) (result StaticSiteUserProvidedFunctionAppARMResource, err error) { +// name - name of the static site +// environmentName - the stage site identifier +// linkedBackendName - name of the linked backend that should be retrieved +func (client StaticSitesClient) GetLinkedBackendForBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string) (result StaticSiteLinkedBackendARMResource, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetUserProvidedFunctionAppForStaticSiteBuild") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetLinkedBackendForBuild") defer func() { sc := -1 if result.Response.Response != nil { @@ -2542,42 +3160,42 @@ func (client StaticSitesClient) GetUserProvidedFunctionAppForStaticSiteBuild(ctx Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "GetUserProvidedFunctionAppForStaticSiteBuild", err.Error()) + return result, validation.NewError("web.StaticSitesClient", "GetLinkedBackendForBuild", err.Error()) } - req, err := client.GetUserProvidedFunctionAppForStaticSiteBuildPreparer(ctx, resourceGroupName, name, environmentName, functionAppName) + req, err := client.GetLinkedBackendForBuildPreparer(ctx, resourceGroupName, name, environmentName, linkedBackendName) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppForStaticSiteBuild", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetLinkedBackendForBuild", nil, "Failure preparing request") return } - resp, err := client.GetUserProvidedFunctionAppForStaticSiteBuildSender(req) + resp, err := client.GetLinkedBackendForBuildSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppForStaticSiteBuild", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetLinkedBackendForBuild", resp, "Failure sending request") return } - result, err = client.GetUserProvidedFunctionAppForStaticSiteBuildResponder(resp) + result, err = client.GetLinkedBackendForBuildResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppForStaticSiteBuild", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetLinkedBackendForBuild", resp, "Failure responding to request") return } return } -// GetUserProvidedFunctionAppForStaticSiteBuildPreparer prepares the GetUserProvidedFunctionAppForStaticSiteBuild request. -func (client StaticSitesClient) GetUserProvidedFunctionAppForStaticSiteBuildPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string) (*http.Request, error) { +// GetLinkedBackendForBuildPreparer prepares the GetLinkedBackendForBuild request. +func (client StaticSitesClient) GetLinkedBackendForBuildPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "environmentName": autorest.Encode("path", environmentName), - "functionAppName": autorest.Encode("path", functionAppName), + "linkedBackendName": autorest.Encode("path", linkedBackendName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2585,20 +3203,20 @@ func (client StaticSitesClient) GetUserProvidedFunctionAppForStaticSiteBuildPrep preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetUserProvidedFunctionAppForStaticSiteBuildSender sends the GetUserProvidedFunctionAppForStaticSiteBuild request. The method will close the +// GetLinkedBackendForBuildSender sends the GetLinkedBackendForBuild request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) GetUserProvidedFunctionAppForStaticSiteBuildSender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) GetLinkedBackendForBuildSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// GetUserProvidedFunctionAppForStaticSiteBuildResponder handles the response to the GetUserProvidedFunctionAppForStaticSiteBuild request. The method always +// GetLinkedBackendForBuildResponder handles the response to the GetLinkedBackendForBuild request. The method always // closes the http.Response Body. -func (client StaticSitesClient) GetUserProvidedFunctionAppForStaticSiteBuildResponder(resp *http.Response) (result StaticSiteUserProvidedFunctionAppARMResource, err error) { +func (client StaticSitesClient) GetLinkedBackendForBuildResponder(resp *http.Response) (result StaticSiteLinkedBackendARMResource, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -2608,18 +3226,17 @@ func (client StaticSitesClient) GetUserProvidedFunctionAppForStaticSiteBuildResp return } -// GetUserProvidedFunctionAppsForStaticSite description for Gets the details of the user provided function apps -// registered with a static site +// GetLinkedBackends sends the get linked backends request. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the static site. -func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSite(ctx context.Context, resourceGroupName string, name string) (result StaticSiteUserProvidedFunctionAppsCollectionPage, err error) { +// name - name of the static site +func (client StaticSitesClient) GetLinkedBackends(ctx context.Context, resourceGroupName string, name string) (result StaticSiteLinkedBackendsCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetUserProvidedFunctionAppsForStaticSite") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetLinkedBackends") defer func() { sc := -1 - if result.ssupfac.Response.Response != nil { - sc = result.ssupfac.Response.Response.StatusCode + if result.sslbc.Response.Response != nil { + sc = result.sslbc.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -2629,29 +3246,29 @@ func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSite(ctx con Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "GetUserProvidedFunctionAppsForStaticSite", err.Error()) + return result, validation.NewError("web.StaticSitesClient", "GetLinkedBackends", err.Error()) } - result.fn = client.getUserProvidedFunctionAppsForStaticSiteNextResults - req, err := client.GetUserProvidedFunctionAppsForStaticSitePreparer(ctx, resourceGroupName, name) + result.fn = client.getLinkedBackendsNextResults + req, err := client.GetLinkedBackendsPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppsForStaticSite", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetLinkedBackends", nil, "Failure preparing request") return } - resp, err := client.GetUserProvidedFunctionAppsForStaticSiteSender(req) + resp, err := client.GetLinkedBackendsSender(req) if err != nil { - result.ssupfac.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppsForStaticSite", resp, "Failure sending request") + result.sslbc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetLinkedBackends", resp, "Failure sending request") return } - result.ssupfac, err = client.GetUserProvidedFunctionAppsForStaticSiteResponder(resp) + result.sslbc, err = client.GetLinkedBackendsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppsForStaticSite", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetLinkedBackends", resp, "Failure responding to request") return } - if result.ssupfac.hasNextLink() && result.ssupfac.IsEmpty() { + if result.sslbc.hasNextLink() && result.sslbc.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -2659,15 +3276,15 @@ func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSite(ctx con return } -// GetUserProvidedFunctionAppsForStaticSitePreparer prepares the GetUserProvidedFunctionAppsForStaticSite request. -func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSitePreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetLinkedBackendsPreparer prepares the GetLinkedBackends request. +func (client StaticSitesClient) GetLinkedBackendsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2675,20 +3292,20 @@ func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSitePreparer preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetUserProvidedFunctionAppsForStaticSiteSender sends the GetUserProvidedFunctionAppsForStaticSite request. The method will close the +// GetLinkedBackendsSender sends the GetLinkedBackends request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteSender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) GetLinkedBackendsSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// GetUserProvidedFunctionAppsForStaticSiteResponder handles the response to the GetUserProvidedFunctionAppsForStaticSite request. The method always +// GetLinkedBackendsResponder handles the response to the GetLinkedBackends request. The method always // closes the http.Response Body. -func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteResponder(resp *http.Response) (result StaticSiteUserProvidedFunctionAppsCollection, err error) { +func (client StaticSitesClient) GetLinkedBackendsResponder(resp *http.Response) (result StaticSiteLinkedBackendsCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -2698,31 +3315,31 @@ func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteResponde return } -// getUserProvidedFunctionAppsForStaticSiteNextResults retrieves the next set of results, if any. -func (client StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteNextResults(ctx context.Context, lastResults StaticSiteUserProvidedFunctionAppsCollection) (result StaticSiteUserProvidedFunctionAppsCollection, err error) { - req, err := lastResults.staticSiteUserProvidedFunctionAppsCollectionPreparer(ctx) +// getLinkedBackendsNextResults retrieves the next set of results, if any. +func (client StaticSitesClient) getLinkedBackendsNextResults(ctx context.Context, lastResults StaticSiteLinkedBackendsCollection) (result StaticSiteLinkedBackendsCollection, err error) { + req, err := lastResults.staticSiteLinkedBackendsCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getUserProvidedFunctionAppsForStaticSiteNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getLinkedBackendsNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.GetUserProvidedFunctionAppsForStaticSiteSender(req) + resp, err := client.GetLinkedBackendsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getUserProvidedFunctionAppsForStaticSiteNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getLinkedBackendsNextResults", resp, "Failure sending next results request") } - result, err = client.GetUserProvidedFunctionAppsForStaticSiteResponder(resp) + result, err = client.GetLinkedBackendsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "getUserProvidedFunctionAppsForStaticSiteNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "getLinkedBackendsNextResults", resp, "Failure responding to next results request") } return } -// GetUserProvidedFunctionAppsForStaticSiteComplete enumerates all values, automatically crossing page boundaries as required. -func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteComplete(ctx context.Context, resourceGroupName string, name string) (result StaticSiteUserProvidedFunctionAppsCollectionIterator, err error) { +// GetLinkedBackendsComplete enumerates all values, automatically crossing page boundaries as required. +func (client StaticSitesClient) GetLinkedBackendsComplete(ctx context.Context, resourceGroupName string, name string) (result StaticSiteLinkedBackendsCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetUserProvidedFunctionAppsForStaticSite") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetLinkedBackends") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -2731,23 +3348,22 @@ func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteComplete tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.GetUserProvidedFunctionAppsForStaticSite(ctx, resourceGroupName, name) + result.page, err = client.GetLinkedBackends(ctx, resourceGroupName, name) return } -// GetUserProvidedFunctionAppsForStaticSiteBuild description for Gets the details of the user provided function apps -// registered with a static site build +// GetLinkedBackendsForBuild sends the get linked backends for build request. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the static site. -// environmentName - the stage site identifier. -func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string) (result StaticSiteUserProvidedFunctionAppsCollectionPage, err error) { +// name - name of the static site +// environmentName - the stage site identifier +func (client StaticSitesClient) GetLinkedBackendsForBuild(ctx context.Context, resourceGroupName string, name string, environmentName string) (result StaticSiteLinkedBackendsCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetUserProvidedFunctionAppsForStaticSiteBuild") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetLinkedBackendsForBuild") defer func() { sc := -1 - if result.ssupfac.Response.Response != nil { - sc = result.ssupfac.Response.Response.StatusCode + if result.sslbc.Response.Response != nil { + sc = result.sslbc.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -2757,29 +3373,29 @@ func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteBuild(ct Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "GetUserProvidedFunctionAppsForStaticSiteBuild", err.Error()) + return result, validation.NewError("web.StaticSitesClient", "GetLinkedBackendsForBuild", err.Error()) } - result.fn = client.getUserProvidedFunctionAppsForStaticSiteBuildNextResults - req, err := client.GetUserProvidedFunctionAppsForStaticSiteBuildPreparer(ctx, resourceGroupName, name, environmentName) + result.fn = client.getLinkedBackendsForBuildNextResults + req, err := client.GetLinkedBackendsForBuildPreparer(ctx, resourceGroupName, name, environmentName) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppsForStaticSiteBuild", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetLinkedBackendsForBuild", nil, "Failure preparing request") return } - resp, err := client.GetUserProvidedFunctionAppsForStaticSiteBuildSender(req) + resp, err := client.GetLinkedBackendsForBuildSender(req) if err != nil { - result.ssupfac.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppsForStaticSiteBuild", resp, "Failure sending request") + result.sslbc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetLinkedBackendsForBuild", resp, "Failure sending request") return } - result.ssupfac, err = client.GetUserProvidedFunctionAppsForStaticSiteBuildResponder(resp) + result.sslbc, err = client.GetLinkedBackendsForBuildResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppsForStaticSiteBuild", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetLinkedBackendsForBuild", resp, "Failure responding to request") return } - if result.ssupfac.hasNextLink() && result.ssupfac.IsEmpty() { + if result.sslbc.hasNextLink() && result.sslbc.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -2787,8 +3403,8 @@ func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteBuild(ct return } -// GetUserProvidedFunctionAppsForStaticSiteBuildPreparer prepares the GetUserProvidedFunctionAppsForStaticSiteBuild request. -func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteBuildPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string) (*http.Request, error) { +// GetLinkedBackendsForBuildPreparer prepares the GetLinkedBackendsForBuild request. +func (client StaticSitesClient) GetLinkedBackendsForBuildPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "environmentName": autorest.Encode("path", environmentName), "name": autorest.Encode("path", name), @@ -2796,7 +3412,7 @@ func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteBuildPre "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2804,20 +3420,20 @@ func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteBuildPre preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetUserProvidedFunctionAppsForStaticSiteBuildSender sends the GetUserProvidedFunctionAppsForStaticSiteBuild request. The method will close the +// GetLinkedBackendsForBuildSender sends the GetLinkedBackendsForBuild request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteBuildSender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) GetLinkedBackendsForBuildSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// GetUserProvidedFunctionAppsForStaticSiteBuildResponder handles the response to the GetUserProvidedFunctionAppsForStaticSiteBuild request. The method always +// GetLinkedBackendsForBuildResponder handles the response to the GetLinkedBackendsForBuild request. The method always // closes the http.Response Body. -func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteBuildResponder(resp *http.Response) (result StaticSiteUserProvidedFunctionAppsCollection, err error) { +func (client StaticSitesClient) GetLinkedBackendsForBuildResponder(resp *http.Response) (result StaticSiteLinkedBackendsCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -2827,31 +3443,31 @@ func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteBuildRes return } -// getUserProvidedFunctionAppsForStaticSiteBuildNextResults retrieves the next set of results, if any. -func (client StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteBuildNextResults(ctx context.Context, lastResults StaticSiteUserProvidedFunctionAppsCollection) (result StaticSiteUserProvidedFunctionAppsCollection, err error) { - req, err := lastResults.staticSiteUserProvidedFunctionAppsCollectionPreparer(ctx) +// getLinkedBackendsForBuildNextResults retrieves the next set of results, if any. +func (client StaticSitesClient) getLinkedBackendsForBuildNextResults(ctx context.Context, lastResults StaticSiteLinkedBackendsCollection) (result StaticSiteLinkedBackendsCollection, err error) { + req, err := lastResults.staticSiteLinkedBackendsCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getUserProvidedFunctionAppsForStaticSiteBuildNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getLinkedBackendsForBuildNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.GetUserProvidedFunctionAppsForStaticSiteBuildSender(req) + resp, err := client.GetLinkedBackendsForBuildSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getUserProvidedFunctionAppsForStaticSiteBuildNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getLinkedBackendsForBuildNextResults", resp, "Failure sending next results request") } - result, err = client.GetUserProvidedFunctionAppsForStaticSiteBuildResponder(resp) + result, err = client.GetLinkedBackendsForBuildResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "getUserProvidedFunctionAppsForStaticSiteBuildNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "getLinkedBackendsForBuildNextResults", resp, "Failure responding to next results request") } return } -// GetUserProvidedFunctionAppsForStaticSiteBuildComplete enumerates all values, automatically crossing page boundaries as required. -func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteBuildComplete(ctx context.Context, resourceGroupName string, name string, environmentName string) (result StaticSiteUserProvidedFunctionAppsCollectionIterator, err error) { +// GetLinkedBackendsForBuildComplete enumerates all values, automatically crossing page boundaries as required. +func (client StaticSitesClient) GetLinkedBackendsForBuildComplete(ctx context.Context, resourceGroupName string, name string, environmentName string) (result StaticSiteLinkedBackendsCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetUserProvidedFunctionAppsForStaticSiteBuild") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetLinkedBackendsForBuild") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -2860,56 +3476,66 @@ func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteBuildCom tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.GetUserProvidedFunctionAppsForStaticSiteBuild(ctx, resourceGroupName, name, environmentName) + result.page, err = client.GetLinkedBackendsForBuild(ctx, resourceGroupName, name, environmentName) return } -// List description for Get all Static Sites for a subscription. -func (client StaticSitesClient) List(ctx context.Context) (result StaticSiteCollectionPage, err error) { +// GetPrivateEndpointConnection description for Gets a private endpoint connection +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the static site. +// privateEndpointConnectionName - name of the private endpoint connection. +func (client StaticSitesClient) GetPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string) (result RemotePrivateEndpointConnectionARMResource, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.List") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetPrivateEndpointConnection") defer func() { sc := -1 - if result.ssc.Response.Response != nil { - sc = result.ssc.Response.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "List", nil, "Failure preparing request") - return + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "GetPrivateEndpointConnection", err.Error()) } - resp, err := client.ListSender(req) + req, err := client.GetPrivateEndpointConnectionPreparer(ctx, resourceGroupName, name, privateEndpointConnectionName) if err != nil { - result.ssc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "List", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetPrivateEndpointConnection", nil, "Failure preparing request") return } - result.ssc, err = client.ListResponder(resp) + resp, err := client.GetPrivateEndpointConnectionSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "List", resp, "Failure responding to request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetPrivateEndpointConnection", resp, "Failure sending request") return } - if result.ssc.hasNextLink() && result.ssc.IsEmpty() { - err = result.NextWithContext(ctx) + + result, err = client.GetPrivateEndpointConnectionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetPrivateEndpointConnection", resp, "Failure responding to request") return } return } -// ListPreparer prepares the List request. -func (client StaticSitesClient) ListPreparer(ctx context.Context) (*http.Request, error) { +// GetPrivateEndpointConnectionPreparer prepares the GetPrivateEndpointConnection request. +func (client StaticSitesClient) GetPrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2917,20 +3543,20 @@ func (client StaticSitesClient) ListPreparer(ctx context.Context) (*http.Request preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListSender sends the List request. The method will close the +// GetPrivateEndpointConnectionSender sends the GetPrivateEndpointConnection request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) ListSender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) GetPrivateEndpointConnectionSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListResponder handles the response to the List request. The method always +// GetPrivateEndpointConnectionResponder handles the response to the GetPrivateEndpointConnection request. The method always // closes the http.Response Body. -func (client StaticSitesClient) ListResponder(resp *http.Response) (result StaticSiteCollection, err error) { +func (client StaticSitesClient) GetPrivateEndpointConnectionResponder(resp *http.Response) (result RemotePrivateEndpointConnectionARMResource, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -2940,54 +3566,18 @@ func (client StaticSitesClient) ListResponder(resp *http.Response) (result Stati return } -// listNextResults retrieves the next set of results, if any. -func (client StaticSitesClient) listNextResults(ctx context.Context, lastResults StaticSiteCollection) (result StaticSiteCollection, err error) { - req, err := lastResults.staticSiteCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client StaticSitesClient) ListComplete(ctx context.Context) (result StaticSiteCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx) - return -} - -// ListStaticSiteAppSettings description for Gets the application settings of a static site. +// GetPrivateEndpointConnectionList description for Gets the list of private endpoint connections associated with a +// static site // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the static site. -func (client StaticSitesClient) ListStaticSiteAppSettings(ctx context.Context, resourceGroupName string, name string) (result StringDictionary, err error) { +func (client StaticSitesClient) GetPrivateEndpointConnectionList(ctx context.Context, resourceGroupName string, name string) (result PrivateEndpointConnectionCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteAppSettings") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetPrivateEndpointConnectionList") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.pecc.Response.Response != nil { + sc = result.pecc.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -2997,61 +3587,66 @@ func (client StaticSitesClient) ListStaticSiteAppSettings(ctx context.Context, r Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "ListStaticSiteAppSettings", err.Error()) + return result, validation.NewError("web.StaticSitesClient", "GetPrivateEndpointConnectionList", err.Error()) } - req, err := client.ListStaticSiteAppSettingsPreparer(ctx, resourceGroupName, name) + result.fn = client.getPrivateEndpointConnectionListNextResults + req, err := client.GetPrivateEndpointConnectionListPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteAppSettings", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetPrivateEndpointConnectionList", nil, "Failure preparing request") return } - resp, err := client.ListStaticSiteAppSettingsSender(req) + resp, err := client.GetPrivateEndpointConnectionListSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteAppSettings", resp, "Failure sending request") + result.pecc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetPrivateEndpointConnectionList", resp, "Failure sending request") return } - result, err = client.ListStaticSiteAppSettingsResponder(resp) + result.pecc, err = client.GetPrivateEndpointConnectionListResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteAppSettings", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetPrivateEndpointConnectionList", resp, "Failure responding to request") + return + } + if result.pecc.hasNextLink() && result.pecc.IsEmpty() { + err = result.NextWithContext(ctx) return } return } -// ListStaticSiteAppSettingsPreparer prepares the ListStaticSiteAppSettings request. -func (client StaticSitesClient) ListStaticSiteAppSettingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetPrivateEndpointConnectionListPreparer prepares the GetPrivateEndpointConnectionList request. +func (client StaticSitesClient) GetPrivateEndpointConnectionListPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListStaticSiteAppSettingsSender sends the ListStaticSiteAppSettings request. The method will close the +// GetPrivateEndpointConnectionListSender sends the GetPrivateEndpointConnectionList request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) ListStaticSiteAppSettingsSender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) GetPrivateEndpointConnectionListSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListStaticSiteAppSettingsResponder handles the response to the ListStaticSiteAppSettings request. The method always +// GetPrivateEndpointConnectionListResponder handles the response to the GetPrivateEndpointConnectionList request. The method always // closes the http.Response Body. -func (client StaticSitesClient) ListStaticSiteAppSettingsResponder(resp *http.Response) (result StringDictionary, err error) { +func (client StaticSitesClient) GetPrivateEndpointConnectionListResponder(resp *http.Response) (result PrivateEndpointConnectionCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -3061,14 +3656,50 @@ func (client StaticSitesClient) ListStaticSiteAppSettingsResponder(resp *http.Re return } -// ListStaticSiteBuildAppSettings description for Gets the application settings of a static site build. +// getPrivateEndpointConnectionListNextResults retrieves the next set of results, if any. +func (client StaticSitesClient) getPrivateEndpointConnectionListNextResults(ctx context.Context, lastResults PrivateEndpointConnectionCollection) (result PrivateEndpointConnectionCollection, err error) { + req, err := lastResults.privateEndpointConnectionCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getPrivateEndpointConnectionListNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.GetPrivateEndpointConnectionListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getPrivateEndpointConnectionListNextResults", resp, "Failure sending next results request") + } + result, err = client.GetPrivateEndpointConnectionListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "getPrivateEndpointConnectionListNextResults", resp, "Failure responding to next results request") + } + return +} + +// GetPrivateEndpointConnectionListComplete enumerates all values, automatically crossing page boundaries as required. +func (client StaticSitesClient) GetPrivateEndpointConnectionListComplete(ctx context.Context, resourceGroupName string, name string) (result PrivateEndpointConnectionCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetPrivateEndpointConnectionList") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.GetPrivateEndpointConnectionList(ctx, resourceGroupName, name) + return +} + +// GetPrivateLinkResources description for Gets the private link resources // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the static site. -// environmentName - the stage site identifier. -func (client StaticSitesClient) ListStaticSiteBuildAppSettings(ctx context.Context, resourceGroupName string, name string, environmentName string) (result StringDictionary, err error) { +// name - name of the site. +func (client StaticSitesClient) GetPrivateLinkResources(ctx context.Context, resourceGroupName string, name string) (result PrivateLinkResourcesWrapper, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteBuildAppSettings") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetPrivateLinkResources") defer func() { sc := -1 if result.Response.Response != nil { @@ -3082,62 +3713,61 @@ func (client StaticSitesClient) ListStaticSiteBuildAppSettings(ctx context.Conte Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "ListStaticSiteBuildAppSettings", err.Error()) + return result, validation.NewError("web.StaticSitesClient", "GetPrivateLinkResources", err.Error()) } - req, err := client.ListStaticSiteBuildAppSettingsPreparer(ctx, resourceGroupName, name, environmentName) + req, err := client.GetPrivateLinkResourcesPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteBuildAppSettings", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetPrivateLinkResources", nil, "Failure preparing request") return } - resp, err := client.ListStaticSiteBuildAppSettingsSender(req) + resp, err := client.GetPrivateLinkResourcesSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteBuildAppSettings", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetPrivateLinkResources", resp, "Failure sending request") return } - result, err = client.ListStaticSiteBuildAppSettingsResponder(resp) + result, err = client.GetPrivateLinkResourcesResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteBuildAppSettings", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetPrivateLinkResources", resp, "Failure responding to request") return } return } -// ListStaticSiteBuildAppSettingsPreparer prepares the ListStaticSiteBuildAppSettings request. -func (client StaticSitesClient) ListStaticSiteBuildAppSettingsPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string) (*http.Request, error) { +// GetPrivateLinkResourcesPreparer prepares the GetPrivateLinkResources request. +func (client StaticSitesClient) GetPrivateLinkResourcesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "environmentName": autorest.Encode("path", environmentName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListStaticSiteBuildAppSettingsSender sends the ListStaticSiteBuildAppSettings request. The method will close the +// GetPrivateLinkResourcesSender sends the GetPrivateLinkResources request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) ListStaticSiteBuildAppSettingsSender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) GetPrivateLinkResourcesSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListStaticSiteBuildAppSettingsResponder handles the response to the ListStaticSiteBuildAppSettings request. The method always +// GetPrivateLinkResourcesResponder handles the response to the GetPrivateLinkResources request. The method always // closes the http.Response Body. -func (client StaticSitesClient) ListStaticSiteBuildAppSettingsResponder(resp *http.Response) (result StringDictionary, err error) { +func (client StaticSitesClient) GetPrivateLinkResourcesResponder(resp *http.Response) (result PrivateLinkResourcesWrapper, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -3147,14 +3777,13 @@ func (client StaticSitesClient) ListStaticSiteBuildAppSettingsResponder(resp *ht return } -// ListStaticSiteBuildFunctionAppSettings description for Gets the application settings of a static site build. +// GetStaticSite description for Gets the details of a static site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the static site. -// environmentName - the stage site identifier. -func (client StaticSitesClient) ListStaticSiteBuildFunctionAppSettings(ctx context.Context, resourceGroupName string, name string, environmentName string) (result StringDictionary, err error) { +func (client StaticSitesClient) GetStaticSite(ctx context.Context, resourceGroupName string, name string) (result StaticSiteARMResource, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteBuildFunctionAppSettings") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetStaticSite") defer func() { sc := -1 if result.Response.Response != nil { @@ -3168,62 +3797,61 @@ func (client StaticSitesClient) ListStaticSiteBuildFunctionAppSettings(ctx conte Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "ListStaticSiteBuildFunctionAppSettings", err.Error()) + return result, validation.NewError("web.StaticSitesClient", "GetStaticSite", err.Error()) } - req, err := client.ListStaticSiteBuildFunctionAppSettingsPreparer(ctx, resourceGroupName, name, environmentName) + req, err := client.GetStaticSitePreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteBuildFunctionAppSettings", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSite", nil, "Failure preparing request") return } - resp, err := client.ListStaticSiteBuildFunctionAppSettingsSender(req) + resp, err := client.GetStaticSiteSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteBuildFunctionAppSettings", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSite", resp, "Failure sending request") return } - result, err = client.ListStaticSiteBuildFunctionAppSettingsResponder(resp) + result, err = client.GetStaticSiteResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteBuildFunctionAppSettings", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSite", resp, "Failure responding to request") return } return } -// ListStaticSiteBuildFunctionAppSettingsPreparer prepares the ListStaticSiteBuildFunctionAppSettings request. -func (client StaticSitesClient) ListStaticSiteBuildFunctionAppSettingsPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string) (*http.Request, error) { +// GetStaticSitePreparer prepares the GetStaticSite request. +func (client StaticSitesClient) GetStaticSitePreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "environmentName": autorest.Encode("path", environmentName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListStaticSiteBuildFunctionAppSettingsSender sends the ListStaticSiteBuildFunctionAppSettings request. The method will close the +// GetStaticSiteSender sends the GetStaticSite request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) ListStaticSiteBuildFunctionAppSettingsSender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) GetStaticSiteSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListStaticSiteBuildFunctionAppSettingsResponder handles the response to the ListStaticSiteBuildFunctionAppSettings request. The method always +// GetStaticSiteResponder handles the response to the GetStaticSite request. The method always // closes the http.Response Body. -func (client StaticSitesClient) ListStaticSiteBuildFunctionAppSettingsResponder(resp *http.Response) (result StringDictionary, err error) { +func (client StaticSitesClient) GetStaticSiteResponder(resp *http.Response) (result StaticSiteARMResource, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -3233,18 +3861,18 @@ func (client StaticSitesClient) ListStaticSiteBuildFunctionAppSettingsResponder( return } -// ListStaticSiteBuildFunctions description for Gets the functions of a particular static site build. +// GetStaticSiteBuild description for Gets the details of a static site build. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the static site. // environmentName - the stage site identifier. -func (client StaticSitesClient) ListStaticSiteBuildFunctions(ctx context.Context, resourceGroupName string, name string, environmentName string) (result StaticSiteFunctionOverviewCollectionPage, err error) { +func (client StaticSitesClient) GetStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string) (result StaticSiteBuildARMResource, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteBuildFunctions") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetStaticSiteBuild") defer func() { sc := -1 - if result.ssfoc.Response.Response != nil { - sc = result.ssfoc.Response.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3254,29 +3882,114 @@ func (client StaticSitesClient) ListStaticSiteBuildFunctions(ctx context.Context Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "ListStaticSiteBuildFunctions", err.Error()) + return result, validation.NewError("web.StaticSitesClient", "GetStaticSiteBuild", err.Error()) } - result.fn = client.listStaticSiteBuildFunctionsNextResults - req, err := client.ListStaticSiteBuildFunctionsPreparer(ctx, resourceGroupName, name, environmentName) + req, err := client.GetStaticSiteBuildPreparer(ctx, resourceGroupName, name, environmentName) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteBuildFunctions", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSiteBuild", nil, "Failure preparing request") return } - resp, err := client.ListStaticSiteBuildFunctionsSender(req) + resp, err := client.GetStaticSiteBuildSender(req) if err != nil { - result.ssfoc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteBuildFunctions", resp, "Failure sending request") - return + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSiteBuild", resp, "Failure sending request") + return } - result.ssfoc, err = client.ListStaticSiteBuildFunctionsResponder(resp) + result, err = client.GetStaticSiteBuildResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteBuildFunctions", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSiteBuild", resp, "Failure responding to request") return } - if result.ssfoc.hasNextLink() && result.ssfoc.IsEmpty() { + + return +} + +// GetStaticSiteBuildPreparer prepares the GetStaticSiteBuild request. +func (client StaticSitesClient) GetStaticSiteBuildPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "environmentName": autorest.Encode("path", environmentName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetStaticSiteBuildSender sends the GetStaticSiteBuild request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) GetStaticSiteBuildSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetStaticSiteBuildResponder handles the response to the GetStaticSiteBuild request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) GetStaticSiteBuildResponder(resp *http.Response) (result StaticSiteBuildARMResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetStaticSiteBuilds description for Gets all static site builds for a particular static site. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the static site. +func (client StaticSitesClient) GetStaticSiteBuilds(ctx context.Context, resourceGroupName string, name string) (result StaticSiteBuildCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetStaticSiteBuilds") + defer func() { + sc := -1 + if result.ssbc.Response.Response != nil { + sc = result.ssbc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "GetStaticSiteBuilds", err.Error()) + } + + result.fn = client.getStaticSiteBuildsNextResults + req, err := client.GetStaticSiteBuildsPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSiteBuilds", nil, "Failure preparing request") + return + } + + resp, err := client.GetStaticSiteBuildsSender(req) + if err != nil { + result.ssbc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSiteBuilds", resp, "Failure sending request") + return + } + + result.ssbc, err = client.GetStaticSiteBuildsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSiteBuilds", resp, "Failure responding to request") + return + } + if result.ssbc.hasNextLink() && result.ssbc.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -3284,16 +3997,15 @@ func (client StaticSitesClient) ListStaticSiteBuildFunctions(ctx context.Context return } -// ListStaticSiteBuildFunctionsPreparer prepares the ListStaticSiteBuildFunctions request. -func (client StaticSitesClient) ListStaticSiteBuildFunctionsPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string) (*http.Request, error) { +// GetStaticSiteBuildsPreparer prepares the GetStaticSiteBuilds request. +func (client StaticSitesClient) GetStaticSiteBuildsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "environmentName": autorest.Encode("path", environmentName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -3301,20 +4013,20 @@ func (client StaticSitesClient) ListStaticSiteBuildFunctionsPreparer(ctx context preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListStaticSiteBuildFunctionsSender sends the ListStaticSiteBuildFunctions request. The method will close the +// GetStaticSiteBuildsSender sends the GetStaticSiteBuilds request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) ListStaticSiteBuildFunctionsSender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) GetStaticSiteBuildsSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListStaticSiteBuildFunctionsResponder handles the response to the ListStaticSiteBuildFunctions request. The method always +// GetStaticSiteBuildsResponder handles the response to the GetStaticSiteBuilds request. The method always // closes the http.Response Body. -func (client StaticSitesClient) ListStaticSiteBuildFunctionsResponder(resp *http.Response) (result StaticSiteFunctionOverviewCollection, err error) { +func (client StaticSitesClient) GetStaticSiteBuildsResponder(resp *http.Response) (result StaticSiteBuildCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -3324,31 +4036,31 @@ func (client StaticSitesClient) ListStaticSiteBuildFunctionsResponder(resp *http return } -// listStaticSiteBuildFunctionsNextResults retrieves the next set of results, if any. -func (client StaticSitesClient) listStaticSiteBuildFunctionsNextResults(ctx context.Context, lastResults StaticSiteFunctionOverviewCollection) (result StaticSiteFunctionOverviewCollection, err error) { - req, err := lastResults.staticSiteFunctionOverviewCollectionPreparer(ctx) +// getStaticSiteBuildsNextResults retrieves the next set of results, if any. +func (client StaticSitesClient) getStaticSiteBuildsNextResults(ctx context.Context, lastResults StaticSiteBuildCollection) (result StaticSiteBuildCollection, err error) { + req, err := lastResults.staticSiteBuildCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteBuildFunctionsNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getStaticSiteBuildsNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListStaticSiteBuildFunctionsSender(req) + resp, err := client.GetStaticSiteBuildsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteBuildFunctionsNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getStaticSiteBuildsNextResults", resp, "Failure sending next results request") } - result, err = client.ListStaticSiteBuildFunctionsResponder(resp) + result, err = client.GetStaticSiteBuildsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteBuildFunctionsNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "getStaticSiteBuildsNextResults", resp, "Failure responding to next results request") } return } -// ListStaticSiteBuildFunctionsComplete enumerates all values, automatically crossing page boundaries as required. -func (client StaticSitesClient) ListStaticSiteBuildFunctionsComplete(ctx context.Context, resourceGroupName string, name string, environmentName string) (result StaticSiteFunctionOverviewCollectionIterator, err error) { +// GetStaticSiteBuildsComplete enumerates all values, automatically crossing page boundaries as required. +func (client StaticSitesClient) GetStaticSiteBuildsComplete(ctx context.Context, resourceGroupName string, name string) (result StaticSiteBuildCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteBuildFunctions") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetStaticSiteBuilds") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -3357,17 +4069,18 @@ func (client StaticSitesClient) ListStaticSiteBuildFunctionsComplete(ctx context tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListStaticSiteBuildFunctions(ctx, resourceGroupName, name, environmentName) + result.page, err = client.GetStaticSiteBuilds(ctx, resourceGroupName, name) return } -// ListStaticSiteConfiguredRoles description for Lists the roles configured for the static site. +// GetStaticSiteCustomDomain description for Gets an existing custom domain for a particular static site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the static site. -func (client StaticSitesClient) ListStaticSiteConfiguredRoles(ctx context.Context, resourceGroupName string, name string) (result StringList, err error) { +// name - name of the static site resource to search in. +// domainName - the custom domain name. +func (client StaticSitesClient) GetStaticSiteCustomDomain(ctx context.Context, resourceGroupName string, name string, domainName string) (result StaticSiteCustomDomainOverviewARMResource, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteConfiguredRoles") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetStaticSiteCustomDomain") defer func() { sc := -1 if result.Response.Response != nil { @@ -3381,61 +4094,62 @@ func (client StaticSitesClient) ListStaticSiteConfiguredRoles(ctx context.Contex Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "ListStaticSiteConfiguredRoles", err.Error()) + return result, validation.NewError("web.StaticSitesClient", "GetStaticSiteCustomDomain", err.Error()) } - req, err := client.ListStaticSiteConfiguredRolesPreparer(ctx, resourceGroupName, name) + req, err := client.GetStaticSiteCustomDomainPreparer(ctx, resourceGroupName, name, domainName) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteConfiguredRoles", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSiteCustomDomain", nil, "Failure preparing request") return } - resp, err := client.ListStaticSiteConfiguredRolesSender(req) + resp, err := client.GetStaticSiteCustomDomainSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteConfiguredRoles", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSiteCustomDomain", resp, "Failure sending request") return } - result, err = client.ListStaticSiteConfiguredRolesResponder(resp) + result, err = client.GetStaticSiteCustomDomainResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteConfiguredRoles", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSiteCustomDomain", resp, "Failure responding to request") return } return } -// ListStaticSiteConfiguredRolesPreparer prepares the ListStaticSiteConfiguredRoles request. -func (client StaticSitesClient) ListStaticSiteConfiguredRolesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetStaticSiteCustomDomainPreparer prepares the GetStaticSiteCustomDomain request. +func (client StaticSitesClient) GetStaticSiteCustomDomainPreparer(ctx context.Context, resourceGroupName string, name string, domainName string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "domainName": autorest.Encode("path", domainName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListStaticSiteConfiguredRolesSender sends the ListStaticSiteConfiguredRoles request. The method will close the +// GetStaticSiteCustomDomainSender sends the GetStaticSiteCustomDomain request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) ListStaticSiteConfiguredRolesSender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) GetStaticSiteCustomDomainSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListStaticSiteConfiguredRolesResponder handles the response to the ListStaticSiteConfiguredRoles request. The method always +// GetStaticSiteCustomDomainResponder handles the response to the GetStaticSiteCustomDomain request. The method always // closes the http.Response Body. -func (client StaticSitesClient) ListStaticSiteConfiguredRolesResponder(resp *http.Response) (result StringList, err error) { +func (client StaticSitesClient) GetStaticSiteCustomDomainResponder(resp *http.Response) (result StaticSiteCustomDomainOverviewARMResource, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -3445,17 +4159,16 @@ func (client StaticSitesClient) ListStaticSiteConfiguredRolesResponder(resp *htt return } -// ListStaticSiteCustomDomains description for Gets all static site custom domains for a particular static site. +// GetStaticSitesByResourceGroup description for Gets all static sites in the specified resource group. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the static site resource to search in. -func (client StaticSitesClient) ListStaticSiteCustomDomains(ctx context.Context, resourceGroupName string, name string) (result StaticSiteCustomDomainOverviewCollectionPage, err error) { +func (client StaticSitesClient) GetStaticSitesByResourceGroup(ctx context.Context, resourceGroupName string) (result StaticSiteCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteCustomDomains") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetStaticSitesByResourceGroup") defer func() { sc := -1 - if result.sscdoc.Response.Response != nil { - sc = result.sscdoc.Response.Response.StatusCode + if result.ssc.Response.Response != nil { + sc = result.ssc.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3465,29 +4178,29 @@ func (client StaticSitesClient) ListStaticSiteCustomDomains(ctx context.Context, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "ListStaticSiteCustomDomains", err.Error()) + return result, validation.NewError("web.StaticSitesClient", "GetStaticSitesByResourceGroup", err.Error()) } - result.fn = client.listStaticSiteCustomDomainsNextResults - req, err := client.ListStaticSiteCustomDomainsPreparer(ctx, resourceGroupName, name) + result.fn = client.getStaticSitesByResourceGroupNextResults + req, err := client.GetStaticSitesByResourceGroupPreparer(ctx, resourceGroupName) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteCustomDomains", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSitesByResourceGroup", nil, "Failure preparing request") return } - resp, err := client.ListStaticSiteCustomDomainsSender(req) + resp, err := client.GetStaticSitesByResourceGroupSender(req) if err != nil { - result.sscdoc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteCustomDomains", resp, "Failure sending request") + result.ssc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSitesByResourceGroup", resp, "Failure sending request") return } - result.sscdoc, err = client.ListStaticSiteCustomDomainsResponder(resp) + result.ssc, err = client.GetStaticSitesByResourceGroupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteCustomDomains", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetStaticSitesByResourceGroup", resp, "Failure responding to request") return } - if result.sscdoc.hasNextLink() && result.sscdoc.IsEmpty() { + if result.ssc.hasNextLink() && result.ssc.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -3495,15 +4208,14 @@ func (client StaticSitesClient) ListStaticSiteCustomDomains(ctx context.Context, return } -// ListStaticSiteCustomDomainsPreparer prepares the ListStaticSiteCustomDomains request. -func (client StaticSitesClient) ListStaticSiteCustomDomainsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetStaticSitesByResourceGroupPreparer prepares the GetStaticSitesByResourceGroup request. +func (client StaticSitesClient) GetStaticSitesByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -3511,20 +4223,20 @@ func (client StaticSitesClient) ListStaticSiteCustomDomainsPreparer(ctx context. preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListStaticSiteCustomDomainsSender sends the ListStaticSiteCustomDomains request. The method will close the +// GetStaticSitesByResourceGroupSender sends the GetStaticSitesByResourceGroup request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) ListStaticSiteCustomDomainsSender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) GetStaticSitesByResourceGroupSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListStaticSiteCustomDomainsResponder handles the response to the ListStaticSiteCustomDomains request. The method always +// GetStaticSitesByResourceGroupResponder handles the response to the GetStaticSitesByResourceGroup request. The method always // closes the http.Response Body. -func (client StaticSitesClient) ListStaticSiteCustomDomainsResponder(resp *http.Response) (result StaticSiteCustomDomainOverviewCollection, err error) { +func (client StaticSitesClient) GetStaticSitesByResourceGroupResponder(resp *http.Response) (result StaticSiteCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -3534,31 +4246,31 @@ func (client StaticSitesClient) ListStaticSiteCustomDomainsResponder(resp *http. return } -// listStaticSiteCustomDomainsNextResults retrieves the next set of results, if any. -func (client StaticSitesClient) listStaticSiteCustomDomainsNextResults(ctx context.Context, lastResults StaticSiteCustomDomainOverviewCollection) (result StaticSiteCustomDomainOverviewCollection, err error) { - req, err := lastResults.staticSiteCustomDomainOverviewCollectionPreparer(ctx) +// getStaticSitesByResourceGroupNextResults retrieves the next set of results, if any. +func (client StaticSitesClient) getStaticSitesByResourceGroupNextResults(ctx context.Context, lastResults StaticSiteCollection) (result StaticSiteCollection, err error) { + req, err := lastResults.staticSiteCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteCustomDomainsNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getStaticSitesByResourceGroupNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListStaticSiteCustomDomainsSender(req) + resp, err := client.GetStaticSitesByResourceGroupSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteCustomDomainsNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getStaticSitesByResourceGroupNextResults", resp, "Failure sending next results request") } - result, err = client.ListStaticSiteCustomDomainsResponder(resp) + result, err = client.GetStaticSitesByResourceGroupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteCustomDomainsNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "getStaticSitesByResourceGroupNextResults", resp, "Failure responding to next results request") } return } -// ListStaticSiteCustomDomainsComplete enumerates all values, automatically crossing page boundaries as required. -func (client StaticSitesClient) ListStaticSiteCustomDomainsComplete(ctx context.Context, resourceGroupName string, name string) (result StaticSiteCustomDomainOverviewCollectionIterator, err error) { +// GetStaticSitesByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client StaticSitesClient) GetStaticSitesByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result StaticSiteCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteCustomDomains") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetStaticSitesByResourceGroup") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -3567,17 +4279,19 @@ func (client StaticSitesClient) ListStaticSiteCustomDomainsComplete(ctx context. tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListStaticSiteCustomDomains(ctx, resourceGroupName, name) + result.page, err = client.GetStaticSitesByResourceGroup(ctx, resourceGroupName) return } -// ListStaticSiteFunctionAppSettings description for Gets the application settings of a static site. +// GetUserProvidedFunctionAppForStaticSite description for Gets the details of the user provided function app +// registered with a static site // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the static site. -func (client StaticSitesClient) ListStaticSiteFunctionAppSettings(ctx context.Context, resourceGroupName string, name string) (result StringDictionary, err error) { +// functionAppName - name of the function app registered with the static site. +func (client StaticSitesClient) GetUserProvidedFunctionAppForStaticSite(ctx context.Context, resourceGroupName string, name string, functionAppName string) (result StaticSiteUserProvidedFunctionAppARMResource, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteFunctionAppSettings") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetUserProvidedFunctionAppForStaticSite") defer func() { sc := -1 if result.Response.Response != nil { @@ -3591,61 +4305,62 @@ func (client StaticSitesClient) ListStaticSiteFunctionAppSettings(ctx context.Co Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "ListStaticSiteFunctionAppSettings", err.Error()) + return result, validation.NewError("web.StaticSitesClient", "GetUserProvidedFunctionAppForStaticSite", err.Error()) } - req, err := client.ListStaticSiteFunctionAppSettingsPreparer(ctx, resourceGroupName, name) + req, err := client.GetUserProvidedFunctionAppForStaticSitePreparer(ctx, resourceGroupName, name, functionAppName) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteFunctionAppSettings", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppForStaticSite", nil, "Failure preparing request") return } - resp, err := client.ListStaticSiteFunctionAppSettingsSender(req) + resp, err := client.GetUserProvidedFunctionAppForStaticSiteSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteFunctionAppSettings", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppForStaticSite", resp, "Failure sending request") return } - result, err = client.ListStaticSiteFunctionAppSettingsResponder(resp) + result, err = client.GetUserProvidedFunctionAppForStaticSiteResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteFunctionAppSettings", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppForStaticSite", resp, "Failure responding to request") return } return } -// ListStaticSiteFunctionAppSettingsPreparer prepares the ListStaticSiteFunctionAppSettings request. -func (client StaticSitesClient) ListStaticSiteFunctionAppSettingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetUserProvidedFunctionAppForStaticSitePreparer prepares the GetUserProvidedFunctionAppForStaticSite request. +func (client StaticSitesClient) GetUserProvidedFunctionAppForStaticSitePreparer(ctx context.Context, resourceGroupName string, name string, functionAppName string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "functionAppName": autorest.Encode("path", functionAppName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListStaticSiteFunctionAppSettingsSender sends the ListStaticSiteFunctionAppSettings request. The method will close the +// GetUserProvidedFunctionAppForStaticSiteSender sends the GetUserProvidedFunctionAppForStaticSite request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) ListStaticSiteFunctionAppSettingsSender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) GetUserProvidedFunctionAppForStaticSiteSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListStaticSiteFunctionAppSettingsResponder handles the response to the ListStaticSiteFunctionAppSettings request. The method always +// GetUserProvidedFunctionAppForStaticSiteResponder handles the response to the GetUserProvidedFunctionAppForStaticSite request. The method always // closes the http.Response Body. -func (client StaticSitesClient) ListStaticSiteFunctionAppSettingsResponder(resp *http.Response) (result StringDictionary, err error) { +func (client StaticSitesClient) GetUserProvidedFunctionAppForStaticSiteResponder(resp *http.Response) (result StaticSiteUserProvidedFunctionAppARMResource, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -3655,17 +4370,20 @@ func (client StaticSitesClient) ListStaticSiteFunctionAppSettingsResponder(resp return } -// ListStaticSiteFunctions description for Gets the functions of a static site. +// GetUserProvidedFunctionAppForStaticSiteBuild description for Gets the details of the user provided function app +// registered with a static site build // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the static site. -func (client StaticSitesClient) ListStaticSiteFunctions(ctx context.Context, resourceGroupName string, name string) (result StaticSiteFunctionOverviewCollectionPage, err error) { +// environmentName - the stage site identifier. +// functionAppName - name of the function app registered with the static site build. +func (client StaticSitesClient) GetUserProvidedFunctionAppForStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string) (result StaticSiteUserProvidedFunctionAppARMResource, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteFunctions") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetUserProvidedFunctionAppForStaticSiteBuild") defer func() { sc := -1 - if result.ssfoc.Response.Response != nil { - sc = result.ssfoc.Response.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3675,45 +4393,42 @@ func (client StaticSitesClient) ListStaticSiteFunctions(ctx context.Context, res Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "ListStaticSiteFunctions", err.Error()) + return result, validation.NewError("web.StaticSitesClient", "GetUserProvidedFunctionAppForStaticSiteBuild", err.Error()) } - result.fn = client.listStaticSiteFunctionsNextResults - req, err := client.ListStaticSiteFunctionsPreparer(ctx, resourceGroupName, name) + req, err := client.GetUserProvidedFunctionAppForStaticSiteBuildPreparer(ctx, resourceGroupName, name, environmentName, functionAppName) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteFunctions", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppForStaticSiteBuild", nil, "Failure preparing request") return } - resp, err := client.ListStaticSiteFunctionsSender(req) + resp, err := client.GetUserProvidedFunctionAppForStaticSiteBuildSender(req) if err != nil { - result.ssfoc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteFunctions", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppForStaticSiteBuild", resp, "Failure sending request") return } - result.ssfoc, err = client.ListStaticSiteFunctionsResponder(resp) + result, err = client.GetUserProvidedFunctionAppForStaticSiteBuildResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteFunctions", resp, "Failure responding to request") - return - } - if result.ssfoc.hasNextLink() && result.ssfoc.IsEmpty() { - err = result.NextWithContext(ctx) + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppForStaticSiteBuild", resp, "Failure responding to request") return } return } -// ListStaticSiteFunctionsPreparer prepares the ListStaticSiteFunctions request. -func (client StaticSitesClient) ListStaticSiteFunctionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetUserProvidedFunctionAppForStaticSiteBuildPreparer prepares the GetUserProvidedFunctionAppForStaticSiteBuild request. +func (client StaticSitesClient) GetUserProvidedFunctionAppForStaticSiteBuildPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "environmentName": autorest.Encode("path", environmentName), + "functionAppName": autorest.Encode("path", functionAppName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -3721,20 +4436,20 @@ func (client StaticSitesClient) ListStaticSiteFunctionsPreparer(ctx context.Cont preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListStaticSiteFunctionsSender sends the ListStaticSiteFunctions request. The method will close the +// GetUserProvidedFunctionAppForStaticSiteBuildSender sends the GetUserProvidedFunctionAppForStaticSiteBuild request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) ListStaticSiteFunctionsSender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) GetUserProvidedFunctionAppForStaticSiteBuildSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListStaticSiteFunctionsResponder handles the response to the ListStaticSiteFunctions request. The method always +// GetUserProvidedFunctionAppForStaticSiteBuildResponder handles the response to the GetUserProvidedFunctionAppForStaticSiteBuild request. The method always // closes the http.Response Body. -func (client StaticSitesClient) ListStaticSiteFunctionsResponder(resp *http.Response) (result StaticSiteFunctionOverviewCollection, err error) { +func (client StaticSitesClient) GetUserProvidedFunctionAppForStaticSiteBuildResponder(resp *http.Response) (result StaticSiteUserProvidedFunctionAppARMResource, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -3744,54 +4459,18 @@ func (client StaticSitesClient) ListStaticSiteFunctionsResponder(resp *http.Resp return } -// listStaticSiteFunctionsNextResults retrieves the next set of results, if any. -func (client StaticSitesClient) listStaticSiteFunctionsNextResults(ctx context.Context, lastResults StaticSiteFunctionOverviewCollection) (result StaticSiteFunctionOverviewCollection, err error) { - req, err := lastResults.staticSiteFunctionOverviewCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteFunctionsNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListStaticSiteFunctionsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteFunctionsNextResults", resp, "Failure sending next results request") - } - result, err = client.ListStaticSiteFunctionsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteFunctionsNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListStaticSiteFunctionsComplete enumerates all values, automatically crossing page boundaries as required. -func (client StaticSitesClient) ListStaticSiteFunctionsComplete(ctx context.Context, resourceGroupName string, name string) (result StaticSiteFunctionOverviewCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteFunctions") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListStaticSiteFunctions(ctx, resourceGroupName, name) - return -} - -// ListStaticSiteSecrets description for Lists the secrets for an existing static site. +// GetUserProvidedFunctionAppsForStaticSite description for Gets the details of the user provided function apps +// registered with a static site // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the static site. -func (client StaticSitesClient) ListStaticSiteSecrets(ctx context.Context, resourceGroupName string, name string) (result StringDictionary, err error) { +func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSite(ctx context.Context, resourceGroupName string, name string) (result StaticSiteUserProvidedFunctionAppsCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteSecrets") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetUserProvidedFunctionAppsForStaticSite") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.ssupfac.Response.Response != nil { + sc = result.ssupfac.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3801,61 +4480,66 @@ func (client StaticSitesClient) ListStaticSiteSecrets(ctx context.Context, resou Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "ListStaticSiteSecrets", err.Error()) + return result, validation.NewError("web.StaticSitesClient", "GetUserProvidedFunctionAppsForStaticSite", err.Error()) } - req, err := client.ListStaticSiteSecretsPreparer(ctx, resourceGroupName, name) + result.fn = client.getUserProvidedFunctionAppsForStaticSiteNextResults + req, err := client.GetUserProvidedFunctionAppsForStaticSitePreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteSecrets", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppsForStaticSite", nil, "Failure preparing request") return } - resp, err := client.ListStaticSiteSecretsSender(req) + resp, err := client.GetUserProvidedFunctionAppsForStaticSiteSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteSecrets", resp, "Failure sending request") + result.ssupfac.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppsForStaticSite", resp, "Failure sending request") return } - result, err = client.ListStaticSiteSecretsResponder(resp) + result.ssupfac, err = client.GetUserProvidedFunctionAppsForStaticSiteResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteSecrets", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppsForStaticSite", resp, "Failure responding to request") + return + } + if result.ssupfac.hasNextLink() && result.ssupfac.IsEmpty() { + err = result.NextWithContext(ctx) return } return } -// ListStaticSiteSecretsPreparer prepares the ListStaticSiteSecrets request. -func (client StaticSitesClient) ListStaticSiteSecretsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetUserProvidedFunctionAppsForStaticSitePreparer prepares the GetUserProvidedFunctionAppsForStaticSite request. +func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSitePreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListStaticSiteSecretsSender sends the ListStaticSiteSecrets request. The method will close the +// GetUserProvidedFunctionAppsForStaticSiteSender sends the GetUserProvidedFunctionAppsForStaticSite request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) ListStaticSiteSecretsSender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListStaticSiteSecretsResponder handles the response to the ListStaticSiteSecrets request. The method always +// GetUserProvidedFunctionAppsForStaticSiteResponder handles the response to the GetUserProvidedFunctionAppsForStaticSite request. The method always // closes the http.Response Body. -func (client StaticSitesClient) ListStaticSiteSecretsResponder(resp *http.Response) (result StringDictionary, err error) { +func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteResponder(resp *http.Response) (result StaticSiteUserProvidedFunctionAppsCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -3865,18 +4549,56 @@ func (client StaticSitesClient) ListStaticSiteSecretsResponder(resp *http.Respon return } -// ListStaticSiteUsers description for Gets the list of users of a static site. +// getUserProvidedFunctionAppsForStaticSiteNextResults retrieves the next set of results, if any. +func (client StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteNextResults(ctx context.Context, lastResults StaticSiteUserProvidedFunctionAppsCollection) (result StaticSiteUserProvidedFunctionAppsCollection, err error) { + req, err := lastResults.staticSiteUserProvidedFunctionAppsCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getUserProvidedFunctionAppsForStaticSiteNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.GetUserProvidedFunctionAppsForStaticSiteSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getUserProvidedFunctionAppsForStaticSiteNextResults", resp, "Failure sending next results request") + } + result, err = client.GetUserProvidedFunctionAppsForStaticSiteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "getUserProvidedFunctionAppsForStaticSiteNextResults", resp, "Failure responding to next results request") + } + return +} + +// GetUserProvidedFunctionAppsForStaticSiteComplete enumerates all values, automatically crossing page boundaries as required. +func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteComplete(ctx context.Context, resourceGroupName string, name string) (result StaticSiteUserProvidedFunctionAppsCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetUserProvidedFunctionAppsForStaticSite") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.GetUserProvidedFunctionAppsForStaticSite(ctx, resourceGroupName, name) + return +} + +// GetUserProvidedFunctionAppsForStaticSiteBuild description for Gets the details of the user provided function apps +// registered with a static site build // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the static site. -// authprovider - the auth provider for the users. -func (client StaticSitesClient) ListStaticSiteUsers(ctx context.Context, resourceGroupName string, name string, authprovider string) (result StaticSiteUserCollectionPage, err error) { +// environmentName - the stage site identifier. +func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string) (result StaticSiteUserProvidedFunctionAppsCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteUsers") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetUserProvidedFunctionAppsForStaticSiteBuild") defer func() { sc := -1 - if result.ssuc.Response.Response != nil { - sc = result.ssuc.Response.Response.StatusCode + if result.ssupfac.Response.Response != nil { + sc = result.ssupfac.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3886,29 +4608,29 @@ func (client StaticSitesClient) ListStaticSiteUsers(ctx context.Context, resourc Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "ListStaticSiteUsers", err.Error()) + return result, validation.NewError("web.StaticSitesClient", "GetUserProvidedFunctionAppsForStaticSiteBuild", err.Error()) } - result.fn = client.listStaticSiteUsersNextResults - req, err := client.ListStaticSiteUsersPreparer(ctx, resourceGroupName, name, authprovider) + result.fn = client.getUserProvidedFunctionAppsForStaticSiteBuildNextResults + req, err := client.GetUserProvidedFunctionAppsForStaticSiteBuildPreparer(ctx, resourceGroupName, name, environmentName) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteUsers", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppsForStaticSiteBuild", nil, "Failure preparing request") return } - resp, err := client.ListStaticSiteUsersSender(req) + resp, err := client.GetUserProvidedFunctionAppsForStaticSiteBuildSender(req) if err != nil { - result.ssuc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteUsers", resp, "Failure sending request") + result.ssupfac.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppsForStaticSiteBuild", resp, "Failure sending request") return } - result.ssuc, err = client.ListStaticSiteUsersResponder(resp) + result.ssupfac, err = client.GetUserProvidedFunctionAppsForStaticSiteBuildResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteUsers", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "GetUserProvidedFunctionAppsForStaticSiteBuild", resp, "Failure responding to request") return } - if result.ssuc.hasNextLink() && result.ssuc.IsEmpty() { + if result.ssupfac.hasNextLink() && result.ssupfac.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -3916,37 +4638,37 @@ func (client StaticSitesClient) ListStaticSiteUsers(ctx context.Context, resourc return } -// ListStaticSiteUsersPreparer prepares the ListStaticSiteUsers request. -func (client StaticSitesClient) ListStaticSiteUsersPreparer(ctx context.Context, resourceGroupName string, name string, authprovider string) (*http.Request, error) { +// GetUserProvidedFunctionAppsForStaticSiteBuildPreparer prepares the GetUserProvidedFunctionAppsForStaticSiteBuild request. +func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteBuildPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "authprovider": autorest.Encode("path", authprovider), + "environmentName": autorest.Encode("path", environmentName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListStaticSiteUsersSender sends the ListStaticSiteUsers request. The method will close the +// GetUserProvidedFunctionAppsForStaticSiteBuildSender sends the GetUserProvidedFunctionAppsForStaticSiteBuild request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) ListStaticSiteUsersSender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteBuildSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListStaticSiteUsersResponder handles the response to the ListStaticSiteUsers request. The method always +// GetUserProvidedFunctionAppsForStaticSiteBuildResponder handles the response to the GetUserProvidedFunctionAppsForStaticSiteBuild request. The method always // closes the http.Response Body. -func (client StaticSitesClient) ListStaticSiteUsersResponder(resp *http.Response) (result StaticSiteUserCollection, err error) { +func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteBuildResponder(resp *http.Response) (result StaticSiteUserProvidedFunctionAppsCollection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -3956,31 +4678,31 @@ func (client StaticSitesClient) ListStaticSiteUsersResponder(resp *http.Response return } -// listStaticSiteUsersNextResults retrieves the next set of results, if any. -func (client StaticSitesClient) listStaticSiteUsersNextResults(ctx context.Context, lastResults StaticSiteUserCollection) (result StaticSiteUserCollection, err error) { - req, err := lastResults.staticSiteUserCollectionPreparer(ctx) +// getUserProvidedFunctionAppsForStaticSiteBuildNextResults retrieves the next set of results, if any. +func (client StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteBuildNextResults(ctx context.Context, lastResults StaticSiteUserProvidedFunctionAppsCollection) (result StaticSiteUserProvidedFunctionAppsCollection, err error) { + req, err := lastResults.staticSiteUserProvidedFunctionAppsCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteUsersNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getUserProvidedFunctionAppsForStaticSiteBuildNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListStaticSiteUsersSender(req) + resp, err := client.GetUserProvidedFunctionAppsForStaticSiteBuildSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteUsersNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "getUserProvidedFunctionAppsForStaticSiteBuildNextResults", resp, "Failure sending next results request") } - result, err = client.ListStaticSiteUsersResponder(resp) + result, err = client.GetUserProvidedFunctionAppsForStaticSiteBuildResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteUsersNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "getUserProvidedFunctionAppsForStaticSiteBuildNextResults", resp, "Failure responding to next results request") } return } -// ListStaticSiteUsersComplete enumerates all values, automatically crossing page boundaries as required. -func (client StaticSitesClient) ListStaticSiteUsersComplete(ctx context.Context, resourceGroupName string, name string, authprovider string) (result StaticSiteUserCollectionIterator, err error) { +// GetUserProvidedFunctionAppsForStaticSiteBuildComplete enumerates all values, automatically crossing page boundaries as required. +func (client StaticSitesClient) GetUserProvidedFunctionAppsForStaticSiteBuildComplete(ctx context.Context, resourceGroupName string, name string, environmentName string) (result StaticSiteUserProvidedFunctionAppsCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteUsers") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.GetUserProvidedFunctionAppsForStaticSiteBuild") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -3989,79 +4711,93 @@ func (client StaticSitesClient) ListStaticSiteUsersComplete(ctx context.Context, tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListStaticSiteUsers(ctx, resourceGroupName, name, authprovider) + result.page, err = client.GetUserProvidedFunctionAppsForStaticSiteBuild(ctx, resourceGroupName, name, environmentName) return } -// PreviewWorkflow description for Generates a preview workflow file for the static site +// LinkBackend sends the link backend request. // Parameters: -// location - location where you plan to create the static site. -// staticSitesWorkflowPreviewRequest - a JSON representation of the StaticSitesWorkflowPreviewRequest -// properties. See example. -func (client StaticSitesClient) PreviewWorkflow(ctx context.Context, location string, staticSitesWorkflowPreviewRequest StaticSitesWorkflowPreviewRequest) (result StaticSitesWorkflowPreview, err error) { +// 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 +func (client StaticSitesClient) LinkBackend(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource) (result StaticSitesLinkBackendFuture, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.PreviewWorkflow") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.LinkBackend") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() } - req, err := client.PreviewWorkflowPreparer(ctx, location, staticSitesWorkflowPreviewRequest) - if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "PreviewWorkflow", nil, "Failure preparing request") - return + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "LinkBackend", err.Error()) } - resp, err := client.PreviewWorkflowSender(req) + req, err := client.LinkBackendPreparer(ctx, resourceGroupName, name, linkedBackendName, staticSiteLinkedBackendEnvelope) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "PreviewWorkflow", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "LinkBackend", nil, "Failure preparing request") return } - result, err = client.PreviewWorkflowResponder(resp) + result, err = client.LinkBackendSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "PreviewWorkflow", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "LinkBackend", result.Response(), "Failure sending request") return } return } -// PreviewWorkflowPreparer prepares the PreviewWorkflow request. -func (client StaticSitesClient) PreviewWorkflowPreparer(ctx context.Context, location string, staticSitesWorkflowPreviewRequest StaticSitesWorkflowPreviewRequest) (*http.Request, error) { +// LinkBackendPreparer prepares the LinkBackend request. +func (client StaticSitesClient) LinkBackendPreparer(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource) (*http.Request, error) { pathParameters := map[string]interface{}{ - "location": autorest.Encode("path", location), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "linkedBackendName": autorest.Encode("path", linkedBackendName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), + autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile", pathParameters), - autorest.WithJSON(staticSitesWorkflowPreviewRequest), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName}", pathParameters), + autorest.WithJSON(staticSiteLinkedBackendEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// PreviewWorkflowSender sends the PreviewWorkflow request. The method will close the +// LinkBackendSender sends the LinkBackend request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) PreviewWorkflowSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +func (client StaticSitesClient) LinkBackendSender(req *http.Request) (future StaticSitesLinkBackendFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return } -// PreviewWorkflowResponder handles the response to the PreviewWorkflow request. The method always +// LinkBackendResponder handles the response to the LinkBackend request. The method always // closes the http.Response Body. -func (client StaticSitesClient) PreviewWorkflowResponder(resp *http.Response) (result StaticSitesWorkflowPreview, err error) { +func (client StaticSitesClient) LinkBackendResponder(resp *http.Response) (result StaticSiteLinkedBackendARMResource, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -4071,20 +4807,16 @@ func (client StaticSitesClient) PreviewWorkflowResponder(resp *http.Response) (r return } -// RegisterUserProvidedFunctionAppWithStaticSite description for Register a user provided function app with a static -// site +// LinkBackendToBuild sends the link backend to build request. // Parameters: // 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. -// staticSiteUserProvidedFunctionEnvelope - a JSON representation of the user provided function app properties. -// See example. -// isForced - specify true to force the update of the auth configuration on the function app even -// if an AzureStaticWebApps provider is already configured on the function app. The default is -// false. -func (client StaticSitesClient) RegisterUserProvidedFunctionAppWithStaticSite(ctx context.Context, resourceGroupName string, name string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, isForced *bool) (result StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteFuture, err error) { +// 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 +func (client StaticSitesClient) LinkBackendToBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource) (result StaticSitesLinkBackendToBuildFuture, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.RegisterUserProvidedFunctionAppWithStaticSite") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.LinkBackendToBuild") defer func() { sc := -1 if result.FutureAPI != nil && result.FutureAPI.Response() != nil { @@ -4098,98 +4830,1891 @@ func (client StaticSitesClient) RegisterUserProvidedFunctionAppWithStaticSite(ct Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "RegisterUserProvidedFunctionAppWithStaticSite", err.Error()) + return result, validation.NewError("web.StaticSitesClient", "LinkBackendToBuild", err.Error()) } - req, err := client.RegisterUserProvidedFunctionAppWithStaticSitePreparer(ctx, resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced) + req, err := client.LinkBackendToBuildPreparer(ctx, resourceGroupName, name, environmentName, linkedBackendName, staticSiteLinkedBackendEnvelope) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "RegisterUserProvidedFunctionAppWithStaticSite", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "LinkBackendToBuild", nil, "Failure preparing request") return } - result, err = client.RegisterUserProvidedFunctionAppWithStaticSiteSender(req) + result, err = client.LinkBackendToBuildSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "RegisterUserProvidedFunctionAppWithStaticSite", result.Response(), "Failure sending request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "LinkBackendToBuild", result.Response(), "Failure sending request") return } return } -// RegisterUserProvidedFunctionAppWithStaticSitePreparer prepares the RegisterUserProvidedFunctionAppWithStaticSite request. -func (client StaticSitesClient) RegisterUserProvidedFunctionAppWithStaticSitePreparer(ctx context.Context, resourceGroupName string, name string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, isForced *bool) (*http.Request, error) { +// LinkBackendToBuildPreparer prepares the LinkBackendToBuild request. +func (client StaticSitesClient) LinkBackendToBuildPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource) (*http.Request, error) { pathParameters := map[string]interface{}{ - "functionAppName": autorest.Encode("path", functionAppName), + "environmentName": autorest.Encode("path", environmentName), + "linkedBackendName": autorest.Encode("path", linkedBackendName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } - if isForced != nil { - queryParameters["isForced"] = autorest.Encode("query", *isForced) - } preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}", pathParameters), - autorest.WithJSON(staticSiteUserProvidedFunctionEnvelope), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName}", pathParameters), + autorest.WithJSON(staticSiteLinkedBackendEnvelope), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// LinkBackendToBuildSender sends the LinkBackendToBuild request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) LinkBackendToBuildSender(req *http.Request) (future StaticSitesLinkBackendToBuildFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// LinkBackendToBuildResponder handles the response to the LinkBackendToBuild request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) LinkBackendToBuildResponder(resp *http.Response) (result StaticSiteLinkedBackendARMResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List description for Get all Static Sites for a subscription. +func (client StaticSitesClient) List(ctx context.Context) (result StaticSiteCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.List") + defer func() { + sc := -1 + if result.ssc.Response.Response != nil { + sc = result.ssc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.ssc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "List", resp, "Failure sending request") + return + } + + result.ssc, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "List", resp, "Failure responding to request") + return + } + if result.ssc.hasNextLink() && result.ssc.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client StaticSitesClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) ListResponder(resp *http.Response) (result StaticSiteCollection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client StaticSitesClient) listNextResults(ctx context.Context, lastResults StaticSiteCollection) (result StaticSiteCollection, err error) { + req, err := lastResults.staticSiteCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client StaticSitesClient) ListComplete(ctx context.Context) (result StaticSiteCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} + +// ListBasicAuth description for Gets the basic auth properties for a static site as a collection. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the static site. +func (client StaticSitesClient) ListBasicAuth(ctx context.Context, resourceGroupName string, name string) (result StaticSiteBasicAuthPropertiesCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListBasicAuth") + defer func() { + sc := -1 + if result.ssbapc.Response.Response != nil { + sc = result.ssbapc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "ListBasicAuth", err.Error()) + } + + result.fn = client.listBasicAuthNextResults + req, err := client.ListBasicAuthPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListBasicAuth", nil, "Failure preparing request") + return + } + + resp, err := client.ListBasicAuthSender(req) + if err != nil { + result.ssbapc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListBasicAuth", resp, "Failure sending request") + return + } + + result.ssbapc, err = client.ListBasicAuthResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListBasicAuth", resp, "Failure responding to request") + return + } + if result.ssbapc.hasNextLink() && result.ssbapc.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListBasicAuthPreparer prepares the ListBasicAuth request. +func (client StaticSitesClient) ListBasicAuthPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBasicAuthSender sends the ListBasicAuth request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) ListBasicAuthSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListBasicAuthResponder handles the response to the ListBasicAuth request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) ListBasicAuthResponder(resp *http.Response) (result StaticSiteBasicAuthPropertiesCollection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listBasicAuthNextResults retrieves the next set of results, if any. +func (client StaticSitesClient) listBasicAuthNextResults(ctx context.Context, lastResults StaticSiteBasicAuthPropertiesCollection) (result StaticSiteBasicAuthPropertiesCollection, err error) { + req, err := lastResults.staticSiteBasicAuthPropertiesCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "listBasicAuthNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListBasicAuthSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "listBasicAuthNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBasicAuthResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "listBasicAuthNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBasicAuthComplete enumerates all values, automatically crossing page boundaries as required. +func (client StaticSitesClient) ListBasicAuthComplete(ctx context.Context, resourceGroupName string, name string) (result StaticSiteBasicAuthPropertiesCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListBasicAuth") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListBasicAuth(ctx, resourceGroupName, name) + return +} + +// ListStaticSiteAppSettings description for Gets the application settings of a static site. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the static site. +func (client StaticSitesClient) ListStaticSiteAppSettings(ctx context.Context, resourceGroupName string, name string) (result StringDictionary, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteAppSettings") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "ListStaticSiteAppSettings", err.Error()) + } + + req, err := client.ListStaticSiteAppSettingsPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteAppSettings", nil, "Failure preparing request") + return + } + + resp, err := client.ListStaticSiteAppSettingsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteAppSettings", resp, "Failure sending request") + return + } + + result, err = client.ListStaticSiteAppSettingsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteAppSettings", resp, "Failure responding to request") + return + } + + return +} + +// ListStaticSiteAppSettingsPreparer prepares the ListStaticSiteAppSettings request. +func (client StaticSitesClient) ListStaticSiteAppSettingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListStaticSiteAppSettingsSender sends the ListStaticSiteAppSettings request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) ListStaticSiteAppSettingsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListStaticSiteAppSettingsResponder handles the response to the ListStaticSiteAppSettings request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) ListStaticSiteAppSettingsResponder(resp *http.Response) (result StringDictionary, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListStaticSiteBuildAppSettings description for Gets the application settings of a static site build. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the static site. +// environmentName - the stage site identifier. +func (client StaticSitesClient) ListStaticSiteBuildAppSettings(ctx context.Context, resourceGroupName string, name string, environmentName string) (result StringDictionary, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteBuildAppSettings") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "ListStaticSiteBuildAppSettings", err.Error()) + } + + req, err := client.ListStaticSiteBuildAppSettingsPreparer(ctx, resourceGroupName, name, environmentName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteBuildAppSettings", nil, "Failure preparing request") + return + } + + resp, err := client.ListStaticSiteBuildAppSettingsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteBuildAppSettings", resp, "Failure sending request") + return + } + + result, err = client.ListStaticSiteBuildAppSettingsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteBuildAppSettings", resp, "Failure responding to request") + return + } + + return +} + +// ListStaticSiteBuildAppSettingsPreparer prepares the ListStaticSiteBuildAppSettings request. +func (client StaticSitesClient) ListStaticSiteBuildAppSettingsPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "environmentName": autorest.Encode("path", environmentName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListStaticSiteBuildAppSettingsSender sends the ListStaticSiteBuildAppSettings request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) ListStaticSiteBuildAppSettingsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListStaticSiteBuildAppSettingsResponder handles the response to the ListStaticSiteBuildAppSettings request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) ListStaticSiteBuildAppSettingsResponder(resp *http.Response) (result StringDictionary, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListStaticSiteBuildFunctionAppSettings description for Gets the application settings of a static site build. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the static site. +// environmentName - the stage site identifier. +func (client StaticSitesClient) ListStaticSiteBuildFunctionAppSettings(ctx context.Context, resourceGroupName string, name string, environmentName string) (result StringDictionary, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteBuildFunctionAppSettings") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "ListStaticSiteBuildFunctionAppSettings", err.Error()) + } + + req, err := client.ListStaticSiteBuildFunctionAppSettingsPreparer(ctx, resourceGroupName, name, environmentName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteBuildFunctionAppSettings", nil, "Failure preparing request") + return + } + + resp, err := client.ListStaticSiteBuildFunctionAppSettingsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteBuildFunctionAppSettings", resp, "Failure sending request") + return + } + + result, err = client.ListStaticSiteBuildFunctionAppSettingsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteBuildFunctionAppSettings", resp, "Failure responding to request") + return + } + + return +} + +// ListStaticSiteBuildFunctionAppSettingsPreparer prepares the ListStaticSiteBuildFunctionAppSettings request. +func (client StaticSitesClient) ListStaticSiteBuildFunctionAppSettingsPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "environmentName": autorest.Encode("path", environmentName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListStaticSiteBuildFunctionAppSettingsSender sends the ListStaticSiteBuildFunctionAppSettings request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) ListStaticSiteBuildFunctionAppSettingsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListStaticSiteBuildFunctionAppSettingsResponder handles the response to the ListStaticSiteBuildFunctionAppSettings request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) ListStaticSiteBuildFunctionAppSettingsResponder(resp *http.Response) (result StringDictionary, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListStaticSiteBuildFunctions description for Gets the functions of a particular static site build. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the static site. +// environmentName - the stage site identifier. +func (client StaticSitesClient) ListStaticSiteBuildFunctions(ctx context.Context, resourceGroupName string, name string, environmentName string) (result StaticSiteFunctionOverviewCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteBuildFunctions") + defer func() { + sc := -1 + if result.ssfoc.Response.Response != nil { + sc = result.ssfoc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "ListStaticSiteBuildFunctions", err.Error()) + } + + result.fn = client.listStaticSiteBuildFunctionsNextResults + req, err := client.ListStaticSiteBuildFunctionsPreparer(ctx, resourceGroupName, name, environmentName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteBuildFunctions", nil, "Failure preparing request") + return + } + + resp, err := client.ListStaticSiteBuildFunctionsSender(req) + if err != nil { + result.ssfoc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteBuildFunctions", resp, "Failure sending request") + return + } + + result.ssfoc, err = client.ListStaticSiteBuildFunctionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteBuildFunctions", resp, "Failure responding to request") + return + } + if result.ssfoc.hasNextLink() && result.ssfoc.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListStaticSiteBuildFunctionsPreparer prepares the ListStaticSiteBuildFunctions request. +func (client StaticSitesClient) ListStaticSiteBuildFunctionsPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "environmentName": autorest.Encode("path", environmentName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListStaticSiteBuildFunctionsSender sends the ListStaticSiteBuildFunctions request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) ListStaticSiteBuildFunctionsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListStaticSiteBuildFunctionsResponder handles the response to the ListStaticSiteBuildFunctions request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) ListStaticSiteBuildFunctionsResponder(resp *http.Response) (result StaticSiteFunctionOverviewCollection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listStaticSiteBuildFunctionsNextResults retrieves the next set of results, if any. +func (client StaticSitesClient) listStaticSiteBuildFunctionsNextResults(ctx context.Context, lastResults StaticSiteFunctionOverviewCollection) (result StaticSiteFunctionOverviewCollection, err error) { + req, err := lastResults.staticSiteFunctionOverviewCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteBuildFunctionsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListStaticSiteBuildFunctionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteBuildFunctionsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListStaticSiteBuildFunctionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteBuildFunctionsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListStaticSiteBuildFunctionsComplete enumerates all values, automatically crossing page boundaries as required. +func (client StaticSitesClient) ListStaticSiteBuildFunctionsComplete(ctx context.Context, resourceGroupName string, name string, environmentName string) (result StaticSiteFunctionOverviewCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteBuildFunctions") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListStaticSiteBuildFunctions(ctx, resourceGroupName, name, environmentName) + return +} + +// ListStaticSiteConfiguredRoles description for Lists the roles configured for the static site. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the static site. +func (client StaticSitesClient) ListStaticSiteConfiguredRoles(ctx context.Context, resourceGroupName string, name string) (result StringList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteConfiguredRoles") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "ListStaticSiteConfiguredRoles", err.Error()) + } + + req, err := client.ListStaticSiteConfiguredRolesPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteConfiguredRoles", nil, "Failure preparing request") + return + } + + resp, err := client.ListStaticSiteConfiguredRolesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteConfiguredRoles", resp, "Failure sending request") + return + } + + result, err = client.ListStaticSiteConfiguredRolesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteConfiguredRoles", resp, "Failure responding to request") + return + } + + return +} + +// ListStaticSiteConfiguredRolesPreparer prepares the ListStaticSiteConfiguredRoles request. +func (client StaticSitesClient) ListStaticSiteConfiguredRolesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListStaticSiteConfiguredRolesSender sends the ListStaticSiteConfiguredRoles request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) ListStaticSiteConfiguredRolesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListStaticSiteConfiguredRolesResponder handles the response to the ListStaticSiteConfiguredRoles request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) ListStaticSiteConfiguredRolesResponder(resp *http.Response) (result StringList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListStaticSiteCustomDomains description for Gets all static site custom domains for a particular static site. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the static site resource to search in. +func (client StaticSitesClient) ListStaticSiteCustomDomains(ctx context.Context, resourceGroupName string, name string) (result StaticSiteCustomDomainOverviewCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteCustomDomains") + defer func() { + sc := -1 + if result.sscdoc.Response.Response != nil { + sc = result.sscdoc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "ListStaticSiteCustomDomains", err.Error()) + } + + result.fn = client.listStaticSiteCustomDomainsNextResults + req, err := client.ListStaticSiteCustomDomainsPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteCustomDomains", nil, "Failure preparing request") + return + } + + resp, err := client.ListStaticSiteCustomDomainsSender(req) + if err != nil { + result.sscdoc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteCustomDomains", resp, "Failure sending request") + return + } + + result.sscdoc, err = client.ListStaticSiteCustomDomainsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteCustomDomains", resp, "Failure responding to request") + return + } + if result.sscdoc.hasNextLink() && result.sscdoc.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListStaticSiteCustomDomainsPreparer prepares the ListStaticSiteCustomDomains request. +func (client StaticSitesClient) ListStaticSiteCustomDomainsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListStaticSiteCustomDomainsSender sends the ListStaticSiteCustomDomains request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) ListStaticSiteCustomDomainsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListStaticSiteCustomDomainsResponder handles the response to the ListStaticSiteCustomDomains request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) ListStaticSiteCustomDomainsResponder(resp *http.Response) (result StaticSiteCustomDomainOverviewCollection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listStaticSiteCustomDomainsNextResults retrieves the next set of results, if any. +func (client StaticSitesClient) listStaticSiteCustomDomainsNextResults(ctx context.Context, lastResults StaticSiteCustomDomainOverviewCollection) (result StaticSiteCustomDomainOverviewCollection, err error) { + req, err := lastResults.staticSiteCustomDomainOverviewCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteCustomDomainsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListStaticSiteCustomDomainsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteCustomDomainsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListStaticSiteCustomDomainsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteCustomDomainsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListStaticSiteCustomDomainsComplete enumerates all values, automatically crossing page boundaries as required. +func (client StaticSitesClient) ListStaticSiteCustomDomainsComplete(ctx context.Context, resourceGroupName string, name string) (result StaticSiteCustomDomainOverviewCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteCustomDomains") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListStaticSiteCustomDomains(ctx, resourceGroupName, name) + return +} + +// ListStaticSiteFunctionAppSettings description for Gets the application settings of a static site. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the static site. +func (client StaticSitesClient) ListStaticSiteFunctionAppSettings(ctx context.Context, resourceGroupName string, name string) (result StringDictionary, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteFunctionAppSettings") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "ListStaticSiteFunctionAppSettings", err.Error()) + } + + req, err := client.ListStaticSiteFunctionAppSettingsPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteFunctionAppSettings", nil, "Failure preparing request") + return + } + + resp, err := client.ListStaticSiteFunctionAppSettingsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteFunctionAppSettings", resp, "Failure sending request") + return + } + + result, err = client.ListStaticSiteFunctionAppSettingsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteFunctionAppSettings", resp, "Failure responding to request") + return + } + + return +} + +// ListStaticSiteFunctionAppSettingsPreparer prepares the ListStaticSiteFunctionAppSettings request. +func (client StaticSitesClient) ListStaticSiteFunctionAppSettingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListStaticSiteFunctionAppSettingsSender sends the ListStaticSiteFunctionAppSettings request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) ListStaticSiteFunctionAppSettingsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListStaticSiteFunctionAppSettingsResponder handles the response to the ListStaticSiteFunctionAppSettings request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) ListStaticSiteFunctionAppSettingsResponder(resp *http.Response) (result StringDictionary, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListStaticSiteFunctions description for Gets the functions of a static site. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the static site. +func (client StaticSitesClient) ListStaticSiteFunctions(ctx context.Context, resourceGroupName string, name string) (result StaticSiteFunctionOverviewCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteFunctions") + defer func() { + sc := -1 + if result.ssfoc.Response.Response != nil { + sc = result.ssfoc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "ListStaticSiteFunctions", err.Error()) + } + + result.fn = client.listStaticSiteFunctionsNextResults + req, err := client.ListStaticSiteFunctionsPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteFunctions", nil, "Failure preparing request") + return + } + + resp, err := client.ListStaticSiteFunctionsSender(req) + if err != nil { + result.ssfoc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteFunctions", resp, "Failure sending request") + return + } + + result.ssfoc, err = client.ListStaticSiteFunctionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteFunctions", resp, "Failure responding to request") + return + } + if result.ssfoc.hasNextLink() && result.ssfoc.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListStaticSiteFunctionsPreparer prepares the ListStaticSiteFunctions request. +func (client StaticSitesClient) ListStaticSiteFunctionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListStaticSiteFunctionsSender sends the ListStaticSiteFunctions request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) ListStaticSiteFunctionsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListStaticSiteFunctionsResponder handles the response to the ListStaticSiteFunctions request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) ListStaticSiteFunctionsResponder(resp *http.Response) (result StaticSiteFunctionOverviewCollection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listStaticSiteFunctionsNextResults retrieves the next set of results, if any. +func (client StaticSitesClient) listStaticSiteFunctionsNextResults(ctx context.Context, lastResults StaticSiteFunctionOverviewCollection) (result StaticSiteFunctionOverviewCollection, err error) { + req, err := lastResults.staticSiteFunctionOverviewCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteFunctionsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListStaticSiteFunctionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteFunctionsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListStaticSiteFunctionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteFunctionsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListStaticSiteFunctionsComplete enumerates all values, automatically crossing page boundaries as required. +func (client StaticSitesClient) ListStaticSiteFunctionsComplete(ctx context.Context, resourceGroupName string, name string) (result StaticSiteFunctionOverviewCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteFunctions") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListStaticSiteFunctions(ctx, resourceGroupName, name) + return +} + +// ListStaticSiteSecrets description for Lists the secrets for an existing static site. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the static site. +func (client StaticSitesClient) ListStaticSiteSecrets(ctx context.Context, resourceGroupName string, name string) (result StringDictionary, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteSecrets") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "ListStaticSiteSecrets", err.Error()) + } + + req, err := client.ListStaticSiteSecretsPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteSecrets", nil, "Failure preparing request") + return + } + + resp, err := client.ListStaticSiteSecretsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteSecrets", resp, "Failure sending request") + return + } + + result, err = client.ListStaticSiteSecretsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteSecrets", resp, "Failure responding to request") + return + } + + return +} + +// ListStaticSiteSecretsPreparer prepares the ListStaticSiteSecrets request. +func (client StaticSitesClient) ListStaticSiteSecretsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListStaticSiteSecretsSender sends the ListStaticSiteSecrets request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) ListStaticSiteSecretsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListStaticSiteSecretsResponder handles the response to the ListStaticSiteSecrets request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) ListStaticSiteSecretsResponder(resp *http.Response) (result StringDictionary, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListStaticSiteUsers description for Gets the list of users of a static site. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the static site. +// authprovider - the auth provider for the users. +func (client StaticSitesClient) ListStaticSiteUsers(ctx context.Context, resourceGroupName string, name string, authprovider string) (result StaticSiteUserCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteUsers") + defer func() { + sc := -1 + if result.ssuc.Response.Response != nil { + sc = result.ssuc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "ListStaticSiteUsers", err.Error()) + } + + result.fn = client.listStaticSiteUsersNextResults + req, err := client.ListStaticSiteUsersPreparer(ctx, resourceGroupName, name, authprovider) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteUsers", nil, "Failure preparing request") + return + } + + resp, err := client.ListStaticSiteUsersSender(req) + if err != nil { + result.ssuc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteUsers", resp, "Failure sending request") + return + } + + result.ssuc, err = client.ListStaticSiteUsersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ListStaticSiteUsers", resp, "Failure responding to request") + return + } + if result.ssuc.hasNextLink() && result.ssuc.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListStaticSiteUsersPreparer prepares the ListStaticSiteUsers request. +func (client StaticSitesClient) ListStaticSiteUsersPreparer(ctx context.Context, resourceGroupName string, name string, authprovider string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "authprovider": autorest.Encode("path", authprovider), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListStaticSiteUsersSender sends the ListStaticSiteUsers request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) ListStaticSiteUsersSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListStaticSiteUsersResponder handles the response to the ListStaticSiteUsers request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) ListStaticSiteUsersResponder(resp *http.Response) (result StaticSiteUserCollection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listStaticSiteUsersNextResults retrieves the next set of results, if any. +func (client StaticSitesClient) listStaticSiteUsersNextResults(ctx context.Context, lastResults StaticSiteUserCollection) (result StaticSiteUserCollection, err error) { + req, err := lastResults.staticSiteUserCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteUsersNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListStaticSiteUsersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteUsersNextResults", resp, "Failure sending next results request") + } + result, err = client.ListStaticSiteUsersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "listStaticSiteUsersNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListStaticSiteUsersComplete enumerates all values, automatically crossing page boundaries as required. +func (client StaticSitesClient) ListStaticSiteUsersComplete(ctx context.Context, resourceGroupName string, name string, authprovider string) (result StaticSiteUserCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ListStaticSiteUsers") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListStaticSiteUsers(ctx, resourceGroupName, name, authprovider) + return +} + +// PreviewWorkflow description for Generates a preview workflow file for the static site +// Parameters: +// location - location where you plan to create the static site. +// staticSitesWorkflowPreviewRequest - a JSON representation of the StaticSitesWorkflowPreviewRequest +// properties. See example. +func (client StaticSitesClient) PreviewWorkflow(ctx context.Context, location string, staticSitesWorkflowPreviewRequest StaticSitesWorkflowPreviewRequest) (result StaticSitesWorkflowPreview, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.PreviewWorkflow") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PreviewWorkflowPreparer(ctx, location, staticSitesWorkflowPreviewRequest) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "PreviewWorkflow", nil, "Failure preparing request") + return + } + + resp, err := client.PreviewWorkflowSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "PreviewWorkflow", resp, "Failure sending request") + return + } + + result, err = client.PreviewWorkflowResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "PreviewWorkflow", resp, "Failure responding to request") + return + } + + return +} + +// PreviewWorkflowPreparer prepares the PreviewWorkflow request. +func (client StaticSitesClient) PreviewWorkflowPreparer(ctx context.Context, location string, staticSitesWorkflowPreviewRequest StaticSitesWorkflowPreviewRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile", pathParameters), + autorest.WithJSON(staticSitesWorkflowPreviewRequest), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PreviewWorkflowSender sends the PreviewWorkflow request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) PreviewWorkflowSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// PreviewWorkflowResponder handles the response to the PreviewWorkflow request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) PreviewWorkflowResponder(resp *http.Response) (result StaticSitesWorkflowPreview, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// RegisterUserProvidedFunctionAppWithStaticSite description for Register a user provided function app with a static +// site +// Parameters: +// 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. +// staticSiteUserProvidedFunctionEnvelope - a JSON representation of the user provided function app properties. +// See example. +// isForced - specify true to force the update of the auth configuration on the function app even +// if an AzureStaticWebApps provider is already configured on the function app. The default is +// false. +func (client StaticSitesClient) RegisterUserProvidedFunctionAppWithStaticSite(ctx context.Context, resourceGroupName string, name string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, isForced *bool) (result StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.RegisterUserProvidedFunctionAppWithStaticSite") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "RegisterUserProvidedFunctionAppWithStaticSite", err.Error()) + } + + req, err := client.RegisterUserProvidedFunctionAppWithStaticSitePreparer(ctx, resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "RegisterUserProvidedFunctionAppWithStaticSite", nil, "Failure preparing request") + return + } + + result, err = client.RegisterUserProvidedFunctionAppWithStaticSiteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "RegisterUserProvidedFunctionAppWithStaticSite", result.Response(), "Failure sending request") + return + } + + return +} + +// RegisterUserProvidedFunctionAppWithStaticSitePreparer prepares the RegisterUserProvidedFunctionAppWithStaticSite request. +func (client StaticSitesClient) RegisterUserProvidedFunctionAppWithStaticSitePreparer(ctx context.Context, resourceGroupName string, name string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, isForced *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "functionAppName": autorest.Encode("path", functionAppName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if isForced != nil { + queryParameters["isForced"] = autorest.Encode("query", *isForced) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}", pathParameters), + autorest.WithJSON(staticSiteUserProvidedFunctionEnvelope), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RegisterUserProvidedFunctionAppWithStaticSiteSender sends the RegisterUserProvidedFunctionAppWithStaticSite request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) RegisterUserProvidedFunctionAppWithStaticSiteSender(req *http.Request) (future StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// RegisterUserProvidedFunctionAppWithStaticSiteResponder handles the response to the RegisterUserProvidedFunctionAppWithStaticSite request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) RegisterUserProvidedFunctionAppWithStaticSiteResponder(resp *http.Response) (result StaticSiteUserProvidedFunctionAppARMResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// RegisterUserProvidedFunctionAppWithStaticSiteBuild description for Register a user provided function app with a +// static site build +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the static site. +// environmentName - the stage site identifier. +// functionAppName - name of the function app to register with the static site build. +// staticSiteUserProvidedFunctionEnvelope - a JSON representation of the user provided function app properties. +// See example. +// isForced - specify true to force the update of the auth configuration on the function app even +// if an AzureStaticWebApps provider is already configured on the function app. The default is +// false. +func (client StaticSitesClient) RegisterUserProvidedFunctionAppWithStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, isForced *bool) (result StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.RegisterUserProvidedFunctionAppWithStaticSiteBuild") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "RegisterUserProvidedFunctionAppWithStaticSiteBuild", err.Error()) + } + + req, err := client.RegisterUserProvidedFunctionAppWithStaticSiteBuildPreparer(ctx, resourceGroupName, name, environmentName, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "RegisterUserProvidedFunctionAppWithStaticSiteBuild", nil, "Failure preparing request") + return + } + + result, err = client.RegisterUserProvidedFunctionAppWithStaticSiteBuildSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "RegisterUserProvidedFunctionAppWithStaticSiteBuild", result.Response(), "Failure sending request") + return + } + + return +} + +// RegisterUserProvidedFunctionAppWithStaticSiteBuildPreparer prepares the RegisterUserProvidedFunctionAppWithStaticSiteBuild request. +func (client StaticSitesClient) RegisterUserProvidedFunctionAppWithStaticSiteBuildPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, isForced *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "environmentName": autorest.Encode("path", environmentName), + "functionAppName": autorest.Encode("path", functionAppName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if isForced != nil { + queryParameters["isForced"] = autorest.Encode("query", *isForced) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}", pathParameters), + autorest.WithJSON(staticSiteUserProvidedFunctionEnvelope), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RegisterUserProvidedFunctionAppWithStaticSiteBuildSender sends the RegisterUserProvidedFunctionAppWithStaticSiteBuild request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) RegisterUserProvidedFunctionAppWithStaticSiteBuildSender(req *http.Request) (future StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// RegisterUserProvidedFunctionAppWithStaticSiteBuildResponder handles the response to the RegisterUserProvidedFunctionAppWithStaticSiteBuild request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) RegisterUserProvidedFunctionAppWithStaticSiteBuildResponder(resp *http.Response) (result StaticSiteUserProvidedFunctionAppARMResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ResetStaticSiteAPIKey description for Resets the api key for an existing static site. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the static site. +func (client StaticSitesClient) ResetStaticSiteAPIKey(ctx context.Context, resourceGroupName string, name string, resetPropertiesEnvelope StaticSiteResetPropertiesARMResource) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ResetStaticSiteAPIKey") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "ResetStaticSiteAPIKey", err.Error()) + } + + req, err := client.ResetStaticSiteAPIKeyPreparer(ctx, resourceGroupName, name, resetPropertiesEnvelope) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ResetStaticSiteAPIKey", nil, "Failure preparing request") + return + } + + resp, err := client.ResetStaticSiteAPIKeySender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ResetStaticSiteAPIKey", resp, "Failure sending request") + return + } + + result, err = client.ResetStaticSiteAPIKeyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ResetStaticSiteAPIKey", resp, "Failure responding to request") + return + } + + return +} + +// ResetStaticSiteAPIKeyPreparer prepares the ResetStaticSiteAPIKey request. +func (client StaticSitesClient) ResetStaticSiteAPIKeyPreparer(ctx context.Context, resourceGroupName string, name string, resetPropertiesEnvelope StaticSiteResetPropertiesARMResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey", pathParameters), + autorest.WithJSON(resetPropertiesEnvelope), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResetStaticSiteAPIKeySender sends the ResetStaticSiteAPIKey request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) ResetStaticSiteAPIKeySender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ResetStaticSiteAPIKeyResponder handles the response to the ResetStaticSiteAPIKey request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) ResetStaticSiteAPIKeyResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// UnlinkBackend sends the unlink backend request. +// Parameters: +// 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 +// isCleaningAuthConfig - decides if Easy Auth configuration will be removed from backend configuration +func (client StaticSitesClient) UnlinkBackend(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, isCleaningAuthConfig *bool) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.UnlinkBackend") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "UnlinkBackend", err.Error()) + } + + req, err := client.UnlinkBackendPreparer(ctx, resourceGroupName, name, linkedBackendName, isCleaningAuthConfig) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "UnlinkBackend", nil, "Failure preparing request") + return + } + + resp, err := client.UnlinkBackendSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "UnlinkBackend", resp, "Failure sending request") + return + } + + result, err = client.UnlinkBackendResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "UnlinkBackend", resp, "Failure responding to request") + return + } + + return +} + +// UnlinkBackendPreparer prepares the UnlinkBackend request. +func (client StaticSitesClient) UnlinkBackendPreparer(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, isCleaningAuthConfig *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "linkedBackendName": autorest.Encode("path", linkedBackendName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if isCleaningAuthConfig != nil { + queryParameters["isCleaningAuthConfig"] = autorest.Encode("query", *isCleaningAuthConfig) + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UnlinkBackendSender sends the UnlinkBackend request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) UnlinkBackendSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UnlinkBackendResponder handles the response to the UnlinkBackend request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) UnlinkBackendResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// UnlinkBackendFromBuild sends the unlink backend from build request. +// Parameters: +// 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 +// isCleaningAuthConfig - decides if auth will be removed from backend configuration +func (client StaticSitesClient) UnlinkBackendFromBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, isCleaningAuthConfig *bool) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.UnlinkBackendFromBuild") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "UnlinkBackendFromBuild", err.Error()) + } + + req, err := client.UnlinkBackendFromBuildPreparer(ctx, resourceGroupName, name, environmentName, linkedBackendName, isCleaningAuthConfig) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "UnlinkBackendFromBuild", nil, "Failure preparing request") + return + } + + resp, err := client.UnlinkBackendFromBuildSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "UnlinkBackendFromBuild", resp, "Failure sending request") + return + } + + result, err = client.UnlinkBackendFromBuildResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "UnlinkBackendFromBuild", resp, "Failure responding to request") + return + } + + return +} + +// UnlinkBackendFromBuildPreparer prepares the UnlinkBackendFromBuild request. +func (client StaticSitesClient) UnlinkBackendFromBuildPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, isCleaningAuthConfig *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "environmentName": autorest.Encode("path", environmentName), + "linkedBackendName": autorest.Encode("path", linkedBackendName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if isCleaningAuthConfig != nil { + queryParameters["isCleaningAuthConfig"] = autorest.Encode("query", *isCleaningAuthConfig) + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// RegisterUserProvidedFunctionAppWithStaticSiteSender sends the RegisterUserProvidedFunctionAppWithStaticSite request. The method will close the +// UnlinkBackendFromBuildSender sends the UnlinkBackendFromBuild request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) RegisterUserProvidedFunctionAppWithStaticSiteSender(req *http.Request) (future StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return +func (client StaticSitesClient) UnlinkBackendFromBuildSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// RegisterUserProvidedFunctionAppWithStaticSiteResponder handles the response to the RegisterUserProvidedFunctionAppWithStaticSite request. The method always +// UnlinkBackendFromBuildResponder handles the response to the UnlinkBackendFromBuild request. The method always // closes the http.Response Body. -func (client StaticSitesClient) RegisterUserProvidedFunctionAppWithStaticSiteResponder(resp *http.Response) (result StaticSiteUserProvidedFunctionAppARMResource, err error) { +func (client StaticSitesClient) UnlinkBackendFromBuildResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// RegisterUserProvidedFunctionAppWithStaticSiteBuild description for Register a user provided function app with a -// static site build +// UpdateBuildDatabaseConnection description for Create or update a database connection for a static site build // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the static site. +// name - name of the static site // environmentName - the stage site identifier. -// functionAppName - name of the function app to register with the static site build. -// staticSiteUserProvidedFunctionEnvelope - a JSON representation of the user provided function app properties. -// See example. -// isForced - specify true to force the update of the auth configuration on the function app even -// if an AzureStaticWebApps provider is already configured on the function app. The default is -// false. -func (client StaticSitesClient) RegisterUserProvidedFunctionAppWithStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, isForced *bool) (result StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildFuture, err error) { +// databaseConnectionName - name of the database connection. +// databaseConnectionRequestEnvelope - a JSON representation of the database connection request properties +func (client StaticSitesClient) UpdateBuildDatabaseConnection(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnectionPatchRequest) (result DatabaseConnection, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.RegisterUserProvidedFunctionAppWithStaticSiteBuild") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.UpdateBuildDatabaseConnection") defer func() { sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -4198,92 +6723,92 @@ func (client StaticSitesClient) RegisterUserProvidedFunctionAppWithStaticSiteBui {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "RegisterUserProvidedFunctionAppWithStaticSiteBuild", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: environmentName, + Constraints: []validation.Constraint{{Target: "environmentName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+$`, Chain: nil}}}, + {TargetValue: databaseConnectionName, + Constraints: []validation.Constraint{{Target: "databaseConnectionName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "UpdateBuildDatabaseConnection", err.Error()) } - req, err := client.RegisterUserProvidedFunctionAppWithStaticSiteBuildPreparer(ctx, resourceGroupName, name, environmentName, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced) + req, err := client.UpdateBuildDatabaseConnectionPreparer(ctx, resourceGroupName, name, environmentName, databaseConnectionName, databaseConnectionRequestEnvelope) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "RegisterUserProvidedFunctionAppWithStaticSiteBuild", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "UpdateBuildDatabaseConnection", nil, "Failure preparing request") return } - result, err = client.RegisterUserProvidedFunctionAppWithStaticSiteBuildSender(req) + resp, err := client.UpdateBuildDatabaseConnectionSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "RegisterUserProvidedFunctionAppWithStaticSiteBuild", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "UpdateBuildDatabaseConnection", resp, "Failure sending request") + return + } + + result, err = client.UpdateBuildDatabaseConnectionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "UpdateBuildDatabaseConnection", resp, "Failure responding to request") return } return } -// RegisterUserProvidedFunctionAppWithStaticSiteBuildPreparer prepares the RegisterUserProvidedFunctionAppWithStaticSiteBuild request. -func (client StaticSitesClient) RegisterUserProvidedFunctionAppWithStaticSiteBuildPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, isForced *bool) (*http.Request, error) { +// UpdateBuildDatabaseConnectionPreparer prepares the UpdateBuildDatabaseConnection request. +func (client StaticSitesClient) UpdateBuildDatabaseConnectionPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnectionPatchRequest) (*http.Request, error) { pathParameters := map[string]interface{}{ - "environmentName": autorest.Encode("path", environmentName), - "functionAppName": autorest.Encode("path", functionAppName), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "databaseConnectionName": autorest.Encode("path", databaseConnectionName), + "environmentName": autorest.Encode("path", environmentName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } - if isForced != nil { - queryParameters["isForced"] = autorest.Encode("query", *isForced) - } preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), + autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}", pathParameters), - autorest.WithJSON(staticSiteUserProvidedFunctionEnvelope), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}", pathParameters), + autorest.WithJSON(databaseConnectionRequestEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// RegisterUserProvidedFunctionAppWithStaticSiteBuildSender sends the RegisterUserProvidedFunctionAppWithStaticSiteBuild request. The method will close the +// UpdateBuildDatabaseConnectionSender sends the UpdateBuildDatabaseConnection request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) RegisterUserProvidedFunctionAppWithStaticSiteBuildSender(req *http.Request) (future StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return +func (client StaticSitesClient) UpdateBuildDatabaseConnectionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// RegisterUserProvidedFunctionAppWithStaticSiteBuildResponder handles the response to the RegisterUserProvidedFunctionAppWithStaticSiteBuild request. The method always +// UpdateBuildDatabaseConnectionResponder handles the response to the UpdateBuildDatabaseConnection request. The method always // closes the http.Response Body. -func (client StaticSitesClient) RegisterUserProvidedFunctionAppWithStaticSiteBuildResponder(resp *http.Response) (result StaticSiteUserProvidedFunctionAppARMResource, err error) { +func (client StaticSitesClient) UpdateBuildDatabaseConnectionResponder(resp *http.Response) (result DatabaseConnection, err error) { err = autorest.Respond( resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// ResetStaticSiteAPIKey description for Resets the api key for an existing static site. +// UpdateDatabaseConnection description for Create or update a database connection for a static site // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the static site. -func (client StaticSitesClient) ResetStaticSiteAPIKey(ctx context.Context, resourceGroupName string, name string, resetPropertiesEnvelope StaticSiteResetPropertiesARMResource) (result autorest.Response, err error) { +// name - name of the static site +// databaseConnectionName - name of the database connection. +// databaseConnectionRequestEnvelope - a JSON representation of the database connection request properties +func (client StaticSitesClient) UpdateDatabaseConnection(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnectionPatchRequest) (result DatabaseConnection, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ResetStaticSiteAPIKey") + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.UpdateDatabaseConnection") defer func() { sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -4292,69 +6817,73 @@ func (client StaticSitesClient) ResetStaticSiteAPIKey(ctx context.Context, resou {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.StaticSitesClient", "ResetStaticSiteAPIKey", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: databaseConnectionName, + Constraints: []validation.Constraint{{Target: "databaseConnectionName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "UpdateDatabaseConnection", err.Error()) } - req, err := client.ResetStaticSiteAPIKeyPreparer(ctx, resourceGroupName, name, resetPropertiesEnvelope) + req, err := client.UpdateDatabaseConnectionPreparer(ctx, resourceGroupName, name, databaseConnectionName, databaseConnectionRequestEnvelope) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ResetStaticSiteAPIKey", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "UpdateDatabaseConnection", nil, "Failure preparing request") return } - resp, err := client.ResetStaticSiteAPIKeySender(req) + resp, err := client.UpdateDatabaseConnectionSender(req) if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ResetStaticSiteAPIKey", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "UpdateDatabaseConnection", resp, "Failure sending request") return } - result, err = client.ResetStaticSiteAPIKeyResponder(resp) + result, err = client.UpdateDatabaseConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ResetStaticSiteAPIKey", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "UpdateDatabaseConnection", resp, "Failure responding to request") return } return } -// ResetStaticSiteAPIKeyPreparer prepares the ResetStaticSiteAPIKey request. -func (client StaticSitesClient) ResetStaticSiteAPIKeyPreparer(ctx context.Context, resourceGroupName string, name string, resetPropertiesEnvelope StaticSiteResetPropertiesARMResource) (*http.Request, error) { +// UpdateDatabaseConnectionPreparer prepares the UpdateDatabaseConnection request. +func (client StaticSitesClient) UpdateDatabaseConnectionPreparer(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnectionPatchRequest) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "databaseConnectionName": autorest.Encode("path", databaseConnectionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), + autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey", pathParameters), - autorest.WithJSON(resetPropertiesEnvelope), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}", pathParameters), + autorest.WithJSON(databaseConnectionRequestEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ResetStaticSiteAPIKeySender sends the ResetStaticSiteAPIKey request. The method will close the +// UpdateDatabaseConnectionSender sends the UpdateDatabaseConnection request. The method will close the // http.Response Body if it receives an error. -func (client StaticSitesClient) ResetStaticSiteAPIKeySender(req *http.Request) (*http.Response, error) { +func (client StaticSitesClient) UpdateDatabaseConnectionSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ResetStaticSiteAPIKeyResponder handles the response to the ResetStaticSiteAPIKey request. The method always +// UpdateDatabaseConnectionResponder handles the response to the UpdateDatabaseConnection request. The method always // closes the http.Response Body. -func (client StaticSitesClient) ResetStaticSiteAPIKeyResponder(resp *http.Response) (result autorest.Response, err error) { +func (client StaticSitesClient) UpdateDatabaseConnectionResponder(resp *http.Response) (result DatabaseConnection, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) - result.Response = resp + result.Response = autorest.Response{Response: resp} return } @@ -4413,7 +6942,7 @@ func (client StaticSitesClient) UpdateStaticSitePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -4504,7 +7033,7 @@ func (client StaticSitesClient) UpdateStaticSiteUserPreparer(ctx context.Context "userid": autorest.Encode("path", userid), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -4537,6 +7066,190 @@ func (client StaticSitesClient) UpdateStaticSiteUserResponder(resp *http.Respons return } +// ValidateBackend sends the validate backend request. +// Parameters: +// 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 +func (client StaticSitesClient) ValidateBackend(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource) (result StaticSitesValidateBackendFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ValidateBackend") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "ValidateBackend", err.Error()) + } + + req, err := client.ValidateBackendPreparer(ctx, resourceGroupName, name, linkedBackendName, staticSiteLinkedBackendEnvelope) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ValidateBackend", nil, "Failure preparing request") + return + } + + result, err = client.ValidateBackendSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ValidateBackend", result.Response(), "Failure sending request") + return + } + + return +} + +// ValidateBackendPreparer prepares the ValidateBackend request. +func (client StaticSitesClient) ValidateBackendPreparer(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "linkedBackendName": autorest.Encode("path", linkedBackendName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName}/validate", pathParameters), + autorest.WithJSON(staticSiteLinkedBackendEnvelope), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ValidateBackendSender sends the ValidateBackend request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) ValidateBackendSender(req *http.Request) (future StaticSitesValidateBackendFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ValidateBackendResponder handles the response to the ValidateBackend request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) ValidateBackendResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// ValidateBackendForBuild sends the validate backend for build request. +// Parameters: +// 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 +func (client StaticSitesClient) ValidateBackendForBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource) (result StaticSitesValidateBackendForBuildFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StaticSitesClient.ValidateBackendForBuild") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.StaticSitesClient", "ValidateBackendForBuild", err.Error()) + } + + req, err := client.ValidateBackendForBuildPreparer(ctx, resourceGroupName, name, environmentName, linkedBackendName, staticSiteLinkedBackendEnvelope) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ValidateBackendForBuild", nil, "Failure preparing request") + return + } + + result, err = client.ValidateBackendForBuildSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "web.StaticSitesClient", "ValidateBackendForBuild", result.Response(), "Failure sending request") + return + } + + return +} + +// ValidateBackendForBuildPreparer prepares the ValidateBackendForBuild request. +func (client StaticSitesClient) ValidateBackendForBuildPreparer(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "environmentName": autorest.Encode("path", environmentName), + "linkedBackendName": autorest.Encode("path", linkedBackendName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName}/validate", pathParameters), + autorest.WithJSON(staticSiteLinkedBackendEnvelope), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ValidateBackendForBuildSender sends the ValidateBackendForBuild request. The method will close the +// http.Response Body if it receives an error. +func (client StaticSitesClient) ValidateBackendForBuildSender(req *http.Request) (future StaticSitesValidateBackendForBuildFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ValidateBackendForBuildResponder handles the response to the ValidateBackendForBuild request. The method always +// closes the http.Response Body. +func (client StaticSitesClient) ValidateBackendForBuildResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + // ValidateCustomDomainCanBeAddedToStaticSite description for Validates a particular custom domain can be added to a // static site. // Parameters: @@ -4588,7 +7301,7 @@ func (client StaticSitesClient) ValidateCustomDomainCanBeAddedToStaticSitePrepar "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/topleveldomains.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/topleveldomains.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/topleveldomains.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/topleveldomains.go index 5572d05bb119..6b631ebfb182 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/topleveldomains.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/topleveldomains.go @@ -8,10 +8,11 @@ package web import ( "context" + "net/http" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/tracing" - "net/http" ) // TopLevelDomainsClient is the webSite Management Client @@ -73,7 +74,7 @@ func (client TopLevelDomainsClient) GetPreparer(ctx context.Context, name string "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -149,7 +150,7 @@ func (client TopLevelDomainsClient) ListPreparer(ctx context.Context) (*http.Req "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -266,7 +267,7 @@ func (client TopLevelDomainsClient) ListAgreementsPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2022-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/version.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/version.go similarity index 82% rename from vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/version.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/version.go index 9324c4eed99c..3bdc32e724cd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web/version.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/version.go @@ -1,6 +1,6 @@ package web -import "github.com/Azure/azure-sdk-for-go/version" +import "github.com/tombuildsstuff/kermit/version" // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. @@ -10,7 +10,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + Version() + " web/2021-03-01" + return "tombuildsstuff/kermit/" + Version() + " web/2022-09-01" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowrunactionrepetitions.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowrunactionrepetitions.go new file mode 100644 index 000000000000..0aeaaa65448b --- /dev/null +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowrunactionrepetitions.go @@ -0,0 +1,392 @@ +package web + +// 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. + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" +) + +// WorkflowRunActionRepetitionsClient is the webSite Management Client +type WorkflowRunActionRepetitionsClient struct { + BaseClient +} + +// NewWorkflowRunActionRepetitionsClient creates an instance of the WorkflowRunActionRepetitionsClient client. +func NewWorkflowRunActionRepetitionsClient(subscriptionID string) WorkflowRunActionRepetitionsClient { + return NewWorkflowRunActionRepetitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkflowRunActionRepetitionsClientWithBaseURI creates an instance of the WorkflowRunActionRepetitionsClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewWorkflowRunActionRepetitionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionRepetitionsClient { + return WorkflowRunActionRepetitionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get a workflow run action repetition. +// Parameters: +// 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. +func (client WorkflowRunActionRepetitionsClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string) (result WorkflowRunActionRepetitionDefinition, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRepetitionsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowRunActionRepetitionsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, name, workflowName, runName, actionName, repetitionName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client WorkflowRunActionRepetitionsClient) GetPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "actionName": autorest.Encode("path", actionName), + "name": autorest.Encode("path", name), + "repetitionName": autorest.Encode("path", repetitionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runName": autorest.Encode("path", runName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowRunActionRepetitionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WorkflowRunActionRepetitionsClient) GetResponder(resp *http.Response) (result WorkflowRunActionRepetitionDefinition, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get all of a workflow run action repetitions. +// Parameters: +// 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. +func (client WorkflowRunActionRepetitionsClient) List(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string) (result WorkflowRunActionRepetitionDefinitionCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRepetitionsClient.List") + defer func() { + sc := -1 + if result.wrardc.Response.Response != nil { + sc = result.wrardc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowRunActionRepetitionsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, name, workflowName, runName, actionName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.wrardc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsClient", "List", resp, "Failure sending request") + return + } + + result.wrardc, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsClient", "List", resp, "Failure responding to request") + return + } + if result.wrardc.hasNextLink() && result.wrardc.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client WorkflowRunActionRepetitionsClient) ListPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "actionName": autorest.Encode("path", actionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runName": autorest.Encode("path", runName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowRunActionRepetitionsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client WorkflowRunActionRepetitionsClient) ListResponder(resp *http.Response) (result WorkflowRunActionRepetitionDefinitionCollection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client WorkflowRunActionRepetitionsClient) listNextResults(ctx context.Context, lastResults WorkflowRunActionRepetitionDefinitionCollection) (result WorkflowRunActionRepetitionDefinitionCollection, err error) { + req, err := lastResults.workflowRunActionRepetitionDefinitionCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkflowRunActionRepetitionsClient) ListComplete(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string) (result WorkflowRunActionRepetitionDefinitionCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRepetitionsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName, name, workflowName, runName, actionName) + return +} + +// ListExpressionTraces lists a workflow run expression trace. +// Parameters: +// 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. +func (client WorkflowRunActionRepetitionsClient) ListExpressionTraces(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string) (result ExpressionTracesPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRepetitionsClient.ListExpressionTraces") + defer func() { + sc := -1 + if result.et.Response.Response != nil { + sc = result.et.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowRunActionRepetitionsClient", "ListExpressionTraces", err.Error()) + } + + result.fn = client.listExpressionTracesNextResults + req, err := client.ListExpressionTracesPreparer(ctx, resourceGroupName, name, workflowName, runName, actionName, repetitionName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsClient", "ListExpressionTraces", nil, "Failure preparing request") + return + } + + resp, err := client.ListExpressionTracesSender(req) + if err != nil { + result.et.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsClient", "ListExpressionTraces", resp, "Failure sending request") + return + } + + result.et, err = client.ListExpressionTracesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsClient", "ListExpressionTraces", resp, "Failure responding to request") + return + } + if result.et.hasNextLink() && result.et.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListExpressionTracesPreparer prepares the ListExpressionTraces request. +func (client WorkflowRunActionRepetitionsClient) ListExpressionTracesPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "actionName": autorest.Encode("path", actionName), + "name": autorest.Encode("path", name), + "repetitionName": autorest.Encode("path", repetitionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runName": autorest.Encode("path", runName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListExpressionTracesSender sends the ListExpressionTraces request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowRunActionRepetitionsClient) ListExpressionTracesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListExpressionTracesResponder handles the response to the ListExpressionTraces request. The method always +// closes the http.Response Body. +func (client WorkflowRunActionRepetitionsClient) ListExpressionTracesResponder(resp *http.Response) (result ExpressionTraces, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listExpressionTracesNextResults retrieves the next set of results, if any. +func (client WorkflowRunActionRepetitionsClient) listExpressionTracesNextResults(ctx context.Context, lastResults ExpressionTraces) (result ExpressionTraces, err error) { + req, err := lastResults.expressionTracesPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsClient", "listExpressionTracesNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListExpressionTracesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsClient", "listExpressionTracesNextResults", resp, "Failure sending next results request") + } + result, err = client.ListExpressionTracesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsClient", "listExpressionTracesNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListExpressionTracesComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkflowRunActionRepetitionsClient) ListExpressionTracesComplete(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string) (result ExpressionTracesIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRepetitionsClient.ListExpressionTraces") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListExpressionTraces(ctx, resourceGroupName, name, workflowName, runName, actionName, repetitionName) + return +} diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowrunactionrepetitionsrequesthistories.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowrunactionrepetitionsrequesthistories.go new file mode 100644 index 000000000000..dbf676cd0232 --- /dev/null +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowrunactionrepetitionsrequesthistories.go @@ -0,0 +1,263 @@ +package web + +// 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. + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" +) + +// WorkflowRunActionRepetitionsRequestHistoriesClient is the webSite Management Client +type WorkflowRunActionRepetitionsRequestHistoriesClient struct { + BaseClient +} + +// NewWorkflowRunActionRepetitionsRequestHistoriesClient creates an instance of the +// WorkflowRunActionRepetitionsRequestHistoriesClient client. +func NewWorkflowRunActionRepetitionsRequestHistoriesClient(subscriptionID string) WorkflowRunActionRepetitionsRequestHistoriesClient { + return NewWorkflowRunActionRepetitionsRequestHistoriesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkflowRunActionRepetitionsRequestHistoriesClientWithBaseURI creates an instance of the +// WorkflowRunActionRepetitionsRequestHistoriesClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWorkflowRunActionRepetitionsRequestHistoriesClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionRepetitionsRequestHistoriesClient { + return WorkflowRunActionRepetitionsRequestHistoriesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets a workflow run repetition request history. +// Parameters: +// 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. +func (client WorkflowRunActionRepetitionsRequestHistoriesClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, requestHistoryName string) (result RequestHistory, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRepetitionsRequestHistoriesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowRunActionRepetitionsRequestHistoriesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, name, workflowName, runName, actionName, repetitionName, requestHistoryName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsRequestHistoriesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsRequestHistoriesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsRequestHistoriesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client WorkflowRunActionRepetitionsRequestHistoriesClient) GetPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, requestHistoryName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "actionName": autorest.Encode("path", actionName), + "name": autorest.Encode("path", name), + "repetitionName": autorest.Encode("path", repetitionName), + "requestHistoryName": autorest.Encode("path", requestHistoryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runName": autorest.Encode("path", runName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/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}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowRunActionRepetitionsRequestHistoriesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WorkflowRunActionRepetitionsRequestHistoriesClient) GetResponder(resp *http.Response) (result RequestHistory, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list a workflow run repetition request history. +// Parameters: +// 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. +func (client WorkflowRunActionRepetitionsRequestHistoriesClient) List(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string) (result RequestHistoryListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRepetitionsRequestHistoriesClient.List") + defer func() { + sc := -1 + if result.rhlr.Response.Response != nil { + sc = result.rhlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowRunActionRepetitionsRequestHistoriesClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, name, workflowName, runName, actionName, repetitionName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsRequestHistoriesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.rhlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsRequestHistoriesClient", "List", resp, "Failure sending request") + return + } + + result.rhlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsRequestHistoriesClient", "List", resp, "Failure responding to request") + return + } + if result.rhlr.hasNextLink() && result.rhlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client WorkflowRunActionRepetitionsRequestHistoriesClient) ListPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "actionName": autorest.Encode("path", actionName), + "name": autorest.Encode("path", name), + "repetitionName": autorest.Encode("path", repetitionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runName": autorest.Encode("path", runName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowRunActionRepetitionsRequestHistoriesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client WorkflowRunActionRepetitionsRequestHistoriesClient) ListResponder(resp *http.Response) (result RequestHistoryListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client WorkflowRunActionRepetitionsRequestHistoriesClient) listNextResults(ctx context.Context, lastResults RequestHistoryListResult) (result RequestHistoryListResult, err error) { + req, err := lastResults.requestHistoryListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsRequestHistoriesClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsRequestHistoriesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionRepetitionsRequestHistoriesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkflowRunActionRepetitionsRequestHistoriesClient) ListComplete(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string) (result RequestHistoryListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRepetitionsRequestHistoriesClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName, name, workflowName, runName, actionName, repetitionName) + return +} diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowrunactions.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowrunactions.go new file mode 100644 index 000000000000..692169d1befd --- /dev/null +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowrunactions.go @@ -0,0 +1,394 @@ +package web + +// 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. + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" +) + +// WorkflowRunActionsClient is the webSite Management Client +type WorkflowRunActionsClient struct { + BaseClient +} + +// NewWorkflowRunActionsClient creates an instance of the WorkflowRunActionsClient client. +func NewWorkflowRunActionsClient(subscriptionID string) WorkflowRunActionsClient { + return NewWorkflowRunActionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkflowRunActionsClientWithBaseURI creates an instance of the WorkflowRunActionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewWorkflowRunActionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionsClient { + return WorkflowRunActionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets a workflow run action. +// Parameters: +// 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. +func (client WorkflowRunActionsClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string) (result WorkflowRunAction, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowRunActionsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, name, workflowName, runName, actionName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client WorkflowRunActionsClient) GetPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "actionName": autorest.Encode("path", actionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runName": autorest.Encode("path", runName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowRunActionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WorkflowRunActionsClient) GetResponder(resp *http.Response) (result WorkflowRunAction, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of workflow run actions. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// workflowName - the workflow name. +// runName - the workflow run name. +// top - the number of items to be included in the result. +// filter - the filter to apply on the operation. Options for filters include: Status. +func (client WorkflowRunActionsClient) List(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, top *int32, filter string) (result WorkflowRunActionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionsClient.List") + defer func() { + sc := -1 + if result.wralr.Response.Response != nil { + sc = result.wralr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowRunActionsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, name, workflowName, runName, top, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.wralr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionsClient", "List", resp, "Failure sending request") + return + } + + result.wralr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionsClient", "List", resp, "Failure responding to request") + return + } + if result.wralr.hasNextLink() && result.wralr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client WorkflowRunActionsClient) ListPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, top *int32, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runName": autorest.Encode("path", runName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowRunActionsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client WorkflowRunActionsClient) ListResponder(resp *http.Response) (result WorkflowRunActionListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client WorkflowRunActionsClient) listNextResults(ctx context.Context, lastResults WorkflowRunActionListResult) (result WorkflowRunActionListResult, err error) { + req, err := lastResults.workflowRunActionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.WorkflowRunActionsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.WorkflowRunActionsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkflowRunActionsClient) ListComplete(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, top *int32, filter string) (result WorkflowRunActionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName, name, workflowName, runName, top, filter) + return +} + +// ListExpressionTraces lists a workflow run expression trace. +// Parameters: +// 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. +func (client WorkflowRunActionsClient) ListExpressionTraces(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string) (result ExpressionTracesPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionsClient.ListExpressionTraces") + defer func() { + sc := -1 + if result.et.Response.Response != nil { + sc = result.et.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowRunActionsClient", "ListExpressionTraces", err.Error()) + } + + result.fn = client.listExpressionTracesNextResults + req, err := client.ListExpressionTracesPreparer(ctx, resourceGroupName, name, workflowName, runName, actionName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionsClient", "ListExpressionTraces", nil, "Failure preparing request") + return + } + + resp, err := client.ListExpressionTracesSender(req) + if err != nil { + result.et.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionsClient", "ListExpressionTraces", resp, "Failure sending request") + return + } + + result.et, err = client.ListExpressionTracesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionsClient", "ListExpressionTraces", resp, "Failure responding to request") + return + } + if result.et.hasNextLink() && result.et.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListExpressionTracesPreparer prepares the ListExpressionTraces request. +func (client WorkflowRunActionsClient) ListExpressionTracesPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "actionName": autorest.Encode("path", actionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runName": autorest.Encode("path", runName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListExpressionTracesSender sends the ListExpressionTraces request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowRunActionsClient) ListExpressionTracesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListExpressionTracesResponder handles the response to the ListExpressionTraces request. The method always +// closes the http.Response Body. +func (client WorkflowRunActionsClient) ListExpressionTracesResponder(resp *http.Response) (result ExpressionTraces, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listExpressionTracesNextResults retrieves the next set of results, if any. +func (client WorkflowRunActionsClient) listExpressionTracesNextResults(ctx context.Context, lastResults ExpressionTraces) (result ExpressionTraces, err error) { + req, err := lastResults.expressionTracesPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.WorkflowRunActionsClient", "listExpressionTracesNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListExpressionTracesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.WorkflowRunActionsClient", "listExpressionTracesNextResults", resp, "Failure sending next results request") + } + result, err = client.ListExpressionTracesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionsClient", "listExpressionTracesNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListExpressionTracesComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkflowRunActionsClient) ListExpressionTracesComplete(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string) (result ExpressionTracesIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionsClient.ListExpressionTraces") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListExpressionTraces(ctx, resourceGroupName, name, workflowName, runName, actionName) + return +} diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowrunactionscoperepetitions.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowrunactionscoperepetitions.go new file mode 100644 index 000000000000..4fd884e46c6c --- /dev/null +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowrunactionscoperepetitions.go @@ -0,0 +1,259 @@ +package web + +// 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. + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" +) + +// WorkflowRunActionScopeRepetitionsClient is the webSite Management Client +type WorkflowRunActionScopeRepetitionsClient struct { + BaseClient +} + +// NewWorkflowRunActionScopeRepetitionsClient creates an instance of the WorkflowRunActionScopeRepetitionsClient +// client. +func NewWorkflowRunActionScopeRepetitionsClient(subscriptionID string) WorkflowRunActionScopeRepetitionsClient { + return NewWorkflowRunActionScopeRepetitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkflowRunActionScopeRepetitionsClientWithBaseURI creates an instance of the +// WorkflowRunActionScopeRepetitionsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWorkflowRunActionScopeRepetitionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionScopeRepetitionsClient { + return WorkflowRunActionScopeRepetitionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get a workflow run action scoped repetition. +// Parameters: +// 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. +func (client WorkflowRunActionScopeRepetitionsClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string) (result WorkflowRunActionRepetitionDefinition, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionScopeRepetitionsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowRunActionScopeRepetitionsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, name, workflowName, runName, actionName, repetitionName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionScopeRepetitionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionScopeRepetitionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionScopeRepetitionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client WorkflowRunActionScopeRepetitionsClient) GetPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "actionName": autorest.Encode("path", actionName), + "name": autorest.Encode("path", name), + "repetitionName": autorest.Encode("path", repetitionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runName": autorest.Encode("path", runName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowRunActionScopeRepetitionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WorkflowRunActionScopeRepetitionsClient) GetResponder(resp *http.Response) (result WorkflowRunActionRepetitionDefinition, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list the workflow run action scoped repetitions. +// Parameters: +// 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. +func (client WorkflowRunActionScopeRepetitionsClient) List(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string) (result WorkflowRunActionRepetitionDefinitionCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionScopeRepetitionsClient.List") + defer func() { + sc := -1 + if result.wrardc.Response.Response != nil { + sc = result.wrardc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowRunActionScopeRepetitionsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, name, workflowName, runName, actionName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionScopeRepetitionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.wrardc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionScopeRepetitionsClient", "List", resp, "Failure sending request") + return + } + + result.wrardc, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionScopeRepetitionsClient", "List", resp, "Failure responding to request") + return + } + if result.wrardc.hasNextLink() && result.wrardc.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client WorkflowRunActionScopeRepetitionsClient) ListPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "actionName": autorest.Encode("path", actionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runName": autorest.Encode("path", runName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowRunActionScopeRepetitionsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client WorkflowRunActionScopeRepetitionsClient) ListResponder(resp *http.Response) (result WorkflowRunActionRepetitionDefinitionCollection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client WorkflowRunActionScopeRepetitionsClient) listNextResults(ctx context.Context, lastResults WorkflowRunActionRepetitionDefinitionCollection) (result WorkflowRunActionRepetitionDefinitionCollection, err error) { + req, err := lastResults.workflowRunActionRepetitionDefinitionCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.WorkflowRunActionScopeRepetitionsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.WorkflowRunActionScopeRepetitionsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunActionScopeRepetitionsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkflowRunActionScopeRepetitionsClient) ListComplete(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string) (result WorkflowRunActionRepetitionDefinitionCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionScopeRepetitionsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName, name, workflowName, runName, actionName) + return +} diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowruns.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowruns.go new file mode 100644 index 000000000000..ba94a5db0299 --- /dev/null +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowruns.go @@ -0,0 +1,345 @@ +package web + +// 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. + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" +) + +// WorkflowRunsClient is the webSite Management Client +type WorkflowRunsClient struct { + BaseClient +} + +// NewWorkflowRunsClient creates an instance of the WorkflowRunsClient client. +func NewWorkflowRunsClient(subscriptionID string) WorkflowRunsClient { + return NewWorkflowRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkflowRunsClientWithBaseURI creates an instance of the WorkflowRunsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWorkflowRunsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunsClient { + return WorkflowRunsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Cancel cancels a workflow run. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// workflowName - the workflow name. +// runName - the workflow run name. +func (client WorkflowRunsClient) Cancel(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunsClient.Cancel") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowRunsClient", "Cancel", err.Error()) + } + + req, err := client.CancelPreparer(ctx, resourceGroupName, name, workflowName, runName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunsClient", "Cancel", nil, "Failure preparing request") + return + } + + resp, err := client.CancelSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.WorkflowRunsClient", "Cancel", resp, "Failure sending request") + return + } + + result, err = client.CancelResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunsClient", "Cancel", resp, "Failure responding to request") + return + } + + return +} + +// CancelPreparer prepares the Cancel request. +func (client WorkflowRunsClient) CancelPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runName": autorest.Encode("path", runName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/cancel", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CancelSender sends the Cancel request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowRunsClient) CancelSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CancelResponder handles the response to the Cancel request. The method always +// closes the http.Response Body. +func (client WorkflowRunsClient) CancelResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a workflow run. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// workflowName - the workflow name. +// runName - the workflow run name. +func (client WorkflowRunsClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string) (result WorkflowRun, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowRunsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, name, workflowName, runName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.WorkflowRunsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client WorkflowRunsClient) GetPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "runName": autorest.Encode("path", runName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowRunsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WorkflowRunsClient) GetResponder(resp *http.Response) (result WorkflowRun, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of workflow runs. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// workflowName - the workflow name. +// top - the number of items to be included in the result. +// filter - the filter to apply on the operation. Options for filters include: Status, StartTime, and +// ClientTrackingId. +func (client WorkflowRunsClient) List(ctx context.Context, resourceGroupName string, name string, workflowName string, top *int32, filter string) (result WorkflowRunListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunsClient.List") + defer func() { + sc := -1 + if result.wrlr.Response.Response != nil { + sc = result.wrlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowRunsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, name, workflowName, top, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.wrlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.WorkflowRunsClient", "List", resp, "Failure sending request") + return + } + + result.wrlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunsClient", "List", resp, "Failure responding to request") + return + } + if result.wrlr.hasNextLink() && result.wrlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client WorkflowRunsClient) ListPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, top *int32, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowRunsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client WorkflowRunsClient) ListResponder(resp *http.Response) (result WorkflowRunListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client WorkflowRunsClient) listNextResults(ctx context.Context, lastResults WorkflowRunListResult) (result WorkflowRunListResult, err error) { + req, err := lastResults.workflowRunListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.WorkflowRunsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.WorkflowRunsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowRunsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkflowRunsClient) ListComplete(ctx context.Context, resourceGroupName string, name string, workflowName string, top *int32, filter string) (result WorkflowRunListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName, name, workflowName, top, filter) + return +} diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflows.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflows.go new file mode 100644 index 000000000000..8f92476bfb5e --- /dev/null +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflows.go @@ -0,0 +1,209 @@ +package web + +// 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. + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" +) + +// WorkflowsClient is the webSite Management Client +type WorkflowsClient struct { + BaseClient +} + +// NewWorkflowsClient creates an instance of the WorkflowsClient client. +func NewWorkflowsClient(subscriptionID string) WorkflowsClient { + return NewWorkflowsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkflowsClientWithBaseURI creates an instance of the WorkflowsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWorkflowsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowsClient { + return WorkflowsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// RegenerateAccessKey regenerates the callback URL access key for request triggers. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// workflowName - the workflow name. +// keyType - the access key type. +func (client WorkflowsClient) RegenerateAccessKey(ctx context.Context, resourceGroupName string, name string, workflowName string, keyType RegenerateActionParameter) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.RegenerateAccessKey") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowsClient", "RegenerateAccessKey", err.Error()) + } + + req, err := client.RegenerateAccessKeyPreparer(ctx, resourceGroupName, name, workflowName, keyType) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowsClient", "RegenerateAccessKey", nil, "Failure preparing request") + return + } + + resp, err := client.RegenerateAccessKeySender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.WorkflowsClient", "RegenerateAccessKey", resp, "Failure sending request") + return + } + + result, err = client.RegenerateAccessKeyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowsClient", "RegenerateAccessKey", resp, "Failure responding to request") + return + } + + return +} + +// RegenerateAccessKeyPreparer prepares the RegenerateAccessKey request. +func (client WorkflowsClient) RegenerateAccessKeyPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, keyType RegenerateActionParameter) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/regenerateAccessKey", pathParameters), + autorest.WithJSON(keyType), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RegenerateAccessKeySender sends the RegenerateAccessKey request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowsClient) RegenerateAccessKeySender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// RegenerateAccessKeyResponder handles the response to the RegenerateAccessKey request. The method always +// closes the http.Response Body. +func (client WorkflowsClient) RegenerateAccessKeyResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Validate validates the workflow definition. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// workflowName - the workflow name. +// validate - the workflow. +func (client WorkflowsClient) Validate(ctx context.Context, resourceGroupName string, name string, workflowName string, validate Workflow) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.Validate") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowsClient", "Validate", err.Error()) + } + + req, err := client.ValidatePreparer(ctx, resourceGroupName, name, workflowName, validate) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowsClient", "Validate", nil, "Failure preparing request") + return + } + + resp, err := client.ValidateSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.WorkflowsClient", "Validate", resp, "Failure sending request") + return + } + + result, err = client.ValidateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowsClient", "Validate", resp, "Failure responding to request") + return + } + + return +} + +// ValidatePreparer prepares the Validate request. +func (client WorkflowsClient) ValidatePreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, validate Workflow) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/validate", pathParameters), + autorest.WithJSON(validate), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ValidateSender sends the Validate request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowsClient) ValidateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ValidateResponder handles the response to the Validate request. The method always +// closes the http.Response Body. +func (client WorkflowsClient) ValidateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowtriggerhistories.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowtriggerhistories.go new file mode 100644 index 000000000000..30a6acc5753f --- /dev/null +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowtriggerhistories.go @@ -0,0 +1,357 @@ +package web + +// 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. + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" +) + +// WorkflowTriggerHistoriesClient is the webSite Management Client +type WorkflowTriggerHistoriesClient struct { + BaseClient +} + +// NewWorkflowTriggerHistoriesClient creates an instance of the WorkflowTriggerHistoriesClient client. +func NewWorkflowTriggerHistoriesClient(subscriptionID string) WorkflowTriggerHistoriesClient { + return NewWorkflowTriggerHistoriesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkflowTriggerHistoriesClientWithBaseURI creates an instance of the WorkflowTriggerHistoriesClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewWorkflowTriggerHistoriesClientWithBaseURI(baseURI string, subscriptionID string) WorkflowTriggerHistoriesClient { + return WorkflowTriggerHistoriesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets a workflow trigger history. +// Parameters: +// 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. +func (client WorkflowTriggerHistoriesClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, historyName string) (result WorkflowTriggerHistory, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerHistoriesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowTriggerHistoriesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, name, workflowName, triggerName, historyName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowTriggerHistoriesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.WorkflowTriggerHistoriesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowTriggerHistoriesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client WorkflowTriggerHistoriesClient) GetPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, historyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "historyName": autorest.Encode("path", historyName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "triggerName": autorest.Encode("path", triggerName), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowTriggerHistoriesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WorkflowTriggerHistoriesClient) GetResponder(resp *http.Response) (result WorkflowTriggerHistory, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of workflow trigger histories. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// workflowName - the workflow name. +// triggerName - the workflow trigger name. +// top - the number of items to be included in the result. +// filter - the filter to apply on the operation. Options for filters include: Status, StartTime, and +// ClientTrackingId. +func (client WorkflowTriggerHistoriesClient) List(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, top *int32, filter string) (result WorkflowTriggerHistoryListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerHistoriesClient.List") + defer func() { + sc := -1 + if result.wthlr.Response.Response != nil { + sc = result.wthlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowTriggerHistoriesClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, name, workflowName, triggerName, top, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowTriggerHistoriesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.wthlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.WorkflowTriggerHistoriesClient", "List", resp, "Failure sending request") + return + } + + result.wthlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowTriggerHistoriesClient", "List", resp, "Failure responding to request") + return + } + if result.wthlr.hasNextLink() && result.wthlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client WorkflowTriggerHistoriesClient) ListPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, top *int32, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "triggerName": autorest.Encode("path", triggerName), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowTriggerHistoriesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client WorkflowTriggerHistoriesClient) ListResponder(resp *http.Response) (result WorkflowTriggerHistoryListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client WorkflowTriggerHistoriesClient) listNextResults(ctx context.Context, lastResults WorkflowTriggerHistoryListResult) (result WorkflowTriggerHistoryListResult, err error) { + req, err := lastResults.workflowTriggerHistoryListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.WorkflowTriggerHistoriesClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.WorkflowTriggerHistoriesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowTriggerHistoriesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkflowTriggerHistoriesClient) ListComplete(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, top *int32, filter string) (result WorkflowTriggerHistoryListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerHistoriesClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName, name, workflowName, triggerName, top, filter) + return +} + +// Resubmit resubmits a workflow run based on the trigger history. +// Parameters: +// 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. +func (client WorkflowTriggerHistoriesClient) Resubmit(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, historyName string) (result WorkflowTriggerHistoriesResubmitFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerHistoriesClient.Resubmit") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowTriggerHistoriesClient", "Resubmit", err.Error()) + } + + req, err := client.ResubmitPreparer(ctx, resourceGroupName, name, workflowName, triggerName, historyName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowTriggerHistoriesClient", "Resubmit", nil, "Failure preparing request") + return + } + + result, err = client.ResubmitSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowTriggerHistoriesClient", "Resubmit", result.Response(), "Failure sending request") + return + } + + return +} + +// ResubmitPreparer prepares the Resubmit request. +func (client WorkflowTriggerHistoriesClient) ResubmitPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, historyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "historyName": autorest.Encode("path", historyName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "triggerName": autorest.Encode("path", triggerName), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResubmitSender sends the Resubmit request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowTriggerHistoriesClient) ResubmitSender(req *http.Request) (future WorkflowTriggerHistoriesResubmitFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ResubmitResponder handles the response to the Resubmit request. The method always +// closes the http.Response Body. +func (client WorkflowTriggerHistoriesClient) ResubmitResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowtriggers.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowtriggers.go new file mode 100644 index 000000000000..4ba57bc846cb --- /dev/null +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowtriggers.go @@ -0,0 +1,524 @@ +package web + +// 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. + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" +) + +// WorkflowTriggersClient is the webSite Management Client +type WorkflowTriggersClient struct { + BaseClient +} + +// NewWorkflowTriggersClient creates an instance of the WorkflowTriggersClient client. +func NewWorkflowTriggersClient(subscriptionID string) WorkflowTriggersClient { + return NewWorkflowTriggersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkflowTriggersClientWithBaseURI creates an instance of the WorkflowTriggersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewWorkflowTriggersClientWithBaseURI(baseURI string, subscriptionID string) WorkflowTriggersClient { + return WorkflowTriggersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets a workflow trigger. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// workflowName - the workflow name. +// triggerName - the workflow trigger name. +func (client WorkflowTriggersClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string) (result WorkflowTrigger, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggersClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowTriggersClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, name, workflowName, triggerName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowTriggersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.WorkflowTriggersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowTriggersClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client WorkflowTriggersClient) GetPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "triggerName": autorest.Encode("path", triggerName), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowTriggersClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WorkflowTriggersClient) GetResponder(resp *http.Response) (result WorkflowTrigger, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetSchemaJSON get the trigger schema as JSON. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// workflowName - the workflow name. +// triggerName - the workflow trigger name. +func (client WorkflowTriggersClient) GetSchemaJSON(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string) (result JSONSchema, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggersClient.GetSchemaJSON") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowTriggersClient", "GetSchemaJSON", err.Error()) + } + + req, err := client.GetSchemaJSONPreparer(ctx, resourceGroupName, name, workflowName, triggerName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowTriggersClient", "GetSchemaJSON", nil, "Failure preparing request") + return + } + + resp, err := client.GetSchemaJSONSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.WorkflowTriggersClient", "GetSchemaJSON", resp, "Failure sending request") + return + } + + result, err = client.GetSchemaJSONResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowTriggersClient", "GetSchemaJSON", resp, "Failure responding to request") + return + } + + return +} + +// GetSchemaJSONPreparer prepares the GetSchemaJSON request. +func (client WorkflowTriggersClient) GetSchemaJSONPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "triggerName": autorest.Encode("path", triggerName), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/schemas/json", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSchemaJSONSender sends the GetSchemaJSON request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowTriggersClient) GetSchemaJSONSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetSchemaJSONResponder handles the response to the GetSchemaJSON request. The method always +// closes the http.Response Body. +func (client WorkflowTriggersClient) GetSchemaJSONResponder(resp *http.Response) (result JSONSchema, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of workflow triggers. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// workflowName - the workflow name. +// top - the number of items to be included in the result. +// filter - the filter to apply on the operation. +func (client WorkflowTriggersClient) List(ctx context.Context, resourceGroupName string, name string, workflowName string, top *int32, filter string) (result WorkflowTriggerListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggersClient.List") + defer func() { + sc := -1 + if result.wtlr.Response.Response != nil { + sc = result.wtlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowTriggersClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, name, workflowName, top, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowTriggersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.wtlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.WorkflowTriggersClient", "List", resp, "Failure sending request") + return + } + + result.wtlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowTriggersClient", "List", resp, "Failure responding to request") + return + } + if result.wtlr.hasNextLink() && result.wtlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client WorkflowTriggersClient) ListPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, top *int32, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowTriggersClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client WorkflowTriggersClient) ListResponder(resp *http.Response) (result WorkflowTriggerListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client WorkflowTriggersClient) listNextResults(ctx context.Context, lastResults WorkflowTriggerListResult) (result WorkflowTriggerListResult, err error) { + req, err := lastResults.workflowTriggerListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.WorkflowTriggersClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.WorkflowTriggersClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowTriggersClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkflowTriggersClient) ListComplete(ctx context.Context, resourceGroupName string, name string, workflowName string, top *int32, filter string) (result WorkflowTriggerListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggersClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName, name, workflowName, top, filter) + return +} + +// ListCallbackURL get the callback URL for a workflow trigger. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// workflowName - the workflow name. +// triggerName - the workflow trigger name. +func (client WorkflowTriggersClient) ListCallbackURL(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string) (result WorkflowTriggerCallbackURL, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggersClient.ListCallbackURL") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowTriggersClient", "ListCallbackURL", err.Error()) + } + + req, err := client.ListCallbackURLPreparer(ctx, resourceGroupName, name, workflowName, triggerName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowTriggersClient", "ListCallbackURL", nil, "Failure preparing request") + return + } + + resp, err := client.ListCallbackURLSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.WorkflowTriggersClient", "ListCallbackURL", resp, "Failure sending request") + return + } + + result, err = client.ListCallbackURLResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowTriggersClient", "ListCallbackURL", resp, "Failure responding to request") + return + } + + return +} + +// ListCallbackURLPreparer prepares the ListCallbackURL request. +func (client WorkflowTriggersClient) ListCallbackURLPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "triggerName": autorest.Encode("path", triggerName), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListCallbackURLSender sends the ListCallbackURL request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowTriggersClient) ListCallbackURLSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListCallbackURLResponder handles the response to the ListCallbackURL request. The method always +// closes the http.Response Body. +func (client WorkflowTriggersClient) ListCallbackURLResponder(resp *http.Response) (result WorkflowTriggerCallbackURL, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Run runs a workflow trigger. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// workflowName - the workflow name. +// triggerName - the workflow trigger name. +func (client WorkflowTriggersClient) Run(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string) (result WorkflowTriggersRunFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggersClient.Run") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowTriggersClient", "Run", err.Error()) + } + + req, err := client.RunPreparer(ctx, resourceGroupName, name, workflowName, triggerName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowTriggersClient", "Run", nil, "Failure preparing request") + return + } + + result, err = client.RunSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowTriggersClient", "Run", result.Response(), "Failure sending request") + return + } + + return +} + +// RunPreparer prepares the Run request. +func (client WorkflowTriggersClient) RunPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "triggerName": autorest.Encode("path", triggerName), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/run", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RunSender sends the Run request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowTriggersClient) RunSender(req *http.Request) (future WorkflowTriggersRunFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// RunResponder handles the response to the Run request. The method always +// closes the http.Response Body. +func (client WorkflowTriggersClient) RunResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowversions.go b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowversions.go new file mode 100644 index 000000000000..6729d0d03523 --- /dev/null +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web/workflowversions.go @@ -0,0 +1,254 @@ +package web + +// 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. + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" +) + +// WorkflowVersionsClient is the webSite Management Client +type WorkflowVersionsClient struct { + BaseClient +} + +// NewWorkflowVersionsClient creates an instance of the WorkflowVersionsClient client. +func NewWorkflowVersionsClient(subscriptionID string) WorkflowVersionsClient { + return NewWorkflowVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkflowVersionsClientWithBaseURI creates an instance of the WorkflowVersionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewWorkflowVersionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowVersionsClient { + return WorkflowVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets a workflow version. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// workflowName - the workflow name. +// versionID - the workflow versionId. +func (client WorkflowVersionsClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, versionID string) (result WorkflowVersion, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowVersionsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowVersionsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, name, workflowName, versionID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowVersionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.WorkflowVersionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowVersionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client WorkflowVersionsClient) GetPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, versionID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "versionId": autorest.Encode("path", versionID), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowVersionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WorkflowVersionsClient) GetResponder(resp *http.Response) (result WorkflowVersion, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of workflow versions. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// workflowName - the workflow name. +// top - the number of items to be included in the result. +func (client WorkflowVersionsClient) List(ctx context.Context, resourceGroupName string, name string, workflowName string, top *int32) (result WorkflowVersionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowVersionsClient.List") + defer func() { + sc := -1 + if result.wvlr.Response.Response != nil { + sc = result.wvlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.WorkflowVersionsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, name, workflowName, top) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowVersionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.wvlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.WorkflowVersionsClient", "List", resp, "Failure sending request") + return + } + + result.wvlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowVersionsClient", "List", resp, "Failure responding to request") + return + } + if result.wvlr.hasNextLink() && result.wvlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client WorkflowVersionsClient) ListPreparer(ctx context.Context, resourceGroupName string, name string, workflowName string, top *int32) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workflowName": autorest.Encode("path", workflowName), + } + + const APIVersion = "2022-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client WorkflowVersionsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client WorkflowVersionsClient) ListResponder(resp *http.Response) (result WorkflowVersionListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client WorkflowVersionsClient) listNextResults(ctx context.Context, lastResults WorkflowVersionListResult) (result WorkflowVersionListResult, err error) { + req, err := lastResults.workflowVersionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.WorkflowVersionsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.WorkflowVersionsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.WorkflowVersionsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkflowVersionsClient) ListComplete(ctx context.Context, resourceGroupName string, name string, workflowName string, top *int32) (result WorkflowVersionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowVersionsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName, name, workflowName, top) + return +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 4fe5056d787c..ac5d35346ecb 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -36,7 +36,6 @@ github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage github.com/Azure/azure-sdk-for-go/services/storagesync/mgmt/2020-03-01/storagesync github.com/Azure/azure-sdk-for-go/services/subscription/mgmt/2020-09-01/subscription github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-02-01/web -github.com/Azure/azure-sdk-for-go/services/web/mgmt/2021-03-01/web github.com/Azure/azure-sdk-for-go/version # github.com/Azure/go-autorest v14.2.0+incompatible ## explicit @@ -861,6 +860,7 @@ github.com/tombuildsstuff/kermit/sdk/securityinsights/2022-10-01-preview/securit github.com/tombuildsstuff/kermit/sdk/synapse/2019-06-01-preview/synapse github.com/tombuildsstuff/kermit/sdk/synapse/2020-08-01-preview/synapse github.com/tombuildsstuff/kermit/sdk/synapse/2021-06-01-preview/synapse +github.com/tombuildsstuff/kermit/sdk/web/2022-09-01/web github.com/tombuildsstuff/kermit/version # github.com/vmihailenco/msgpack v4.0.4+incompatible ## explicit